shunping opened a new pull request, #40796: URL: https://github.com/apache/beam/pull/40796
## Problem Since GcsUtil V2 (java-storage) became the default (#40713), Java GCS ignores `GOOGLE_CLOUD_UNIVERSE_DOMAIN`. Unlike the Google API client used by GcsUtil V1 (and by the Dataflow client, #40672), java-storage only takes the universe domain from `StorageOptions#setUniverseDomain`. Without `--gcsEndpoint`, every request goes to `storage.googleapis.com`, even with credentials for another universe. On Trusted Partner Cloud this fails right at pipeline construction: ``` Error constructing default value for gcpTempLocation: tempLocation is not a valid GCS path, gs://... ... 401 Unauthorized GET https://storage.googleapis.com/storage/v1/b/<bucket>?fields=name&projection=full ``` ## Fix When `--gcsEndpoint` is not set, `GcsUtilV2` resolves the universe domain and sets it on `StorageOptions`: 1. `GOOGLE_CLOUD_UNIVERSE_DOMAIN`, if set; otherwise 2. the credentials' universe domain. If neither is set, or the value is `googleapis.com`, nothing changes. An explicit `--gcsEndpoint` still takes precedence. This mirrors the Python fix (#40674). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
