feat: generate all bidi and server streaming methods - #6570
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several Google Cloud Rust SDK clients to support new streaming and bidirectional streaming methods, adding necessary dependencies, client methods, stubs, and conversion logic. Feedback on these changes identifies critical issues: unresolved intra-doc links in the generated documentation for datacatalog/lineage/v1 that could cause build failures; missing transport layer implementations in transport.rs for aiplatform/v1, dialogflow/v2, and discoveryengine/v1 that will cause runtime failures; and a serialization bug in biglake/hive/v1's transport that prepends an incorrect leading & to the routing header parameters.
| /// This method also returns processes that created the links if explicitly | ||
| /// requested by setting | ||
| /// [max_process_per_link](google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link) | ||
| /// is non-zero and full process details are requested via |
There was a problem hiding this comment.
The generated documentation contains an unresolved intra-doc link: [max_process_per_link](google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link). Since google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link is a protobuf path and not a valid Rust path, rustdoc will fail to resolve it, causing build failures in CI environments that enforce #![deny(warnings)] or -D warnings.
As this is a generated file, this issue should be fixed in the generator (e.g., by rendering it as a plain code span or providing a proper intra-doc link mapping to the Rust type).
References
- Always verify that Rust documentation compiles without warnings (e.g., by running
cargo doc) before merging, because rustdoc warnings (such as bare URLs or unresolved links) will fail CI builds that enforce -D warnings.
| let x_goog_request_params = [Some(&req) | ||
| .map(|m| &m.parent) | ||
| .map(|s| s.as_str()) | ||
| .map(|v| format!("parent={v}"))] | ||
| .into_iter() | ||
| .flatten() | ||
| .fold(String::new(), |b, p| b + "&" + &p); |
There was a problem hiding this comment.
The generator constructs x_goog_request_params using fold(String::new(), |b, p| b + "&" + &p). For a single parameter (or the first parameter), this results in a leading & (e.g., &parent=...). While some routing proxies might tolerate this, strict parsers may fail to parse the routing header correctly.
A cleaner approach in the generator would be to collect the parameters and use .join("&"), or adjust the fold accumulator to avoid prepending & to the first element. Since this is a generated file, this change should be applied to the generator.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6570 +/- ##
==========================================
- Coverage 96.52% 96.51% -0.01%
==========================================
Files 304 304
Lines 87969 87969
==========================================
- Hits 84908 84905 -3
- Misses 3061 3064 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This change switches the bidi and server streaming methods on for most crates. Generation is skipped for crates that use types that have unsupported Any and for grpc-client crates since these are in our veneers and we may want to take more care about whether we intend to expose these types.
For #2318