Skip to content

Conversation

@rahul2393
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

@rahul2393 rahul2393 requested review from a team as code owners January 8, 2026 15:15
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Jan 8, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @rahul2393, 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 introduces necessary Clirr exemptions across several Google Cloud Spanner proto modules. These changes are crucial for maintaining API compatibility checks following an upgrade to Protobuf 4.27.4+ runtime. By ignoring specific structural and signature changes in the generated Protobuf code, the project can seamlessly integrate the newer Protobuf version without triggering false positives in the API compatibility reports, ensuring a smooth transition and continued stability.

Highlights

  • Clirr Exemptions for Protobuf 4.27.4+ Runtime: Added a comprehensive set of Clirr exemptions to accommodate changes introduced by the Protobuf 4.27.4+ runtime upgrade. These exemptions prevent API compatibility checks from failing due to expected changes in generated code.
  • Superclass Hierarchy Changes (5001): Exemptions were added for Clirr difference type 5001, which addresses the removal of GeneratedMessage and GeneratedMessage$Builder from the superclass hierarchy of generated Protobuf classes.
  • Method Signature Changes (7005, 7006, 7014): New exemptions cover parameter type changes for newBuilderForType(*) (7005), return type changes for internalGetFieldAccessorTable() (7006), and instances where the getDescriptor() method was made final (7014).
  • Affected Modules: These Clirr exemptions have been applied to the clirr-ignored-differences.xml files within the proto-google-cloud-spanner-admin-database-v1, proto-google-cloud-spanner-admin-instance-v1, proto-google-cloud-spanner-executor-v1, and proto-google-cloud-spanner-v1 modules.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

@rahul2393 rahul2393 requested a review from olavloite January 8, 2026 15:16
Copy link

@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 adds Clirr exemptions to handle binary incompatibilities introduced by upgrading to Protobuf 4.27.4+. The changes are applied consistently across four modules. I've suggested a simplification for the exemptions of difference type 5001 to improve maintainability by using a broader wildcard pattern, which is already in use for other exemptions in the same files. This would make the configuration more concise and easier to manage.

Comment on lines +22 to +56
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$Builder</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*$Builder</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*$*</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*$*$Builder</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*Proto</className>
<to>com/google/protobuf/GeneratedFile</to>
</difference>

Choose a reason for hiding this comment

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

medium

The exemptions for difference type 5001 can be significantly simplified. The current patterns for different nesting levels of protobuf messages and builders are verbose and could be hard to maintain. Since the ** wildcard is already used for other difference types in this file, it can be used here to cover all classes within the package, including nested ones. This will make the configuration more concise and easier to manage across the different modules.

The same simplification can be applied to the other clirr-ignored-differences.xml files in this PR.

Suggested change
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$Builder</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*$Builder</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*$*</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*$*$*$Builder</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*Proto</className>
<to>com/google/protobuf/GeneratedFile</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/**</className>
<to>com/google/protobuf/GeneratedMessage</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/**</className>
<to>com/google/protobuf/GeneratedMessage$Builder</to>
</difference>
<difference>
<differenceType>5001</differenceType>
<className>com/google/spanner/admin/database/v1/*Proto</className>
<to>com/google/protobuf/GeneratedFile</to>
</difference>

@rahul2393 rahul2393 merged commit 3ad105a into main Jan 8, 2026
46 of 47 checks passed
@rahul2393 rahul2393 deleted the clirr-fix branch January 8, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants