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

feat(compute/metadata): retry error when talking to metadata service #4648

Merged
merged 5 commits into from
Aug 19, 2021
Merged

feat(compute/metadata): retry error when talking to metadata service #4648

merged 5 commits into from
Aug 19, 2021

Conversation

codyoss
Copy link
Member

@codyoss codyoss commented Aug 19, 2021

This was reported internally to be causing issues. This package is
used by some of our auth flows so it should be good to make this
package more resilient to transient failures. Implementation inspired
by what we do for some of our http based services.

Because this package is currently not context aware I needed to add
attempts so retrying does not happen forever. Five attempts was
arbitrarily chosen.

Fixes: #4642

Release-As: 0.94.0

This was reported internally to be causing issues. This package is
used by some of our auth flows so it should be good to make this
package more resilient to transient failures. Implmentation inspired
by what we do for some of our http based services.

Because this package is currently not context aware I needed to add
attempts so retrying does not happen forever. Five attempts was
arbitrarily chosen.

Fixes: #4642
@codyoss codyoss requested a review from a team as a code owner August 19, 2021 17:18
@product-auto-label product-auto-label bot added the api: compute Issues related to the Compute Engine API. label Aug 19, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 19, 2021
@codyoss codyoss added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed cla: yes This human has signed the Contributor License Agreement. api: compute Issues related to the Compute Engine API. labels Aug 19, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 19, 2021
@codyoss
Copy link
Member Author

codyoss commented Aug 19, 2021

Temporarily adding don't merge while I deploy and test this code on the platform.

compute/metadata/retry.go Outdated Show resolved Hide resolved
compute/metadata/metadata.go Outdated Show resolved Hide resolved
@codyoss codyoss removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 19, 2021
@codyoss
Copy link
Member Author

codyoss commented Aug 19, 2021

everything seems to be in working order, tested on the platform.

@codyoss codyoss requested review from noahdietz, tbpg and broady August 19, 2021 20:06
compute/metadata/metadata.go Outdated Show resolved Hide resolved
compute/metadata/retry_linux_test.go Outdated Show resolved Hide resolved
compute/metadata/retry_linux_test.go Outdated Show resolved Hide resolved
compute/metadata/retry_test.go Outdated Show resolved Hide resolved
compute/metadata/metadata.go Show resolved Hide resolved
@codyoss codyoss requested a review from tbpg August 19, 2021 20:38
@codyoss codyoss merged commit 81c6039 into googleapis:master Aug 19, 2021
@codyoss codyoss deleted the metadata-retry branch August 19, 2021 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compute/metadata: add retries
3 participants