Repository navigation
feat(storage): support DirectPath over Interconnect in GCS gRPC - #20561
Conversation
- Expose experimental.WithDirectPathXdsOverInterconnect() via storage/experimental and storage/internal - Support GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT env var override - Check DirectPath eligibility (GOOGLE_CLOUD_DISABLE_DIRECT_PATH, EnableDirectPath, EnableDirectPathXds, authentication, custom conn/client, and GDU host) in configureDirectPathInterconnectOptions before rewriting storage.googleapis.com to storage-direct.googleapis.com - Bypass GCE metadata server check in directPathDiagnostic when Interconnect is enabled [Generated-by: AI]
There was a problem hiding this comment.
Code Review
This pull request introduces support for DirectPath over Google Cloud Interconnect by adding the experimental option WithDirectPathXdsOverInterconnect and the environment variable GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT. When enabled, the gRPC client rewrites the storage endpoint from storage.googleapis.com to storage-direct.googleapis.com. Feedback on the changes includes a critical fix to import internaloption in storage/grpc_client.go to resolve a compilation error, and a recommendation to update prepareDirectPathMetadata to recognize the new storage-direct.googleapis.com host so that feature tracking headers are correctly sent.
- Remove configureDirectPathInterconnectOptions, rewriteHost, and isGoogleDefaultUniverseHost from storage/grpc_client.go - Wire internaloption.EnableDirectPathXdsOverInterconnect() directly in newGRPCStorageClient - Key directPathDiagnostic off isDirectPathXdsOverInterconnectEnabled(&cfg) [Generated-by: AI]
- Update authDiagnostic to accept interconnectEnabled flag - Share common unauthenticated and API key checks - Add unit test verifying API key rejection under Interconnect [Generated-by: AI]
cpriti-os
left a comment
There was a problem hiding this comment.
Thanks for putting this together, mostly good, a few comments inline.
[Generated-by: AI]
[Generated-by: AI]
cpriti-os
left a comment
There was a problem hiding this comment.
LGTM! Just two small nits:
- Please update the PR description before merging (remove the "Blocked on" note and update the summary to reflect the current helpers).
- One small test nit inline.
| if tc.envVal != nil { | ||
| t.Setenv(enableDirectPathXdsOverInterconnectEnvVar, *tc.envVal) | ||
| } else { | ||
| t.Setenv(enableDirectPathXdsOverInterconnectEnvVar, "") |
There was a problem hiding this comment.
Nit: when tc.envVal == nil, unset the env var (like in TestInterconnectRequested below) rather than setting it to "".
There was a problem hiding this comment.
Done
Co-authored by AI Agent
…hDiagnosticInterconnect Address reviewer nit by unsetting GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT when envVal is nil in TestDirectPathDiagnosticInterconnect, mirroring TestInterconnectRequested. [Generated-by: AI]
…ersion (#20718) `storage/go.mod` currently requires `cloud.google.com/go/auth v0.24.1-0.20261001053825-dbc26066f70a`, an untagged commit on `main` (introduced by #20561 alongside the DirectPath-over-Interconnect change). `auth/v0.24.1` has since been released and includes that commit, so this pins the released version instead. Why this matters before cutting `storage/v1.70.0` (#20636): - MVS would propagate the pseudo-version to every consumer of `storage` that doesn't already require `auth >= v0.24.1`, silently moving them onto an unreleased `auth` snapshot. - Observed in practice: the GCSFuse pre-release PR for this candidate (GoogleCloudPlatform/gcsfuse#5169) resolved to the pseudo-version (plus the associated `api`/`grpc` bumps), and its perf presubmit now fails with fio I/O errors on the PR branch while `master` (storage v1.69.0) passes. Still being bisected, but the release should not depend on an untagged `auth` commit regardless. No code changes; `go build ./...`, `go vet`, and `go test -short ./...` pass for `storage`, `storage/dataflux`, `storage/transfermanager`.
🤖 I have created a release *beep* *boop* --- ## [1.70.0](storage/v1.69.0...storage/v1.70.0) (2026-10-22) ### Features * **storage:** Add gcp.client.service attribute to trace spans ([#20686](#20686)) ([7b77906](7b77906)) * **storage:** Honor ChunkTransferTimeout in the gRPC Writer ([#20634](#20634)) ([df47d64](df47d64)) * **storage:** Plumb ChunkTransferTimeout and stall timeout error into gRPC Writer ([#20613](#20613)) ([82bb5c9](82bb5c9)) * **storage:** Support DirectPath over Interconnect in GCS gRPC ([#20561](#20561)) ([c0d53be](c0d53be)) * Update API sources and regenerate ([#20728](#20728)) ([ab1da9d](ab1da9d)) ### Bug Fixes * **storage:** Allow mid-stream retries once gRPC upload session is established ([#20612](#20612)) ([c74aee1](c74aee1)) * **storage:** Correct remaining bytes for gRPC bidi range reads ([#20619](#20619)) ([f9eec5d](f9eec5d)) * **storage:** Surface the last transport error from the gRPC Writer's ChunkRetryDeadline error ([#20637](#20637)) ([8f964fb](8f964fb)) ### Performance Improvements * **storage:** Rotate slow resumable BidiWriteObject streams using dynamicDelay ([#20662](#20662)) ([e366326](e366326)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Expose
experimental.WithDirectPathXdsOverInterconnect()and supportGOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECTenv var to enable DirectPath over Interconnect in GCS gRPC.Changes:
experimental.WithDirectPathXdsOverInterconnect()viastorage/experimentalGOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECTenvironment variable overrideinternaloption.EnableDirectPathXdsOverInterconnect()directly innewGRPCStorageClientdirectPathDiagnosticto support DirectPath over Interconnect and verify auth prerequisites (unauthenticated and API key checks)