-
Notifications
You must be signed in to change notification settings - Fork 90
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
Implemented Retry Policy #521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a spec for this feature? It seems very basic e.g. no backoff, hardcoded retry count and delay. Blockers are
- implicit upgrade to Go 1.21
- cancellation
- rewinding request bodies
Added test to check request body is same for each request.
It is very basic retry, and has a fix 1 second between retry and max count of 3 retries |
Updating the error code for retry
Updated the comment
This is the retry policy that was discussed with MSI team and implemented in all MSALs. If you feel that this is wrong, let's pls open bugs on all MSALs. But it is important for MSALs to be consistent here. Note that MSALs do not offer a |
I'm sorry, I still don't know which status codes this policy is supposed to retry on. Right now, its retriable codes are reasonable in general cases but incorrect for IMDS. Do you intend it to apply IMDS retry guidance to all services? |
Removed the condition and copied no matter the body size.
Added a context cancel
Co-authored-by: Charles Lowell <[email protected]>
Co-authored-by: Charles Lowell <[email protected]>
Quality Gate passedIssues Measures |
Pull Request: Implement Retry Policy for Client
Overview
This pull request introduces a retry policy for network calls in the client. The retry policy aims to enhance the resilience of our application by allowing it to automatically retry failed requests up to a maximum of three times.
Changes Made
Retry Policy Implementation:
Configuration Option to Disable Retry Policy:
WithRetryPolicyDisabled()
for the client.Default Behavior (Retries Enabled)
By default, the client will automatically retry failed requests up to 3 times with delay of 1 second. Here’s how to create the client with the retry policy enabled:
Default Behavior (Retries Disabled)
By default, the client will not retry the failed request. Here’s how to create the client with the retry policy disabled:
Error List when retry is done.