Skip to content

fix(storage): require gRPC >= 1.85 for DirectPath over Interconnect - #16556

Merged
kalragauri merged 3 commits into
googleapis:mainfrom
kalragauri:feat/dp-grpc-version-guard
Oct 13, 2026
Merged

kalragauri merged 3 commits into
googleapis:mainfrom
kalragauri:feat/dp-grpc-version-guard

Conversation

@kalragauri

Copy link
Copy Markdown
Contributor

DirectPathXdsOverInterconnectOption configures the gRPC channel target as google-c2p:///storage-direct.googleapis.com?force-xds. However, the google-c2p resolver only honors the force-xds query parameter starting in gRPC 1.85.0 (grpc/grpc#42980). In gRPC <= 1.84, the resolver accepts the URI but ignores force-xds:

  • Off-GCE, the channel skips xDS and resolves storage-direct.googleapis.com via DNS to public CloudPath (storage.googleapis.com).
  • On GCE, the channel enters xDS without the force-xds bootstrap context, times out after ~15s waiting for the non-existent EDS resource, and falls back to CloudPath via RLS.

In both cases, LogChannelConfiguration() still reports transport_type=DirectPathInterconnect.

This PR guards DirectPathXdsOverInterconnectOption behind a compile-time gRPC version check (GrpcForceXdsIsSupported(), modeled on GrpcEnableMetricsIsSafe()):

  • In DefaultOptionsGrpc(), only set the ?force-xds endpoint when the linked gRPC version is >= 1.85.0. On older gRPC versions, fall back to the standard endpoint defaults (DirectPath on GCE, CloudPath off-GCE) while preserving DirectPathXdsOverInterconnectOption in Options.
  • In LogChannelConfiguration(), emit a WARNING identifying the required and actual gRPC versions (grpc::Version()) when DirectPath over Interconnect is requested via the option or an explicit ?force-xds endpoint on gRPC < 1.85.0.
  • Document the gRPC >= 1.85.0 requirement on DirectPathXdsOverInterconnectOption.

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Oct 9, 2026

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

Copy link
Copy Markdown

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 compatibility checks for DirectPath over Interconnect, which requires gRPC 1.85.0 or later to support the 'force-xds' parameter. It adds overloads to DefaultOptionsGrpc and LogChannelConfiguration to handle cases where the gRPC version is older, falling back to standard defaults and logging a warning. Comprehensive unit tests have been added to verify these behaviors. There are no review comments to address, and the changes conform to the repository's style guidelines.

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.38%. Comparing base (68190fe) to head (469be99).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #16556    +/-   ##
========================================
  Coverage   92.38%   92.38%            
========================================
  Files        2265     2265            
  Lines      219107   219212   +105     
========================================
+ Hits       202416   202528   +112     
+ Misses      16691    16684     -7     

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

@kalragauri
kalragauri force-pushed the feat/dp-grpc-version-guard branch from e3f0da0 to e2718f6 Compare October 9, 2026 10:45
@kalragauri
kalragauri marked this pull request as ready for review October 9, 2026 10:46
@kalragauri
kalragauri requested review from a team as code owners October 9, 2026 10:46
@kalragauri
kalragauri requested a review from v-pratap October 9, 2026 10:46
Comment thread google/cloud/storage/internal/grpc/channel_telemetry.cc
@kalragauri
kalragauri merged commit 61709d3 into googleapis:main Oct 13, 2026
71 checks passed
@kalragauri
kalragauri deleted the feat/dp-grpc-version-guard branch October 14, 2026 07:11

This branch was successfully deployed

1 active deployment
false — 469be992 Deployed Oct 13, 2026 by kalragauri via Save PR ref #12408
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants