Repository navigation
fix(storage): require gRPC >= 1.85 for DirectPath over Interconnect - #16556
Conversation
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
e3f0da0 to
e2718f6
Compare
DirectPathXdsOverInterconnectOptionconfigures the gRPC channel target asgoogle-c2p:///storage-direct.googleapis.com?force-xds. However, thegoogle-c2presolver only honors theforce-xdsquery parameter starting in gRPC 1.85.0 (grpc/grpc#42980). In gRPC <= 1.84, the resolver accepts the URI but ignoresforce-xds:storage-direct.googleapis.comvia DNS to public CloudPath (storage.googleapis.com).force-xdsbootstrap context, times out after ~15s waiting for the non-existent EDS resource, and falls back to CloudPath via RLS.In both cases,
LogChannelConfiguration()still reportstransport_type=DirectPathInterconnect.This PR guards
DirectPathXdsOverInterconnectOptionbehind a compile-time gRPC version check (GrpcForceXdsIsSupported(), modeled onGrpcEnableMetricsIsSafe()):DefaultOptionsGrpc(), only set the?force-xdsendpoint 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 preservingDirectPathXdsOverInterconnectOptioninOptions.LogChannelConfiguration(), emit aWARNINGidentifying the required and actual gRPC versions (grpc::Version()) when DirectPath over Interconnect is requested via the option or an explicit?force-xdsendpoint on gRPC < 1.85.0.DirectPathXdsOverInterconnectOption.