feat(internal/sidekick/rust): support default_transport configuration - #7503
Merged
Merged
Conversation
Contributor
Author
|
Regenerate bigquery-read with the new config: googleapis/google-cloud-rust#6654 |
suzmue
force-pushed
the
default-transport
branch
from
September 3, 2026 23:51
e991aef to
9c0af81
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for a default_transport configuration option in the Rust generator, allowing unary methods to default to "grpc" instead of "http". It updates the configuration schema, Go structs, codec logic, and mustache templates to generate unary gRPC methods and their associated LRO conversion functions. The review feedback highlights critical compilation issues in the updated transport.rs.mustache template, specifically regarding the handling of nil PathInfo values and potential double-prefixing of external output and LRO types.
suzmue
marked this pull request as draft
September 4, 2026 00:30
Contributor
Author
|
I need to think about LROs (or skip them for this PR). |
Add the default_transport configuration option ("grpc" | "http") to RustDefault and RustModule in librarian config and sidekick codec.
When default_transport is set to "grpc", unary methods in default crate templates route through gRPC via self.grpc_inner.execute instead of HTTP REST. All request/response types for unary gRPC methods are included in prost hybrid generation and converted using ToProto/FromProto.
…fo is missing in unary gRPC
suzmue
force-pushed
the
default-transport
branch
from
September 8, 2026 21:40
02ba070 to
2c6033c
Compare
suzmue
marked this pull request as ready for review
September 8, 2026 21:46
haphungw
approved these changes
Sep 8, 2026
JoeWang1127
pushed a commit
that referenced
this pull request
Sep 14, 2026
🤖 I have created a release *beep* *boop* --- ## [0.43.0](v0.42.0...v0.43.0) (2026-09-14) ### Features * **internal/config:** add comment field to configuration schema ([#7539](#7539)) ([b1deabc](b1deabc)) * **internal/config:** add NodejsDefault with custom_scopes ([#7525](#7525)) ([f0fd2d4](f0fd2d4)) * **internal/config:** rename custom_scopes to custom_package_prefixes ([#7536](#7536)) ([8b73142](8b73142)) * **internal/librarian/nodejs:** derive package name from custom prefixes ([#7553](#7553)) ([f877089](f877089)) * **internal/librarian/nodejs:** support excluding protos from generation ([#7574](#7574)) ([fd91f7a](fd91f7a)), refs [#7217](#7217) * **internal/sidekick/rust:** support default_transport configuration ([#7503](#7503)) ([5480d3f](5480d3f)) * **internal/tool/pip:** force reinstall git packages ([#7538](#7538)) ([2bf3435](2bf3435)) * **sidekick/rust:** allow fields to be renamed on BigQuery template ([#7563](#7563)) ([6fc6200](6fc6200)) * **sidekick/rust:** allow fields to be renamed with name_overrides ([#7562](#7562)) ([1ee6462](1ee6462)) * **sidekick/rust:** support unified idempotency_hook configuration ([#7523](#7523)) ([4a95ea9](4a95ea9)) * **sidekick/swift:** pass request options to newRequest ([#7573](#7573)) ([92b5ee5](92b5ee5)) * **sidekick/swift:** rename DocC landing page ([#7557](#7557)) ([9f72f4f](9f72f4f)) * **sidekick/swift:** Storage Control retry policy ([#7529](#7529)) ([efaf46c](efaf46c)) * **sidekick/swift:** use `setBody()` helper ([#7561](#7561)) ([d8392c2](d8392c2)) * **swift:** add convenience methods without options to StorageControlProtocol ([#7537](#7537)) ([a7e2bb7](a7e2bb7)) * **swift:** generate LRO polling helpers for StorageControl ([#7560](#7560)) ([fedb08b](fedb08b)) ### Bug Fixes * **.github/workflows:** trigger issue creation on go integration failure ([#7554](#7554)) ([ced1712](ced1712)), refs [#7484](#7484) * **internal/librarian/ruby:** omit copyright_year from librarian.yaml ([#7542](#7542)) ([65f3767](65f3767)) * **internal/postprocessing:** add support of copy_and_rename as method_operations ([#7555](#7555)) ([b10b439](b10b439)) * **rust:** avoid use conflicts in setter samples ([#7548](#7548)) ([4c72bcc](4c72bcc)) * **sidekick/swift:** normalize monorepo root to forward slashes ([#7566](#7566)) ([d6d0250](d6d0250)) * **sidekick/swift:** serialize enums as strings in ProtoJSON ([#7569](#7569)) ([fafac18](fafac18)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the default_transport configuration option ("grpc" | "http") to RustDefault and RustModule in librarian config and sidekick codec.
When default_transport is set to "grpc", unary methods in default crate templates route through gRPC via self.grpc_inner.execute instead of HTTP REST. All request/response types for unary gRPC methods are included in prost hybrid generation and converted using ToProto/FromProto. For this PR, we skip LRO generation on the default template. This is incomplete in other ways, our grpc conversions can add references to external types, which we need to add to the Cargo.toml. For the most part, the intent is to support this for our veneers, which have a handwritten Cargo.toml and do not encounter this issue.
This also adds the librarian side changes to update the used by packages to reference "grpc" instead of "streaming".
For googleapis/google-cloud-rust#6470