feat(sidekick/rust): generate resource name with tracing and heuristics configs#4560
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4560 +/- ##
=======================================
Coverage 79.34% 79.35%
=======================================
Files 110 110
Lines 9181 9185 +4
=======================================
+ Hits 7285 7289 +4
Misses 1387 1387
Partials 509 509 ☔ 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 a significant and beneficial refactoring of the resource name generation logic for Rust clients, primarily for tracing purposes. The previous approach of finding candidate fields has been replaced with a more direct and simplified method that leverages the TargetResource. Additionally, the introduction of explicit type annotations in the Rust templates is a good step towards improving code clarity and maintainability. I have one minor suggestion to make a piece of the new Rust code more idiomatic.
internal/sidekick/rust/templates/grpc-client/transport.rs.mustache
Outdated
Show resolved
Hide resolved
internal/sidekick/rust/templates/crate/src/transport.rs.mustache
Outdated
Show resolved
Hide resolved
8754c03 to
257f3bd
Compare
coryan
left a comment
There was a problem hiding this comment.
A few minor (I hope changes).
649a2ff to
58d0a25
Compare
coryan
left a comment
There was a problem hiding this comment.
Please fix the other Has* field you are introducing and then merge.
… for tracing and heuristics
…cs configs Fix generator to dynamically add extensions without Option bindings compiler errors
c108326 to
8523318
Compare
This PR groups together many PRs required for the Rust code generation, specifically ensuring that resource names and path templates are computed correctly when generating client libraries.