diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 3780b652d21..aff69c1037d 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -238,11 +238,11 @@ def grpc_deps(): if "com_google_protobuf" not in native.existing_rules(): http_archive( name = "com_google_protobuf", - sha256 = "63c5539a8506dc6bccd352a857cea106e0a389ce047a3ff0a78fe3f8fede410d", - strip_prefix = "protobuf-24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb", + sha256 = "d594b561fb41bf243233d8f411c7f2b7d913e5c9c1be4ca439baf7e48384c893", + strip_prefix = "protobuf-f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb.tar.gz", - "https://github.com/protocolbuffers/protobuf/archive/24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c.tar.gz", ], patches = ["@com_github_grpc_grpc//third_party:protobuf.patch"], patch_args = ["-p1"], diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 3e77decc28d..05e0c9877c0 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -15,7 +15,7 @@ settings: core_version: 30.0.0 csharp_major_version: 2 g_stands_for: glockenspiel - protobuf_version: 3.21.6 + protobuf_version: 3.21.12 version: 1.53.0-dev configs: asan: diff --git a/src/csharp/build/dependencies.props b/src/csharp/build/dependencies.props index 964572b1657..168f1f0b454 100644 --- a/src/csharp/build/dependencies.props +++ b/src/csharp/build/dependencies.props @@ -2,6 +2,6 @@ 2.53.0-dev - 3.21.6 + 3.21.12 diff --git a/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec index a2d1f6fbf7f..9661af1aec7 100644 --- a/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec @@ -100,7 +100,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.21.6' + s.dependency '!ProtoCompiler', '3.21.12' # For the Protobuf dependency not to complain: s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.10' diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 8796ee95d72..15b1669c54f 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -102,7 +102,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.21.6' + s.dependency '!ProtoCompiler', '3.21.12' # For the Protobuf dependency not to complain: s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.10' diff --git a/src/objective-c/!ProtoCompiler.podspec b/src/objective-c/!ProtoCompiler.podspec index 6bd88c1e971..12b31121e46 100644 --- a/src/objective-c/!ProtoCompiler.podspec +++ b/src/objective-c/!ProtoCompiler.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler' - v = '3.21.6' + v = '3.21.12' s.version = v s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' s.description = <<-DESC diff --git a/third_party/protobuf b/third_party/protobuf index 24487dd1045..f0dc78d7e6e 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb +Subproject commit f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c diff --git a/third_party/protobuf.patch b/third_party/protobuf.patch index 1ee120d44a9..6a3f5e3785b 100644 --- a/third_party/protobuf.patch +++ b/third_party/protobuf.patch @@ -5,7 +5,7 @@ index 97ac28028..8b7585d9d 100644 @@ -31,3 +31,9 @@ # Copyright 2007 Google Inc. All Rights Reserved. - __version__ = '4.21.6' + __version__ = '4.21.12' + +if __name__ != '__main__': + try: diff --git a/tools/distrib/check_protobuf_pod_version.sh b/tools/distrib/check_protobuf_pod_version.sh index 174931a0d18..be3c8023dfb 100755 --- a/tools/distrib/check_protobuf_pod_version.sh +++ b/tools/distrib/check_protobuf_pod_version.sh @@ -22,6 +22,16 @@ pushd third_party/protobuf version1=$(git describe --tags | cut -f 1 -d'-') v1=${version1:1} +# Protobuf has recently changed the versioning of the release branches/tags +# and the same release commit can be tagged with mutliple tag names +# (e.g. v3.21.12 is also tagged as v21.12), which ultimately confuses +# the output of "git describe --tags" and makes it non-deterministic. +# The hack below converts the version number to always become 3.x.y +# regardless of what tag name we get back from "git describe --tags". +# Hack: In case we got a 2-part "x.y" version number from the tag, +# convert it to version number in "3.x.y" format. +# TODO(jtattermusch): find a better workaround for this. +v1=$(echo "$v1" | sed 's/^\([0-9]*\)\.\([0-9]*\)$/3.\1.\2/') popd @@ -33,12 +43,12 @@ v3=$(cat src/objective-c/\!ProtoCompiler-gRPCPlugin.podspec | egrep 'dependency. # compare and emit error ret=0 -if [ $v1 != $v2 ]; then +if [ "$v1" != "$v2" ]; then echo 'Protobuf version in src/objective-c/!ProtoCompiler.podspec does not match protobuf version in third_party/protobuf.' ret=1 fi -if [ $v1 != $v3 ]; then +if [ "$v1" != "$v3" ]; then echo 'Protobuf version in src/objective-c/!ProtoCompiler-gRPCPlugin.podspec does not match protobuf version in third_party/protobuf.' ret=1 fi diff --git a/tools/distrib/python/grpc_version.py b/tools/distrib/python/grpc_version.py index f0e96ac6151..13c0a523fe8 100644 --- a/tools/distrib/python/grpc_version.py +++ b/tools/distrib/python/grpc_version.py @@ -15,4 +15,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! VERSION = '1.53.0.dev0' -PROTOBUF_VERSION = '3.21.6' +PROTOBUF_VERSION = '3.21.12' diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index d813d1082d1..f36fcd09f3e 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -15,4 +15,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! VERSION = '1.53.0.dev0' -PROTOBUF_VERSION = '3.21.6' +PROTOBUF_VERSION = '3.21.12' diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index eee15e3842d..bbfb35f6d5b 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -20,4 +20,4 @@ PROTO_FILES=['google/protobuf/any.proto', 'google/protobuf/api.proto', 'google/p CC_INCLUDE='third_party/protobuf/src' PROTO_INCLUDE='third_party/protobuf/src' -PROTOBUF_SUBMODULE_VERSION="24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb" +PROTOBUF_SUBMODULE_VERSION="f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 1db2a9b49dd..80f41b6c211 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -36,7 +36,7 @@ third_party/googletest 0e402173c97aea7a00749e825b194bfede4f2e45 third_party/libuv 02a9e1be252b623ee032a3137c0b0c94afbe6809 third_party/opencensus-proto 4aa53e15cbf1a47bc9087e6cfdca214c1eea4e89 third_party/opentelemetry 60fa8754d890b5c55949a8c68dcfd7ab5c2395df -third_party/protobuf 24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb +third_party/protobuf f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c third_party/re2 0c5616df9c0aaa44c9440d87422012423d91c7d1 third_party/xds 06c439db220b89134a8a49bad41994560d6537c6 third_party/zlib 04f42ceca40f73e2978b50e93806c2a18c1281fc