Repository navigation
Fill gaps between GcsUtilV2 and GcsUtilV1 - #40244
Merged
Merged
Conversation
GcsUtilV2 left credentials to the application default chain, silently ignoring --gcpCredentialFactoryClass, impersonation and explicit service account keys that GcsUtilV1 honors. A custom --gcsEndpoint was ignored outright. Pass the pipeline's credentials through, mapping a null credential (an explicit opt-out) to NoCredentials, and apply gcsEndpoint as the client host.
GcsUtilV2 returned raw channels, so enabling use_gcsutil_v2 silently
dropped every GCS metric that GcsUtilV1 reports: the per-bucket byte
counters from GcsCountersOptions, the gcs_http_*_wire_bytes counters
gated on gcsPerformanceMetrics, and the api_request_count
ServiceCallMetric.
Wrap the channels returned by open() and create() in the existing
Counting{Seekable,Writable}ByteChannel helpers and report a
ServiceCallMetric for GcsGet and GcsInsert, matching V1's labels.
shunping
force-pushed
the
gcs-migration-4
branch
2 times, most recently
from
September 23, 2026 19:46
68094bd to
54373fc
Compare
shunping
marked this pull request as ready for review
September 23, 2026 19:50
Collaborator
Author
|
r: @derrickaw |
Contributor
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
derrickaw
reviewed
Sep 24, 2026
derrickaw
left a comment
Collaborator
There was a problem hiding this comment.
Should we have more tests to cover client configuration, metrics, and leaked channel?
Collaborator
Author
Added tests for client configuration and metrics. The leaked channel one is a bug and it is trivial to test. |
derrickaw
approved these changes
Sep 24, 2026
15 of 35 tasks
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.
This is one of the steps in the final stage of the GCS client library migration.
GcsUtilV2is thejava-storagebacked replacement for thegcsiobasedGcsUtilV1, which can be activated with the--use_gcsutil_v2experiment. There were some behavior gaps between the two. This PR closes some of the gaps.Parity gaps closed:
--gcsEndpointignorednull→NoCredentials),--gcsEndpointapplied as the client hostCounting{Seekable,Writable}ByteChannel, plus aServiceCallMetricforGcsGet/GcsInsert--gcsPerformanceMetricscreate()opened a V2 channel, discarded it, then opened a second on V1