Skip to content

feat: making direct-path verification non-fatal until dummy-stat calls becomes reliable#4628

Merged
raj-prince merged 7 commits into
masterfrom
rapid_no_fallback
Apr 17, 2026
Merged

feat: making direct-path verification non-fatal until dummy-stat calls becomes reliable#4628
raj-prince merged 7 commits into
masterfrom
rapid_no_fallback

Conversation

@raj-prince

@raj-prince raj-prince commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Making direct-path verification (during mount) non-fatal to stop mount failure because of unreliable dummy-stat calls. We may need to increase overall timeout with stall support to make the dummy-stat call reliable.
  • Removing the ctx-timeout while client creation, given it's necessary for grpc traffic and we don't want to fail because of delay in client creation.

Link to the issue in case of a bug fix.

b/503303141

Testing details

  1. Manual - Yes, verified manually. (a) grpc with error in dummy-stat (b) rapid with error in dummy-stat (c) grpc with success in dummy-stat (d) rapid with success in dummy-stat
  2. Unit tests - NA
  3. Integration tests - NA

Any backward incompatible change? If so, please explain.

@raj-prince raj-prince requested a review from a team as a code owner April 16, 2026 15:15
@raj-prince raj-prince requested a review from geertj April 16, 2026 15:15
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Apr 16, 2026
@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 introduces a mechanism to bypass DirectPath enforcement and verification during gRPC client creation. By allowing this skip, the system avoids strict timeout failures in environments where token retrieval is slow, specifically benefiting zonal buckets that lack an HTTP fallback path.

Highlights

  • Parameter Addition: Added a skipDirectPathEnforcement parameter to createGRPCClientHandle to allow conditional skipping of DirectPath logic.
  • Logic Refactoring: Updated client creation to bypass DirectPath enforcement, timeout constraints, and connectivity verification when skipDirectPathEnforcement is enabled.
  • Zonal Bucket Support: Configured zonal buckets to utilize the new parameter, preventing mount failures caused by token fetch timeouts.
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 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 counter productive. 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.

@raj-prince raj-prince changed the title feat: add skipDirectPathEnforcement parameter to createGRPCClientHand… feat: skipping direct-path enforcement for zonal bucket Apr 16, 2026
@raj-prince raj-prince changed the title feat: skipping direct-path enforcement for zonal bucket feat: skipping direct-path enforcement for rapid bucket Apr 16, 2026

@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 introduces a skipDirectPathEnforcement parameter to the createGRPCClientHandle function, allowing the gRPC client to be created without enforcing DirectPath connectivity or performing verification. This functionality is utilized for zonal buckets. A review comment suggests removing a redundant else block in the error handling logic to follow standard Go idioms.

Comment thread internal/storage/storage_handle.go Outdated
@codecov

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.66%. Comparing base (8b35120) to head (cc94fa9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/storage/storage_handle.go 80.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4628       +/-   ##
===========================================
+ Coverage        0   83.66%   +83.66%     
===========================================
  Files           0      164      +164     
  Lines           0    20278    +20278     
===========================================
+ Hits            0    16966    +16966     
- Misses          0     2673     +2673     
- Partials        0      639      +639     
Flag Coverage Δ
unittests 83.66% <80.00%> (?)

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.

@raj-prince raj-prince requested review from abhishek10004 and removed request for geertj April 17, 2026 03:47
@raj-prince raj-prince requested a review from meet2mky as a code owner April 17, 2026 05:43
Comment thread internal/storage/storage_handle.go Outdated
@raj-prince raj-prince changed the title feat: skipping direct-path enforcement for rapid bucket feat: making direct-path verification non-fatal until dummy-stat calls becomes reliable Apr 17, 2026
@raj-prince raj-prince added execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. labels Apr 17, 2026
Comment thread internal/storage/storage_handle.go
Comment thread internal/storage/storage_handle.go Outdated
abhishek10004
abhishek10004 previously approved these changes Apr 17, 2026

@abhishek10004 abhishek10004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left a minor comment.

@abhishek10004 abhishek10004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raj-prince raj-prince removed execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. labels Apr 17, 2026
@raj-prince raj-prince merged commit 83be2aa into master Apr 17, 2026
14 checks passed
PranjalC100 pushed a commit that referenced this pull request Apr 24, 2026
…s becomes reliable (#4628)

* feat: add skipDirectPathEnforcement parameter to createGRPCClientHandle to allow conditional DirectPath enforcement

* chore: increase directPathDetectionTimeout from 10 seconds to 5 minutes

* simplifying a bit

* making direct-path verification non-fatal

* removing the timeout from the client creation

* minor change

* removing empty line
PranjalC100 added a commit that referenced this pull request Apr 29, 2026
* feat: making direct-path verification non-fatal until dummy-stat calls becomes reliable (#4628)

* feat: add skipDirectPathEnforcement parameter to createGRPCClientHandle to allow conditional DirectPath enforcement

* chore: increase directPathDetectionTimeout from 10 seconds to 5 minutes

* simplifying a bit

* making direct-path verification non-fatal

* removing the timeout from the client creation

* minor change

* removing empty line

* fix(buffered_reader): Fixing a memory leak in buffered reader (#4638)

Fixes a memory leak in the buffered reader code during multi-block reads. Previously, if an initial block downloaded successfully but a later block failed (triggering a fallback), the reference counts on the successfully downloaded blocks were never decremented. This PR addresses the leak by catching gcsx.FallbackToAnotherReader errors and calling a new releaseInflightBlocks helper to immediately invoke callbacks and release references for any in-flight blocks.

* fix(direct path verification): Updating direct path enforcement strategy (#4635)

Updating the direct path enforcement strategy:

- For zonal buckets, log direct path verification status but do not block client creation on it
- For non-zonal buckets, block grpc client creation on direct path verification status. In case of failure in detecting direct path status, fallback to http client would happen based on the set grpc-strategy

Also, updated the timeout to 15 seconds for direct path verification.

* feat(dp-check): removing older cp check utility (#4494)

* feat(dp-check): removing older cp check utility

* validation package is already disabled hence removing the skip

---------

Co-authored-by: Prince Kumar <princer@google.com>
Co-authored-by: Abhishek Gupta <abhishekmgupta@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants