Skip to content

feat(storage): support DirectPath over Interconnect in GCS gRPC - #20561

Merged
nidhiii-27 merged 6 commits into
mainfrom
feat/storage-directpath-interconnect-storage
Oct 15, 2026
Merged

nidhiii-27 merged 6 commits into
mainfrom
feat/storage-directpath-interconnect-storage

Conversation

@nidhiii-27

@nidhiii-27 nidhiii-27 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Expose experimental.WithDirectPathXdsOverInterconnect() and support GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT env var to enable DirectPath over Interconnect in GCS gRPC.

Changes:

  • Expose experimental.WithDirectPathXdsOverInterconnect() via storage/experimental
  • Support GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT environment variable override
  • Wire internaloption.EnableDirectPathXdsOverInterconnect() directly in newGRPCStorageClient
  • Update directPathDiagnostic to support DirectPath over Interconnect and verify auth prerequisites (unauthenticated and API key checks)

- 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]

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

Comment thread storage/grpc_client.go Resolved
Comment thread storage/grpc_client_test.go Resolved
- Remove configureDirectPathInterconnectOptions, rewriteHost, and isGoogleDefaultUniverseHost from storage/grpc_client.go
- Wire internaloption.EnableDirectPathXdsOverInterconnect() directly in newGRPCStorageClient
- Key directPathDiagnostic off isDirectPathXdsOverInterconnectEnabled(&cfg)

[Generated-by: AI]
Comment thread storage/grpc_dp_diag.go Resolved
- 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 cpriti-os 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.

Thanks for putting this together, mostly good, a few comments inline.

Comment thread storage/grpc_client.go Resolved
Comment thread storage/grpc_client.go Resolved
Comment thread storage/grpc_client.go Resolved
Comment thread storage/option.go Resolved
Comment thread storage/grpc_dp_diag.go Resolved
Comment thread storage/grpc_dp_diag_test.go Resolved
Comment thread storage/grpc_dp_diag_test.go Resolved
Comment thread storage/grpc_client_test.go Resolved
Comment thread storage/experimental/experimental.go Resolved
Comment thread storage/grpc_dp_diag.go Resolved
@nidhiii-27
nidhiii-27 requested a review from cpriti-os October 8, 2026 07:27

@cpriti-os cpriti-os 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.

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.

Comment thread storage/grpc_dp_diag_test.go Outdated
if tc.envVal != nil {
t.Setenv(enableDirectPathXdsOverInterconnectEnvVar, *tc.envVal)
} else {
t.Setenv(enableDirectPathXdsOverInterconnectEnvVar, "")

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.

Nit: when tc.envVal == nil, unset the env var (like in TestInterconnectRequested below) rather than setting it to "".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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]
@nidhiii-27
nidhiii-27 merged commit c0d53be into main Oct 15, 2026
20 of 21 checks passed
@nidhiii-27
nidhiii-27 deleted the feat/storage-directpath-interconnect-storage branch October 15, 2026 06:28
cpriti-os added a commit that referenced this pull request Oct 19, 2026
…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`.
cpriti-os pushed a commit that referenced this pull request Oct 22, 2026
🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated api: storage Issues related to the Cloud Storage API. storage-feature-parity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants