feat(python): support proto-only APIs#4075
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4075 +/- ##
==========================================
- Coverage 81.93% 81.90% -0.04%
==========================================
Files 78 78
Lines 6516 6516
==========================================
- Hits 5339 5337 -2
- Misses 832 833 +1
- Partials 345 346 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for 'proto-only' Python APIs, which are APIs that do not have a GAPIC client. The changes are well-structured and include comprehensive tests for the new functionality and error handling. A detailed security audit found no high-severity or critical vulnerabilities, specifically noting safe handling of command execution with exec.CommandContext for protoc and python3, secure path construction for .proto files using filepath.Join and filepath.Base, and robust data handling. My feedback includes a minor suggestion to improve error wrapping for better diagnostics.
7b65ab7 to
6af22c0
Compare
Adds handling for "proto-only" APIs (by which we mean APIs without a GAPIC library configured). These APIs: - Use the python and pyi protoc plugins, not gapic - Generate to a slightly different staging directory - Copy the .proto files as well as the generated code Fixes googleapis#3204.
6af22c0 to
8bfd87f
Compare
|
@JoeWang1127 I can separate this out into the generation code and then the migration code if necessary, but I thought it made sense to do all in one go. |
Adds handling for "proto-only" APIs (by which we mean APIs without a GAPIC library configured). These APIs:
This change configures these APIs during migration.
Fixes #3204.