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

compute/metadata: add retries #4642

Closed
codyoss opened this issue Aug 18, 2021 · 4 comments · Fixed by #4648
Closed

compute/metadata: add retries #4642

codyoss opened this issue Aug 18, 2021 · 4 comments · Fixed by #4648
Assignees
Labels
api: compute Issues related to the Compute Engine API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@codyoss
Copy link
Member

codyoss commented Aug 18, 2021

Add retries consistent to what is being done in other languages.

@codyoss codyoss added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Aug 18, 2021
@codyoss codyoss self-assigned this Aug 18, 2021
@product-auto-label product-auto-label bot added the api: compute Issues related to the Compute Engine API. label Aug 18, 2021
@codyoss codyoss added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: compute Issues related to the Compute Engine API. labels Aug 18, 2021
@codyoss
Copy link
Member Author

codyoss commented Aug 18, 2021

Can probably borrow the logic used in apiaries today. I think that should cover the different edge cases well enough: https://github.com/googleapis/google-api-go-client/blob/8258338b24dd72029fd1705ff1a5fa15d55ce17c/internal/gensupport/resumable.go#L233-L258

@hostirosti
Copy link

/sub

@product-auto-label product-auto-label bot added the api: compute Issues related to the Compute Engine API. label Aug 19, 2021
codyoss added a commit that referenced this issue Aug 19, 2021
…4648)

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
@codyoss
Copy link
Member Author

codyoss commented Aug 20, 2021

@hostirosti This change is on HEAD. I will cut a release that includes this change on Monday, waiting for some other stuff to land first.

@valyala
Copy link

valyala commented Sep 21, 2021

FYI, the commit, which fixes the issue, led to significant binary size increase for apps which import compute/metadata package. See #4783 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants