-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README. #414
Update README. #414
Conversation
README.md
Outdated
@@ -31,13 +31,18 @@ own and can obtain certificates for. | |||
|
|||
##### Manual installation | |||
|
|||
1. Install Go version 1.10 or higher. Optionally, set | |||
1. Install Go version 1.10. Optionally, set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Google will validate all contributions with Travis running Go 1.10, so should we suggest installing specifically this version?
I've installed Go 1.14, used strings.ReplaceAll (that's not available in Go 1.10) and got a build error from Travis:
https://travis-ci.org/github/ampproject/amppackager/builds/680776394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twifkak perhaps it's time to update travis.yml? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't remove the "or higher" unless there's a known breakage at higher versions. Don't want to make installation unnecessarily hard. I guess I have to exclude -mod=vendor
from that rule. :)
Re: updating travis.yml, SGTM. It may even be possible to test on multiple versions? e.g. https://github.com/streadway/amqp/blob/master/.travis.yml
README.md
Outdated
[$GOPATH](https://github.com/golang/go/wiki/GOPATH) to something (default | ||
is `~/go`) and/or add `$GOPATH/bin` to `$PATH`. | ||
2. `go get -u -mod=vendor github.com/ampproject/amppackager/cmd/amppkg` | ||
1. `go get -u github.com/ampproject/amppackager/cmd/amppkg` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-mod=vendor is not available in Go 1.14: GoogleContainerTools/skaffold#3699
I've tested it today with Go 1.10 and it didn't work for me either (but it did work when I removed -mod=vendor). Here's the error I got:
michaelrybak$ go get -u -mod=vendor github.com/ampproject/amppackager/cmd/amppkg
flag provided but not defined: -mod
usage: get [-d] [-f] [-fix] [-insecure] [-t] [-u] [-v] [build flags] [packages]
Run 'go help get' for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twifkak, do we still need to generate the vendor directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof. They're not making it easy. I guess we should list two command lines: with -mod=vendor
if 1.10-1.13, and without if 1.14+. I think it's too soon to up our minimum version to 1.14 -- e.g. it's not even in the Ubuntu release from 7 days ago: https://packages.ubuntu.com/focal/golang-any, let alone in the previous LTS version.
We could just do as you've suggested, which AFAIK means that the vendor directory will be ignored on Go 1.10-1.13. I'm not wild about that, for two reasons:
- I think it's slow? Involves a lot of
git clone
s. - I'm just not knowledgeable enough in how go modules work. After doing all those
git clone
s, does Go verify againstgo.sum
? I would prefer some safety check that users are getting the version of the libs that we tested against.
I could easily be convinced on both fronts.
(To make things more confusing, it seems the official documentation is incorrect. https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away and https://golang.org/doc/go1.14#go-command seem to suggest continued support for -mod=vendor
. But the commit that you link to is unequivocal.)
--enable-features=SignedHTTPExchange | ||
'data:text/html,<a href="https://localhost:8080/priv/doc/https://amppackageexample.com/">click me' | ||
alias chrome = [FULL PATH TO CHROME BINARY] | ||
PATH_TO_FULLCHAIN_PEM = [FULL PATH TO fullchain.pem] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice "path/to/fullchain.pem" template in the command below:
--ignore-certificate-errors-spki-list=$(openssl x509
-pubkey -noout -in path/to/fullchain.pem
Added a dedicated variable PATH_TO_FULLCHAIN_PEM so the requirement to insert the user cert path becomes explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
alias chrome = [FULL PATH TO CHROME BINARY] | ||
PATH_TO_FULLCHAIN_PEM = [FULL PATH TO fullchain.pem] | ||
chrome --user-data-dir=/tmp/udd\ | ||
--ignore-certificate-errors-spki-list=$(\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added line breaks for readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The changes look reasonable to me but you should wait for twifkak@ to bless. |
README.md
Outdated
@@ -31,13 +31,18 @@ own and can obtain certificates for. | |||
|
|||
##### Manual installation | |||
|
|||
1. Install Go version 1.10 or higher. Optionally, set | |||
1. Install Go version 1.10. Optionally, set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't remove the "or higher" unless there's a known breakage at higher versions. Don't want to make installation unnecessarily hard. I guess I have to exclude -mod=vendor
from that rule. :)
Re: updating travis.yml, SGTM. It may even be possible to test on multiple versions? e.g. https://github.com/streadway/amqp/blob/master/.travis.yml
README.md
Outdated
[$GOPATH](https://github.com/golang/go/wiki/GOPATH) to something (default | ||
is `~/go`) and/or add `$GOPATH/bin` to `$PATH`. | ||
2. `go get -u -mod=vendor github.com/ampproject/amppackager/cmd/amppkg` | ||
1. `go get -u github.com/ampproject/amppackager/cmd/amppkg` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof. They're not making it easy. I guess we should list two command lines: with -mod=vendor
if 1.10-1.13, and without if 1.14+. I think it's too soon to up our minimum version to 1.14 -- e.g. it's not even in the Ubuntu release from 7 days ago: https://packages.ubuntu.com/focal/golang-any, let alone in the previous LTS version.
We could just do as you've suggested, which AFAIK means that the vendor directory will be ignored on Go 1.10-1.13. I'm not wild about that, for two reasons:
- I think it's slow? Involves a lot of
git clone
s. - I'm just not knowledgeable enough in how go modules work. After doing all those
git clone
s, does Go verify againstgo.sum
? I would prefer some safety check that users are getting the version of the libs that we tested against.
I could easily be convinced on both fronts.
(To make things more confusing, it seems the official documentation is incorrect. https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away and https://golang.org/doc/go1.14#go-command seem to suggest continued support for -mod=vendor
. But the commit that you link to is unequivocal.)
--enable-features=SignedHTTPExchange | ||
'data:text/html,<a href="https://localhost:8080/priv/doc/https://amppackageexample.com/">click me' | ||
alias chrome = [FULL PATH TO CHROME BINARY] | ||
PATH_TO_FULLCHAIN_PEM = [FULL PATH TO fullchain.pem] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
alias chrome = [FULL PATH TO CHROME BINARY] | ||
PATH_TO_FULLCHAIN_PEM = [FULL PATH TO fullchain.pem] | ||
chrome --user-data-dir=/tmp/udd\ | ||
--ignore-certificate-errors-spki-list=$(\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
README.md
Outdated
@@ -34,10 +34,15 @@ own and can obtain certificates for. | |||
1. Install Go version 1.10 or higher. Optionally, set | |||
[$GOPATH](https://github.com/golang/go/wiki/GOPATH) to something (default | |||
is `~/go`) and/or add `$GOPATH/bin` to `$PATH`. | |||
2. `go get -u -mod=vendor github.com/ampproject/amppackager/cmd/amppkg` | |||
1. `go get -u -mod=vendor github.com/ampproject/amppackager/cmd/amppkg` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional) For now, I'd be OK with putting an if statement here based on go version
, until we work out the details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Update setup instructions in README.md.
No description provided.