Skip to content

Replace google_json_root_url with universe_domain#652

Merged
stanhu merged 1 commit intomasterfrom
sh-use-universe-domain
Jan 29, 2026
Merged

Replace google_json_root_url with universe_domain#652
stanhu merged 1 commit intomasterfrom
sh-use-universe-domain

Conversation

@stanhu
Copy link
Contributor

@stanhu stanhu commented Jan 28, 2026

This replaces the parameter introduced in #650.

universe_domain was introduced in googleapis/google-api-ruby-client#17131 and googleapis/google-auth-library-ruby#460.

This is preferable because the Google Client performs some verification to ensure credentials match the cloud provider.

@stanhu stanhu force-pushed the sh-use-universe-domain branch from 9f21ede to a43e6f8 Compare January 28, 2026 16:38
@stanhu
Copy link
Contributor Author

stanhu commented Jan 28, 2026

I'm still waiting for an environment to test this, but perhaps @Tchebychev you can give this a try?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request replaces the google_json_root_url parameter (introduced in PR #650) with universe_domain, aligning with the Google API Ruby client library's native universe domain support. The change affects storage configuration and credential handling across Real and Mock implementations.

Changes:

  • Replaced google_json_root_url parameter with universe_domain in storage configuration
  • Added support for GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable
  • Updated credential initialization to set universe_domain on Google Auth objects
  • Modified URL construction to use universe domain for bucket base URLs

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
lib/fog/google/storage/storage_json.rb Replaced google_json_root_url with universe_domain in recognized options
lib/fog/google/storage/storage_json/real.rb Updated initialization to use universe domain for URL construction and set universe_domain on storage service
lib/fog/google/storage/storage_json/mock.rb Added universe domain support to mock implementation with URL construction methods
lib/fog/google/shared.rb Added universe_domain_from_options helper and updated credential processing to set universe_domain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stanhu stanhu force-pushed the sh-use-universe-domain branch from a43e6f8 to 6290faa Compare January 28, 2026 23:56
@Tchebychev
Copy link
Contributor

I'm still waiting for an environment to test this, but perhaps @Tchebychev you can give this a try?

I'll try to get someone on my team to test this.
Given our current workload, it might take a few days, so don't wait for me to release it if you want to make one.
The idea seems better than the one I proposed, so I'm okay with it in principle.

@stanhu stanhu force-pushed the sh-use-universe-domain branch 3 times, most recently from 235e381 to 7b2a11b Compare January 29, 2026 21:26
@stanhu stanhu requested a review from Copilot January 29, 2026 21:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This replaces the parameter introduced in
#650.

universe_domain was introduced in
googleapis/google-api-ruby-client#17131 and
googleapis/google-auth-library-ruby#460.

This is preferable because the Google Client performs some verification
to ensure credentials match the cloud provider.
@stanhu stanhu force-pushed the sh-use-universe-domain branch from 7b2a11b to f4fc4ba Compare January 29, 2026 21:55
@stanhu stanhu merged commit b4ed4fb into master Jan 29, 2026
7 checks passed
@stanhu
Copy link
Contributor Author

stanhu commented Jan 29, 2026

Released in v1.29.0.

stanhu added a commit that referenced this pull request Jan 30, 2026
This ensures that the Google Application Default credentials
are obtained from the IAM service use the right universe domain.

This fixes the feature introduced in
#652.
stanhu added a commit that referenced this pull request Jan 30, 2026
This ensures that the Google Application Default credentials
are obtained from the IAM service use the right universe domain.

This fixes the feature introduced in
#652.
stanhu added a commit that referenced this pull request Jan 30, 2026
This ensures that the Google Application Default credentials
are obtained from the IAM service use the right universe domain.

This fixes the feature introduced in
#652.
stanhu added a commit that referenced this pull request Jan 30, 2026
This ensures that the Google Application Default credentials
are obtained from the IAM service use the right universe domain.

This fixes the feature introduced in
#652.
@Tchebychev
Copy link
Contributor

Thanks for the contribution ! Now Gitlab only needs to update the dependency so we can use this env var : https://gitlab.com/gitlab-org/gitlab/-/merge_requests/220951

@stanhu
Copy link
Contributor Author

stanhu commented Jan 30, 2026

@Tchebychev The update is only one part of the equation. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/221401 and https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/6338.

I can send you a test package if you want to try this out. We're still waiting for a test environment.

@geemus
Copy link
Member

geemus commented Jan 30, 2026

Thanks for continuing to work through this.

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.

3 participants