Skip to content

refactor(gax): extract transport policies to grpc_helpers#6024

Open
joshuatants wants to merge 1 commit into
googleapis:mainfrom
joshuatants:grpc-rust-helpers-extraction
Open

refactor(gax): extract transport policies to grpc_helpers#6024
joshuatants wants to merge 1 commit into
googleapis:mainfrom
joshuatants:grpc-rust-helpers-extraction

Conversation

@joshuatants

Copy link
Copy Markdown
Contributor

No description provided.

@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 refactors the Client struct to consolidate retry, backoff, and timeout policies into a new TransportPolicies struct, improving maintainability. It also introduces this struct in grpc_helpers.rs along with comprehensive tests. The reviewer suggested replacing .unwrap() calls with .expect() in the new tests to better align with the repository's style guide for error handling in test code.

Comment thread src/gax-internal/src/grpc/grpc_helpers.rs
@joshuatants joshuatants force-pushed the grpc-rust-helpers-extraction branch from e192391 to 4c6f202 Compare July 10, 2026 06:58
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (2e72e31) to head (4c6f202).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6024      +/-   ##
==========================================
+ Coverage   97.08%   97.09%   +0.01%     
==========================================
  Files         244      244              
  Lines       61351    61488     +137     
==========================================
+ Hits        59560    59703     +143     
+ Misses       1791     1785       -6     

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

@joshuatants joshuatants marked this pull request as ready for review July 10, 2026 07:24
@joshuatants joshuatants requested a review from a team as a code owner July 10, 2026 07:24
Ok(headers)
}

/// Policies governing gRPC client transport behaviors.

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.

Consider a separate module for this... Generic "helper" or "utils" modules tend to get bloated over time, better to fight the problem as early as possible.

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.

2 participants