-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
*: bump gRPC dependencies #5075
*: bump gRPC dependencies #5075
Conversation
This change updates the gRPC dependencies to more recent versions: * github.com/gogo/protobuf => v1.2.0 * github.com/grpc-ecosystem/grpc-gateway => v1.6.3 * google.golang.org/grpc => v1.17.0 In addition scripts/genproto.sh leverages Go modules information instead of hardcoding SHA1 commits. This ensures that the code is generated from the exact same sources. Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Doesn't work for me :-(
Will have a look at why... |
It seems |
No, looks like for some reason the |
Yes, it appears we need to |
This does the trick: diff --git a/scripts/genproto.sh b/scripts/genproto.sh
index 2c2b75bd..bec0a53c 100755
--- a/scripts/genproto.sh
+++ b/scripts/genproto.sh
@@ -16,11 +16,14 @@ if ! [[ $(protoc --version) =~ "3.5.1" ]]; then
fi
echo "installing plugins"
-INSTALL_PKGS="golang.org/x/tools/cmd/goimports github.com/gogo/protobuf/protoc-gen-gogofast github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"
-for pkg in ${INSTALL_PKGS}; do
+for pkg in golang.org/x/tools/cmd/goimports github.com/gogo/protobuf/protoc-gen-gogofast; do
GO111MODULE=on go install -mod=vendor "$pkg"
done
+for pkg in github.com/gogo/protobuf github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger; do
+ GO111MODULE=on go get "$pkg"
+done
+
PROM_ROOT="${PWD}"
PROM_PATH="${PROM_ROOT}/prompb"
GOGOPROTO_ROOT="$(GO111MODULE=on go list -f '{{ .Dir }}' -m github.com/gogo/protobuf)" Although I need to test that this doesn't try and update gomodules again.. |
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.
Need to include the go get
(if that does what I think) and remove the --
for this to work on a mac.
Works for me with @tomwilkie's changes. Without that diff I got different for what looks like the same issue, missing dependencies.
|
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
cc @bwplotka |
@cstyan @tomwilkie please test again on Mac. I've added a step to CircleCI that runs |
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.
Generally LGTM, just one question and one suggestion.
Also I guess it is preferable/nicer to update dependencies in separate PR to actuall change in script.. but up to you.
chmod +x /tmp/bin/protoc | ||
echo 'export PATH=/tmp/bin:$PATH' >> $BASH_ENV | ||
source $BASH_ENV | ||
make proto | ||
- run: git diff --exit-code |
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 assume this is to detected if assets, lint and now proto generation was done and commited, right? Maybe worth to wrap this with some message, like:
- run: git diff --exit-code | |
- run: git diff --exit-code || echo "\n Not linted code, assets not updated or proto not generated. |
It would be nice what exactly is not generated as well.. ;p But this will work for a start (:
@tomwilkie let's test this, because according to docs
(ref: https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies) ... But maybe docs are misleading and they meant |
Any ideas why they are not already in |
They are, but we need the proto files, and they are not. |
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier getting a checksum mismatch, that rootcert package dependency is
Just Tom is on macos. |
@cstyan this is either because you're not using Go 1.11.4 or because you need to clean you module cache ( |
@cstyan @tomwilkie let me know if it works for you now. |
@simonpasquier yeah works for me now |
I had to do a |
@tomwilkie are you building with Go 1.11.4? Previous 1.11.x versions can compute different hashes for projects that have symlinks. |
go 1.11.2; after the update it works nicely. |
This change updates the gRPC dependencies to more recent versions:
In addition scripts/genproto.sh leverages Go modules information instead of
hardcoding SHA1 commits. This ensures that the code is generated from
the exact same sources.
cc @cstyan