Skip to content

Commit 97fce71

Browse files
committed
fix(ci): resolve protobuf runtime incompatibility (Round 7)
- Add io.grpc:grpc-protobuf:1.53.0 to WORKSPACE maven_install to explicitly include the gRPC-protobuf bridge (needed for protobuf descriptor registration of well-known types like Timestamp/Duration) - Add @maven//:io_grpc_grpc_protobuf to auth, proxy, and test BUILD.bazel deps (both main and test libraries) - Upgrade protobuf-java/protobuf-java-util from 3.20.1 to 3.21.7 to match grpc-protobuf:1.53.0's compile-time dependency, preventing NoSuchMethodError when proto-google-common-protos (compiled against 3.21.7) calls protobuf APIs not present in 3.20.1 Root cause: grpc-protobuf was not explicitly declared in WORKSPACE, so the gRPC-protobuf descriptor bridge was missing from the runtime classpath. Additionally, grpc-protobuf:1.53.0 and its transitive dep proto-google-common-protos were compiled against protobuf 3.21.7, but the pinned 3.20.1 (version_conflict_policy=pinned) caused forward- compatibility failures (NoSuchMethodError on TimestampProto.getDescriptor, VerifyError on Duration vs AbstractMessage).
1 parent ef0fb79 commit 97fce71

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ maven_install(
8383
"com.google.code.gson:gson:2.9.0",
8484
"com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2",
8585
"org.apache.rocketmq:rocketmq-proto:2.1.2",
86-
"com.google.protobuf:protobuf-java:3.20.1",
87-
"com.google.protobuf:protobuf-java-util:3.20.1",
86+
"com.google.protobuf:protobuf-java:3.21.7",
87+
"com.google.protobuf:protobuf-java-util:3.21.7",
8888
"com.conversantmedia:disruptor:1.2.10",
8989
"org.apache.tomcat:annotations-api:6.0.53",
9090
"com.google.code.findbugs:jsr305:3.0.2",

auth/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ java_library(
3232
"@maven//:org_slf4j_slf4j_api",
3333
"@maven//:com_github_ben_manes_caffeine_caffeine",
3434
"@maven//:io_grpc_grpc_api",
35+
"@maven//:io_grpc_grpc_protobuf",
3536
"@maven//:com_google_protobuf_protobuf_java",
3637
"@maven//:com_google_protobuf_protobuf_java_util",
3738
"@maven//:io_netty_netty_buffer",
@@ -68,6 +69,7 @@ java_library(
6869
"@maven//:org_slf4j_slf4j_api",
6970
"@maven//:com_github_ben_manes_caffeine_caffeine",
7071
"@maven//:io_grpc_grpc_api",
72+
"@maven//:io_grpc_grpc_protobuf",
7173
"@maven//:com_google_protobuf_protobuf_java",
7274
"@maven//:com_google_protobuf_protobuf_java_util",
7375
"@maven//:io_netty_netty_buffer",

proxy/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ java_library(
4242
"@maven//:commons_validator_commons_validator",
4343
"@maven//:io_grpc_grpc_api",
4444
"@maven//:io_grpc_grpc_context",
45+
"@maven//:io_grpc_grpc_protobuf",
4546
"@maven//:io_grpc_grpc_netty_shaded",
4647
"@maven//:io_grpc_grpc_services",
4748
"@maven//:io_grpc_grpc_stub",
@@ -104,6 +105,7 @@ java_library(
104105
"@maven//:com_google_protobuf_protobuf_java_util",
105106
"@maven//:io_grpc_grpc_api",
106107
"@maven//:io_grpc_grpc_context",
108+
"@maven//:io_grpc_grpc_protobuf",
107109
"@maven//:io_grpc_grpc_netty_shaded",
108110
"@maven//:io_grpc_grpc_stub",
109111
"@maven//:io_netty_netty_buffer",

test/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ java_library(
8484
"@maven//:com_google_truth_truth",
8585
"@maven//:io_grpc_grpc_api",
8686
"@maven//:io_grpc_grpc_context",
87+
"@maven//:io_grpc_grpc_protobuf",
8788
"@maven//:io_grpc_grpc_netty_shaded",
8889
"@maven//:io_grpc_grpc_stub",
8990
"@maven//:io_grpc_grpc_testing",

0 commit comments

Comments
 (0)