Skip to content

impl(gaxi): generate descriptor conversions - #7324

Merged
haphungw merged 2 commits into
googleapis:mainfrom
haphungw:impl-gaxi-generate-descriptor
Oct 29, 2026
Merged

haphungw merged 2 commits into
googleapis:mainfrom
haphungw:impl-gaxi-generate-descriptor

Conversation

@haphungw

Copy link
Copy Markdown
Contributor

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.yaml skips 46 ids: 26 are fields and types that prost-types lacks, because it was built from an older descriptor.proto; the rest are types DescriptorProto never uses, oneof fields, and uninterpreted options. The list only changes when we bump protobuf or prost-types.

Fixes #6616

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

Copy link
Copy Markdown
Contributor

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 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.

@haphungw
haphungw marked this pull request as ready for review October 29, 2026 02:45
@haphungw
haphungw requested review from a team as code owners October 29, 2026 02:45
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.56%. Comparing base (e928eef) to head (b0a1124).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

haphungw added a commit to googleapis/librarian that referenced this pull request Oct 29, 2026
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
@haphungw
haphungw force-pushed the impl-gaxi-generate-descriptor branch from 82c431b to b0a1124 Compare October 29, 2026 10:40
@haphungw
haphungw merged commit 492ce87 into googleapis:main Oct 29, 2026
43 checks passed
@haphungw
haphungw deleted the impl-gaxi-generate-descriptor branch October 29, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate FromProto and ToProto conversions for wkt::DescriptorProto

2 participants