Skip to content

fix(retry): add Unauthenticated to retryable gRPC status codes to handle transient token expiration in storage control client#4746

Merged
meet2mky merged 2 commits into
masterfrom
fix-access-token-issue
Jun 1, 2026
Merged

fix(retry): add Unauthenticated to retryable gRPC status codes to handle transient token expiration in storage control client#4746
meet2mky merged 2 commits into
masterfrom
fix-access-token-issue

Conversation

@meet2mky
Copy link
Copy Markdown
Collaborator

@meet2mky meet2mky commented Jun 1, 2026

Description

This PR adds support for retrying gRPC Unauthenticated errors in the Storage Control Client to handle transient credential/token expirations. It also aligns the documentation and code comments across different retry mechanism.

Link to the issue in case of a bug fix.

b/517636259

Testing details

  1. Manual - Yes
  2. Unit tests - Yes
  3. Integration tests - Part of pre-submit

Any backward incompatible change? If so, please explain.

NONE

…nsient token expiration in storage control client
@meet2mky meet2mky requested a review from a team as a code owner June 1, 2026 10:06
@meet2mky meet2mky requested a review from kislaykishore June 1, 2026 10:06
@meet2mky meet2mky added execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. labels Jun 1, 2026
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Jun 1, 2026
@meet2mky meet2mky requested a review from raj-prince June 1, 2026 10:06
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the resilience of the Storage Control Client by enabling retries for gRPC Unauthenticated errors. This change ensures that transient token expiration issues are handled gracefully, reducing potential service disruptions. Additionally, the PR standardizes documentation and adds comprehensive test coverage to ensure the new retry behavior functions as expected.

Highlights

  • Retry Logic Update: Added codes.Unauthenticated to the list of retryable gRPC status codes in the Storage Control Client to handle transient credential and token expiration issues.
  • Documentation and Tracking: Updated code comments and TODOs with specific bug tracking references (b/518674297) to align documentation across retry mechanisms.
  • Testing: Added a new unit test to verify that Unauthenticated errors are correctly identified as retryable by the control client.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

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 adds codes.Unauthenticated to the list of retryable gRPC status codes in both the storage control client wrapper and the integration test client options, accompanied by TODO comments referencing bug b/518674297. Additionally, it introduces a unit test to verify that unauthenticated errors are retryable and updates existing TODO comments in custom_retry.go to include the bug reference. There are no review comments, and I have no feedback to provide.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.72%. Comparing base (da692a3) to head (072a76f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4746      +/-   ##
==========================================
+ Coverage   83.64%   83.72%   +0.07%     
==========================================
  Files         168      168              
  Lines       20775    20776       +1     
==========================================
+ Hits        17378    17395      +17     
+ Misses       2750     2736      -14     
+ Partials      647      645       -2     
Flag Coverage Δ
unittests 83.72% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread internal/storage/control_client_wrapper_test.go
raj-prince
raj-prince previously approved these changes Jun 1, 2026
Comment thread internal/storage/control_client_wrapper_test.go Outdated
Comment thread internal/storage/control_client_wrapper_test.go
@meet2mky meet2mky merged commit be3fe87 into master Jun 1, 2026
18 checks passed
@meet2mky meet2mky deleted the fix-access-token-issue branch June 2, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants