Skip to content

Conversation

@blakeli0
Copy link
Contributor

@blakeli0 blakeli0 commented Dec 4, 2025

Protobuf-java v4.33 restored gen code compatibility to 3.0.0. Upgrade protobuf runtime and gen code to 4.33 should have minimum risks now.
See go/cloud-java:protobuf-4.x-upgrade for details.

@product-auto-label product-auto-label bot added the size: xl Pull request size is extra large. label Dec 4, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @blakeli0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a significant infrastructure update by upgrading the project's Protobuf runtime and generated code to version 4.33.0. This ensures compatibility with the latest Protobuf features and improvements, requiring changes across Docker build configurations, Maven dependencies, and a comprehensive regeneration of Java common proto files to reflect the new version's API and internal structure.

Highlights

  • Protobuf Version Upgrade: The core change involves upgrading the Protobuf runtime and generated code to version 4.33.0. This affects both the PROTOC_VERSION used in Docker builds and the protobuf.version dependency in the Maven pom.xml.
  • Generated Code Regeneration: Numerous Java common protos have been regenerated to align with Protobuf 4.33.0. This includes updates to base classes, removal of deprecated methods, and adjustments to internal Protobuf API calls within the generated files.
  • Build Configuration Updates: Dockerfiles for library generation have been updated to use PROTOC_VERSION=33.0. Additionally, the pom.xml now includes a clirr.skip property to bypass compatibility checks during the protobuf 4.x upgrade.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the protobuf runtime and generated code to version 4.33.0. The changes primarily involve updating version numbers in configuration files and regenerating a large number of Java source files to be compatible with the new protobuf version. A key change is the temporary disabling of the clirr check for binary compatibility, which is understandable for a major version upgrade but should be addressed. I've also noted a potential version mismatch in the Dockerfiles that should be verified.


ARG OWLBOT_CLI_COMMITTISH=3a68a9c0de318784b3aefadcc502a6521b3f1bc5
ARG PROTOC_VERSION=25.8
ARG PROTOC_VERSION=33.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PROTOC_VERSION is being updated to 33.0. This seems inconsistent with the protobuf version 4.33.0 being set in gapic-generator-java-pom-parent/pom.xml. Please verify if this is the correct version for the protoc compiler corresponding to the 4.33.0 Java runtime.


ARG OWLBOT_CLI_COMMITTISH=3a68a9c0de318784b3aefadcc502a6521b3f1bc5
ARG PROTOC_VERSION=25.8
ARG PROTOC_VERSION=33.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the other Dockerfile, the PROTOC_VERSION is set to 33.0, which appears inconsistent with the protobuf Java version 4.33.0 used in the project. Please double-check that this is the intended version for the protoc compiler.

Comment on lines +43 to +44
<!-- skipping clirr check for protobuf 4.x upgrade -->
<clirr.skip>true</clirr.skip>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While skipping the clirr check is necessary for a major version upgrade with known breaking changes, it's a good practice to create a follow-up issue to re-enable this check and address any binary incompatibilities introduced by the protobuf upgrade. This ensures that binary compatibility is tracked and managed going forward.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
18.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@blakeli0 blakeli0 merged commit ac25015 into protobuf-4.x-rc Dec 5, 2025
50 of 55 checks passed
@blakeli0 blakeli0 deleted the protobuf-4.x-test-upgrade branch December 5, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants