-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make the number of retries configurable #595
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I think likely there are a few more throttling error codes we could add in, in a future PR: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html#standard-retry-mode |
bors try |
tryBuild succeeded: |
AWS has a conventional env variable btw: #551 |
@@ -190,7 +191,7 @@ function submit_request(aws::AbstractAWSConfig, request::Request; return_headers | |||
return false | |||
end | |||
|
|||
delays = AWSExponentialBackoff(; max_attempts=3) | |||
delays = AWSExponentialBackoff(; max_attempts=max_attempts(aws)) |
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.
How about making the whole delay strategy configurable?
delays = AWSExponentialBackoff(; max_attempts=max_attempts(aws)) | |
delays = delays(aws) |
to give more control, e.g. tweak the initial delay or delay between retries.
Perhaps this would require exporting AWSExponentialBackoff
so it's easy for users to tweak only the max attempt.
bors try |
tryBuild succeeded: |
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.
bors r+
This adds a
max_attempts
kwarg+field to AWSConfig, and amax_attempts
accessor forAbstractAWSConfig
(defaulting to 3, which is the default elsewhere in the code).I saw most of the tests are done with S3, and I also saw that the S3 throttling error (
SlowDown
) was not included. I added that error code and then added a test that uses it and tests throttling retries.