Conversation
Summary of ChangesHello, 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 streamlines the project's testing infrastructure by eliminating support for the 'cpp' protobuf implementation backend. This change is a direct consequence of updating the minimum required Protobuf version to 4.x, which is incompatible with the 'cpp' backend. By removing the outdated test configurations and associated logic, the PR simplifies the test suite and ensures that all tests run against currently supported protobuf implementations, improving maintainability and relevance. Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request aims to remove tests for the cpp protobuf backend, which is the correct approach after upgrading to Protobuf 4.x. The changes are on the right track, but there are two issues to address:
- Incomplete Removal: The
cppimplementation is removed from theunittest session, but it's still present in theprerelease_depssession in the template filegapic/templates/noxfile.py.j2. This should also be removed for consistency. - Manual Edit of Generated Files: The "golden" files under
tests/integration/goldens/have been edited manually. The repository's guidelines require that changes to generated files are made by updating the template and then regenerating the files.
To fix this, please update gapic/templates/noxfile.py.j2 to remove the cpp backend from all relevant test sessions, and then regenerate the golden files.
| @nox.parametrize( | ||
| "protobuf_implementation", | ||
| ["python", "upb", "cpp"], | ||
| ["python", "upb"], |
There was a problem hiding this comment.
This appears to be a generated "golden" file. According to the repository's general rules, changes to generated code should be made by updating the generator template (gapic/templates/noxfile.py.j2) and then regenerating the output files, rather than editing them manually. Please revert the manual changes to the golden files, update the template completely, and then regenerate them.
References
- Changes to generated code should be made by updating the generator template and then regenerating the output files, rather than directly modifying the generated files.
PR #2502 updated the minimum version of Protobuf to 4.x.
The
cppprotobuf implementation backend is only supported with Protobuf 3.x, so we can remove it from tests.https://github.com/protocolbuffers/protobuf/tree/main/python#implementation-backends
Fixes #2388