Skip to content

feat(storage): add support for DirectPath over Interconnect - #14006

Merged
blakeli0 merged 23 commits into
mainfrom
add-dp-over-gci
Oct 30, 2026
Merged

blakeli0 merged 23 commits into
mainfrom
add-dp-over-gci

Conversation

@nidhiii-27

@nidhiii-27 nidhiii-27 commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor
  • DirectPath over Interconnect Support (GAX): Added the attemptDirectPathXdsOverInterconnect option to InstantiatingGrpcChannelProvider to enable on-premise xDS name resolution via the google-c2p:///<service>-direct.<domain>?force-xds target scheme (rewriting the host in GAX via rewriteDirectPathInterconnectHost without overriding the channel authority).
  • GCP Platform Check Bypass: Modified DirectPath validation logic to bypass standard Google Compute Engine (GCE) environment checks and non-ComputeEngine credential restrictions when Interconnect is enabled.
  • Storage Layer Integration: Added the @BetaApi setAttemptDirectPathXdsOverInterconnect configuration option to GrpcStorageOptions.Builder and wired it to InstantiatingGrpcChannelProvider.

@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 xDS over Interconnect (on-premise xDS name resolution) in GrpcStorageOptions and InstantiatingGrpcChannelProvider, allowing GCE environment checks to be bypassed when enabled. It also updates endpoint validation to support custom URI schemes like google-c2p:/// and adds corresponding tests. The reviewer suggests dynamically adjusting the log level for the DirectPath fallback warning to avoid excessive warning spam in non-GCE environments, recommending Level.WARNING on GCE and Level.FINE elsewhere.

@nidhiii-27
nidhiii-27 marked this pull request as ready for review August 6, 2026 08:45
@nidhiii-27
nidhiii-27 requested review from a team as code owners August 6, 2026 08:45
@snippet-bot

snippet-bot Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

No region tags are edited in this PR.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

fix spanner tests failing due to overridden authority for default builder branch

[Generated-by: AI]
…nect

- Generalize DirectPath over Interconnect host and authority handling in InstantiatingGrpcChannelProvider for any service using -direct. convention
- Rethrow RuntimeException in extractTargetFromChannelBuilder to surface reflection errors in CI
- Remove unused DEFAULT_HOST_DIRECT_PATH constant in GrpcStorageOptions
- Add generic non-GCS unit tests in InstantiatingGrpcChannelProviderTest

[Generated-by: AI]
- Define DIRECT_PATH_INTERCONNECT_INFIX constant to eliminate duplicated "-direct." string literals
- Add explanatory comment in empty catch block of extractAuthorityFromChannelBuilder

[Generated-by: AI]
…on in tests

- Remove unintended positive test filter from Surefire plugin configuration in gax-grpc/pom.xml, allowing all standard unit tests in InstantiatingGrpcChannelProviderTest to run and restore code coverage.
- Inspect authorityOverride field and unwrap builder delegates in InstantiatingGrpcChannelProviderTest#extractAuthorityFromChannelBuilder.

[Generated-by: AI]
Replace 4 duplicate invalid endpoint tests with a single parameterized test to address SonarCloud java:S5976.

[Generated-by: AI]
Address review feedback on RFC query/fragment delimiter support, reflection cleanup with Mockito, and dynamic guard documentation.

[Generated-by: AI]
@nidhiii-27
nidhiii-27 requested a review from blakeli0 September 10, 2026 08:29
@nidhiii-27
nidhiii-27 requested a review from blakeli0 October 13, 2026 05:47
@nidhiii-27
nidhiii-27 requested a review from blakeli0 October 16, 2026 05:28
@nidhiii-27 nidhiii-27 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 16, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 16, 2026
…AX and retain -direct authority

Merge origin/main, move the -direct. host rewrite into InstantiatingGrpcChannelProvider, remove overrideAuthority so GoogleCloudToProdNameResolver retains the -direct authority, and remove the obsolete :/// check in validateEndpoint.

[Generated-by: AI]

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

nit: the last bullet in the description is out of date after the latest commit. The host rewrite now lives in GAX (rewriteDirectPathInterconnectHost) and the channel no longer overrides the authority to storage.googleapis.com.

@nidhiii-27

Copy link
Copy Markdown
Contributor Author

Done. Updated the PR description to reflect that the -direct. host rewrite (rewriteDirectPathInterconnectHost) is handled in GAX (InstantiatingGrpcChannelProvider) and that the channel no longer overrides the authority to storage.googleapis.com.

Co-authored by AI Agent

…RCONNECT env var

Allow enabling or disabling DirectPath over Interconnect via the GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT environment variable in InstantiatingGrpcChannelProvider, matching Go and Python SDKs.

[Generated-by: AI]
@nidhiii-27 nidhiii-27 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2026
@sonarqubecloud

Copy link
Copy Markdown

@googleapis googleapis deleted a comment from sonarqubecloud Bot Oct 29, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@nidhiii-27 nidhiii-27 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 29, 2026
@blakeli0
blakeli0 merged commit ad0eb94 into main Oct 30, 2026
299 of 301 checks passed
@blakeli0
blakeli0 deleted the add-dp-over-gci branch October 30, 2026 00:17
zhumin8 added a commit that referenced this pull request Nov 2, 2026
…heck (#14896)

Fix generation diff, unblocks the Librarian upgrade and API sources
regen.

## What
Runs `google-java-format` 1.25.2 on two handwritten test files, so their
long string literals are reflowed the same way `librarian generate
--all` reflows them:

- `java-storage/.../it/ITGrpcDirectPathTest.java`: `@Ignore` message
(added in #14006)
- `java-spanner/.../AbstractReadContextTest.java`: `FAILED_PRECONDITION`
message (added in #14887)

The result is identical to the diff in the failing [generation check
run](https://github.com/googleapis/google-cloud-java/actions/runs/41497486252)
(same blob hashes: `06333bef`, `bc58e312`). These are formatting-only
changes, with no behavior change.

## Why the PRs passed lint but broke `main`
- **PR `lint` job:** runs `fmt-maven-plugin` 2.25. Its `Formatter` calls
`formatSource()` and then only fixes imports. It never reflows long
strings (`StringWrapper.wrap`).
- **`librarian generate`:** runs the `google-java-format --replace` CLI,
where `reflowLongStrings` defaults to `true`. It runs on every `.java`
file in each library, including handwritten tests.
- **`librarian_generation_check.yaml`:** runs only on push to `main`, so
the mismatch shows up only after merge.

Both tools use google-java-format 1.25.2, so the version isn't the
cause. The difference is the long-string reflow step. This will happen
again whenever a handwritten string literal is longer than 100 columns,
until the two formatters agree. That follow-up is out of scope for this
PR.


Fixes #14862
jinseopkim0 pushed a commit that referenced this pull request Nov 3, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>1.95.0</summary>

##
[1.95.0](v1.94.0...v1.95.0)
(2026-11-02)


### Features

* **bigquery-jdbc:** expose BigQueryResultSetMetadata and getField(int)
([#14761](#14761))
([f01245a](f01245a))
* **gax:** align resumable upload chunk size to server granularity and
surface effective chunk size
([#14670](#14670))
([6cbb096](6cbb096))
* **google/cloud/designcenter/v1:** add designcenter
([#14823](#14823))
([01d27dc](01d27dc))
* **google/cloud/observability/v1:** add observability
([#14722](#14722))
([624f28e](624f28e))
* **oauth2:** support certificate-bound OAuth2 tokens and mTLS rotation
for Workload Identity Federation
([#14781](#14781))
([dcb29b0](dcb29b0))
* **storage:** add bucket IP filtering samples and tests
([#14328](#14328))
([cb2b726](cb2b726))
* **storage:** add support for DirectPath over Interconnect
([#14006](#14006))
([ad0eb94](ad0eb94))
* **storage:** OpenTelemetry client metrics configuration and options
([#14484](#14484))
([7c29e48](7c29e48))
* **storage:** OpenTelemetry client metrics instrument registry and
views
([#14398](#14398))
([60233b7](60233b7))


### Bug Fixes

* add user agent to session path
([#14835](#14835))
([a653638](a653638))
* **auth:** align mTLS transport and bound token certificate startup
polling and well-known discovery
([#14748](#14748))
([0bae268](0bae268))
* **bigquery-jdbc:** expand handling to OOM errors
([#14759](#14759))
([7d4b921](7d4b921))
* **bigquery-jdbc:** fix naive fallback of parameter count
([#14779](#14779))
([c3e4a5b](c3e4a5b))
* **bigquery-jdbc:** format RANGE bounds consistently across REST and
Arrow
([#14807](#14807))
([2108b8e](2108b8e))
* **bigquery-jdbc:** parse scientific-notation epoch TIMESTAMPs
([#14777](#14777))
([71a31b1](71a31b1))
* **bigquery-jdbc:** preserve pre-1582 and pre-standard-time
DATE/DATETIME digits
([#14787](#14787))
([3dc394f](3dc394f))
* **bigtable:** avoid mutating Query in-place in createPointReadCallable
([#14797](#14797))
([1b1c6a7](1b1c6a7))
* **bigtable:** check isOk and getRejected first in
RetryingVRpc.shouldRetry
([#14795](#14795))
([d821bd3](d821bd3))
* **bigtable:** check remaining deadline on client-initiated retries in
RetryingVRpc
([#14796](#14796))
([a04e24c](a04e24c))
* **bigtable:** Fix empty RowResult semantics in TestProxy.
([#14810](#14810))
([1d2fb9a](1d2fb9a))
* **bigtable:** include reversed in Query equals, hashCode, and toString
([#14799](#14799))
([fe9232b](fe9232b))
* **bigtable:** pass cell value size to RowBuilder.startCell in
RowBuilderShim
([#14800](#14800))
([cfa7949](cfa7949))
* **bigtable:** reject empty split points in RowSetUtil and clarify
QueryPaginator Javadoc
([#14811](#14811))
([1bc507f](1bc507f))
* **bigtable:** remove legacy PollingConfiguration migration in
ClientConfigurationManager
([#14822](#14822))
([95ead45](95ead45))
* **bigtable:** resolve session diversion through a single shared rule
([#14738](#14738))
([00f7bea](00f7bea))
* **bigtable:** respect query limit smaller than pageSize and avoid
mutating Query in QueryPaginator
([#14821](#14821))
([cecd09e](cecd09e))
* **firestore:** graduate pipeline search from preview to GA
([#14741](#14741))
([a993026](a993026))
* **gax:** do not treat a SocketTimeoutException as a thread interrupt
([#14778](#14778))
([7b91805](7b91805))
* **jdbc:** populate `ResultSetMetaData` on empty `DatabaseMetaData`
resultsets
([#14809](#14809))
([4c6a7e3](4c6a7e3))
* **pubsub:** make publish hedging robust to clock jumps, queue errors,
and shutdown
([#14860](#14860))
([9b9e2a5](9b9e2a5))
* **spanner:** attach routing hints to read-write transaction requests
([#14786](#14786))
([54e0585](54e0585))
* **spanner:** cancel queries promptly on close and synchronize error
handling
([#14887](#14887))
([323a8f7](323a8f7))
* **spanner:** do not cache retryable errors in AbstractLazyInitializer
([#14752](#14752))
([6a9ac76](6a9ac76))
* **spanner:** restore setCall overload for stream test compatibility
([#14885](#14885))
([cfe728e](cfe728e))
* **spanner:** synchronize stream lifecycle and retry buffering in
ResumableStreamIterator
([#14770](#14770))
([4edefc5](4edefc5))
* **spanner:** trigger best-effort rollback on indeterminate commit
failures
([#14831](#14831))
([b9d1b95](b9d1b95))
* **storage:** preserve HTTP status for XML multipart upload errors so
retries work
([#14804](#14804))
([3c03034](3c03034))
* **storage:** send destination on gRPC copy when target BlobInfo is
provided
([#14784](#14784))
([43a67a0](43a67a0))
* **storage:** validate CRC32C on HTTP downloads that were not
decompressed
([#14805](#14805))
([61aa22f](61aa22f))


### Documentation

* **bigtable:** document that skipped large rows count towards row limit
([#14801](#14801))
([91d60e0](91d60e0))
</details>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants