feat(storage): support DirectPath over Interconnect in gRPC client - #18482
Open
nidhiii-27 wants to merge 2 commits into
Open
nidhiii-27 wants to merge 2 commits into
nidhiii-27 wants to merge 2 commits into
Conversation
Add support for DirectPath over Cloud Interconnect in GCS gRPC client (GrpcClient and AsyncGrpcClient). - Add attempt_direct_path_xds_over_interconnect parameter and GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECT env var override. - Rewrite default endpoint to storage-direct.googleapis.com when enabled. - Forward credentials, quota_project_id, and attempt_direct_path_xds_over_interconnect to GAPIC transport. - Unit tests for sync and async gRPC client. [Generated-by: AI]
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for DirectPath over Cloud Interconnect using xDS and standard TLS in both the synchronous and asynchronous Google Cloud Storage gRPC clients. It adds the attempt_direct_path_xds_over_interconnect option, environment variable resolution, host rewriting logic, and corresponding unit tests. The feedback suggests simplifying a redundant boolean expression to True in both async_grpc_client.py and grpc_client.py since the conditional block guarantees that the flag is already enabled.
… client [Generated-by: AI]
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for DirectPath over Cloud Interconnect (GCI) to the Google Cloud Storage Python client veneer across
packages/google-cloud-storage(GrpcClientandAsyncGrpcClient).This PR contains the veneer client changes separated from companion PR #18431 (
packages/google-api-core).Key Changes
attempt_direct_path_xds_over_interconnectparameter toGrpcClient.__init__andAsyncGrpcClient.__init__.GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTERCONNECTenvironment variable override with case-insensitive and whitespace-normalized boolean parsing ("true"/"false"), raisingValueErroron invalid values.storage.googleapis.comtostorage-direct.googleapis.comwhen DirectPath over Interconnect is enabled (preserving ports, paths, queries, and fragments).attempt_direct_path_xds_over_interconnect=Truetotransport_cls.create_channel.credentialsandquota_project_idto the underlying GAPIC channel creation.test_grpc_client.py) and async (test_async_grpc_client.py) clients verifying channel creation, environment overrides, fallback host rewriting, and error handling.References
google-api-core)[Generated-by: AI]