-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for new retry modes #1972
Conversation
This adds the concept of "retry modes" which allows us to introduce different retry behavior. The default mode, `legacy`, is the existing retry behavior. This means that new retry modes (in v1) require an opt-in. The new `standard` mode moves away from the `_retry.json` and contains a set of errors that are retried that is now consistent with other AWS SDKs implementing standard mode. This mode also adds support for retry quotas which control how many unsuccessful retries a client can make. As part of this change, I've added a new total_max_attempts config option. This addresses the fact that there's already a max attempts client config var in botocore v1, and that it doesn't mean the same thing as the `AWS_MAX_ATTEMPTS` env var. To summarize: * The client config's `max_attemtps` remains unchanged. * A new `total_max_attempts` var is added that maps to the `AWS_MAX_ATTEMPTS` and `max_attempts` env var and config file values. * We internally convert client config `max_attempts` to `total_max_attempts` and ensure internally (in args.py and client.py) we only use this new value.
This adds a new experimental retry mode, `adaptive`, that adds support for client side rate limiting based on receiving throttling responses. `adaptive` mode includes all the behavior on `standard` mode.
Codecov Report
@@ Coverage Diff @@
## develop #1972 +/- ##
===========================================
+ Coverage 92.73% 92.98% +0.24%
===========================================
Files 53 60 +7
Lines 10293 10784 +491
===========================================
+ Hits 9545 10027 +482
- Misses 748 757 +9
Continue to review full report at Codecov.
|
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.
🚢
We should also add a changelog entry for the new modes before merging. |
PR #1972 * v1-new-retries: Add changelog entry for new retry feature Add support for adaptive mode retries Add support for retries v2 standard mode Add support for parsing retryable metadata in model
Add support for parsing retryable metadata in model
Add support for retries v2 standard mode
This adds the concept of "retry modes" which allows us to
introduce different retry behavior.
The default mode,
legacy
, is the existing retry behavior.This means that new retry modes (in v1) require an opt-in.
The new
standard
mode moves away from the_retry.json
andcontains a set of errors that are retried that is now consistent
with other AWS SDKs implementing standard mode. This mode also
adds support for retry quotas which control how many unsuccessful
retries a client can make.
As part of this change, I've added a new total_max_attempts config
option.
This addresses the fact that there's already a max
attempts client config var in botocore v1, and that it
doesn't mean the same thing as the
AWS_MAX_ATTEMPTS
env var. To summarize:
max_attempts
remains unchanged.total_max_attempts
var is added that maps to theAWS_MAX_ATTEMPTS
andmax_attempts
env var and config filevalues.
max_attempts
tototal_max_attempts
and ensure internally (in args.py andclient.py) we only use this new value.
Add support for adaptive mode retries
This adds a new experimental retry mode,
adaptive
, that addssupport for client side rate limiting based on receiving
throttling responses.
adaptive
mode includes all the behavioron
standard
mode.