-
Notifications
You must be signed in to change notification settings - Fork 34
Bump protoc version to 3.21.3 #673
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #673 +/- ##
=======================================
Coverage 54.09% 54.09%
=======================================
Files 78 78
Lines 7326 7326
=======================================
Hits 3963 3963
Misses 2940 2940
Partials 423 423 Help us with your feedback. Take ten seconds to tell us how you rate us. |
@@ -51,7 +51,7 @@ function clone_common_protos { | |||
# Require a specific version of protoc for generating files. | |||
# This stabilizes the generated file output, which includes the protoc version. | |||
. tools/PROTOC-VERSION.sh | |||
if [ "$(protoc --version)" != "libprotoc $PROTOC_VERSION" ]; then |
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.
This is odd. Why is the 3.
separately hard-coded from the rest of the version now?
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.
Because https://github.com/protocolbuffers/protobuf/releases doesn't include the major version in the asset names anymore, but the output from protoc --version
still includes it.
We use the $PROTOC_VERSION
variable to build the asset URL.
registry/tools/FETCH-PROTOC.sh
Lines 32 to 38 in 9bf1213
export SOURCE="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-$ARCH.zip" | |
echo $SOURCE | |
curl -L $SOURCE > /tmp/protoc.zip | |
unzip /tmp/protoc.zip -d /usr/local |
Hardcoding the 3.
in our version checks is easier than trimming it from the variable before building that URL.
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.
Their strategy is confusing to me... It sounds like they are still doing major version releases on a per-language basis: https://developers.google.com/protocol-buffers/docs/news/2022-05-06. And, if you look at the tags, they are still tagging (if not creating "releases") that match the full major versioning scheme: https://github.com/protocolbuffers/protobuf/tags.
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.
Yeah I'm confused too. I just know that when I bumped the version like we always have, our FETCH-PROTOC.sh script started to fail (and caused CI failures). That led me to discover the new versioning scheme.
Looking at those release tags, we can see there is a tag for v3.21.4, but all the language-specific assets including the one we depend on are kept in the v21.4 tag.
I'm not really worried about this though. Our scripts will work as long as the tag we're pointing at remains stable. If they change the versioning scheme again for future releases we'll just need to adapt to that next time we bump our protoc version. At worst it's an annoyance every few months.
if [ "$(protoc --version)" != "libprotoc $PROTOC_VERSION" ]; then | ||
echo "Please update your protoc to version $PROTOC_VERSION, the current required version as specified in tools/PROTOC_VERSION.sh" | ||
if [ "$(protoc --version)" != "libprotoc 3.$PROTOC_VERSION" ]; then | ||
echo "Please update your protoc to version 3.$PROTOC_VERSION, the current required version as specified in tools/PROTOC_VERSION.sh" |
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.
So now it seems that "3" is the $GO_PROTOC_MAJOR_VERSION. Someday we might want to make that explicit instead of leaving the mysterious "3." around, which someone in the future might think is a typo.
No description provided.