Repository navigation
impl(gaxi): generate descriptor conversions - #7324
Conversation
There was a problem hiding this comment.
Code Review
This pull request automates the generation of protobuf well-known type conversions by adding configuration to librarian.yaml and generating the convert.rs file for google.protobuf types. Consequently, the manual, incomplete implementations of FromProto and ToProto for DescriptorProto in src/gax-internal/src/prost.rs have been removed, and the test suite has been updated to verify the new generated conversions. No review comments were provided, and the changes conform to the repository standards.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7324 +/- ##
==========================================
- Coverage 97.57% 97.56% -0.01%
==========================================
Files 332 332
Lines 141873 141875 +2
==========================================
- Hits 138430 138422 -8
- Misses 3443 3453 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Convert the fields marked in #7865: zero becomes `None` and `None` becomes zero, which matches how the model already treats zero as `_not set_`. Fields where that is wrong (like `oneof_index`) must be skipped. No changes to existing generated code. Staged @ googleapis/google-cloud-rust#7324 For googleapis/google-cloud-rust#6616
82c431b to
b0a1124
Compare
The BigQuery Storage Write API sends the row schema as a
DescriptorProto, and our hand-written conversion to prost drops parts of the schema. Generating the conversion keeps that data and replaces about 100 lines of hand-written mapping.librarian.yamlskips 46 ids: 26 are fields and types that prost-types lacks, because it was built from an olderdescriptor.proto; the rest are typesDescriptorProtonever uses,oneoffields, and uninterpreted options. The list only changes when we bumpprotobuforprost-types.Fixes #6616