Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(transport): enforce 1s timeout on requests to MDS universe_domain #2393

Merged

Conversation

quartzmo
Copy link
Member

@quartzmo quartzmo commented Feb 3, 2024

  • Temporarily return googleapis.com on MDS universe_domain timeout.

closes: googleapis/google-cloud-go#9350

* Temporarily return googleapis.com on MDS universe_domain timeout.

closes: googleapis/google-cloud-go#9350
internal/settings.go Outdated Show resolved Hide resolved
internal/settings.go Show resolved Hide resolved
}
return credsUniverseDomain, nil

loop:
Copy link
Member

Choose a reason for hiding this comment

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

This can all be simplified a bit. You should be able to use a single select without a loop. The select will wait until one of the channels returns a result.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, updated.

Copy link
Member

@viacheslav-rostovtsev viacheslav-rostovtsev left a comment

Choose a reason for hiding this comment

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

LGTM

@quartzmo quartzmo merged commit 6862015 into googleapis:main Feb 5, 2024
5 checks passed
@quartzmo quartzmo deleted the transport-get-universe-domain-timeout branch February 5, 2024 21:49
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.

storage: timeout for /computeMetadata/v1/universe/universe_domain in storage.NewClient
3 participants