Skip to content

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

Merged
quartzmo merged 6 commits intogoogleapis:mainfrom
quartzmo:transport-get-universe-domain-timeout
Feb 5, 2024
Merged

fix(transport): enforce 1s timeout on requests to MDS universe_domain#2393
quartzmo merged 6 commits intogoogleapis:mainfrom
quartzmo:transport-get-universe-domain-timeout

Conversation

@quartzmo
Copy link
Copy Markdown
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
}
return credsUniverseDomain, nil

loop:
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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