Skip to content

chore(deps): upgrade protobuf to 37.0-rc1 - #14897

Draft
blakeli0 wants to merge 1 commit into
googleapis:mainfrom
blakeli0:chore/upgrade-protobuf-37.0-rc1
Draft

blakeli0 wants to merge 1 commit into
googleapis:mainfrom
blakeli0:chore/upgrade-protobuf-37.0-rc1

Conversation

@blakeli0

@blakeli0 blakeli0 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Draft PR to test upgrading Protobuf to 37.0-rc1 (4.37.0-RC1 Java runtime/BOM/protoc Maven artifacts and 37.0-rc1 protoc in librarian.yaml) across the monorepo.

Summary of Changes

  • sdk-platform-java/gapic-generator-java-pom-parent/pom.xml: Bump <protobuf.version> from 4.33.6 to 4.37.0-RC1.
  • sdk-platform-java/dependencies.txt: Bump upper-bound protobuf compatibility test version from 4.36.2 to 4.37.0-RC1.
  • google-auth-library-java/pom.xml: Bump <project.protobuf.version> from 4.33.6 to 4.37.0-RC1.
  • grpc-gcp-java/pom.xml: Bump <protobuf.version> from 4.33.6 to 4.37.0-RC1.
  • librarian.yaml & java-*/: Bump tools.protoc.version from 33.6 to 37.0-rc1 and regenerate all client libraries via librarian generate --all.

Issues Found During Local Verification

  1. Breaking cross-version protoc gencode change (InternalDescriptors) in 37.0-rc1

    • Upstream commit protocolbuffers/protobuf@ea0cc34313cb moved Java FileDescriptor initialization into <OuterClass>.InternalDescriptors.descriptor and changed SharedCodeGenerator::GenerateDescriptors to reference <DependencyOuterClass>.InternalDescriptors.descriptor instead of <DependencyOuterClass>.getDescriptor().
    • Impact: Compiling any .proto with protoc 37.0-rc1 that imports a .proto whose Java classes come from a pre-37.0 JAR fails with:
      error: cannot find symbol
        com.google.rpc.CodeProto.InternalDescriptors.descriptor,
                                ^
        symbol:   variable InternalDescriptors
        location: class com.google.rpc.CodeProto
      
    • Reproduction & ecosystem impact:
      • Building sdk-platform-java standalone (gapic-generator-java compiling service_config.proto via protobuf-maven-plugin) fails against published proto-google-common-protos:2.79.0 unless java-common-protos is regenerated with 37.0-rc1 and installed first (in root CI, .kokoro/common.sh builds in-repo java-common-protos in the same reactor).
      • Any downstream user upgrading to protoc 37.0 while depending on an existing proto-google-common-protos (or any other third-party proto JAR generated with protoc <= 36.2) will hit a Java compilation failure. (Note: the reverse direction—protoc <= 36.2 importing a 37.0-rc1 JAR—still compiles because getDescriptor() is still generated.)
  2. googleapis/librarian protoc RC release asset URL 404

    • librarian install constructs https://github.com/protocolbuffers/protobuf/releases/download/v37.0-rc1/protoc-37.0-rc1-linux-x86_64.zip using protoc.version in both the tag and filename.
    • However, protocolbuffers/protobuf names RC tags v37.0-rc1 (no hyphen before 1) while naming release zip assets protoc-37.0-rc-1-linux-x86_64.zip (with a hyphen before 1).
    • CI jobs that run librarian install (specifically the showcase matrix job in .github/workflows/showcase.yaml) will fail with HTTP 404 when downloading protoc.
  3. New GeneratedMessage runtime helpers in 4.37.0-RC1 gencode

    • In addition to RuntimeVersion.validateProtobufGencodeVersion(..., 4, 37, 0, "-rc1", ...), protoc 37.0-rc1 gencode calls new GeneratedMessage methods such as emptyList(Class) and wrapAndThrowParseException(...), strictly requiring protobuf-java >= 4.37.0-RC1 at both compile time and runtime.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant