Implements Retries 2.1 Updates#6925
Merged
aws-sdk-java-automation merged 23 commits intomasterfrom May 1, 2026
Merged
Conversation
This property will be used to gate the retries update (v 2.1) behind a feature flag. This option defaults to false.
Introduce AWS_NEW_RETRIES_2026 feature gate
* Use AWS_NEW_RETRIES_2026 during mode resolution * Review comments
* 2.1 behavior in standard, adaptive strats Support the 2.1 behavior changes in adaptive and standard strategies. This includes the change in constant values based on 2.0 and 2.1, and the application of a different cost for throttling retries in 2.1. The 2.1 behavior is implemented as an overload of the builder() method that accepts a boolean to select between 2.0 and 2.1. The no-arg version defaults to false, i.e. 2.0. * Review comments
* Factor new retries option in client builder This commit updates the retry mode resolution behavior for SDK clients: - When resolving the RetryStrategy to use, also determine whether retry 2.1 behavior should be enabled for that retry strategy. - If the `newRetries2026Default` property is set in customization.config for a service, ensure that this is treated as the default option for `AWS_NEW_RETRIES_2026` when building the client if not set anywhere else. * Fix test * Fix test
* Support backoff for long-polling For operations that are long-polling, support backoffs in the Standard retry strategy even there is insufficient retry quota. * Review comments * Fix checkstyle
This commit - Adds an isLongPolling() property to ClientExecutionParams - Adds SdkInternalExecutionAttribute.IS_LONG_POLLING that reflects the value from ClientExecutionParams during execution - Sets the longPolling() property on teh RefreshRetryTokenRequest when refreshing, based on the value of the IS_LONG_POLLING exec attribute
* Set longPoll ops for SQS,SWF,SFN Add a customization to set the long polling trait for the following service operations: - SQS#ReceiveMessage - SFN#GetActivityTask - SWF#PollForActivityTask - SWF#PollForDecisionTask * Checkstyle fix * Review comments * Fix checkstyle
This commit adds the test cases defined in the retries spec for Standard. There are two sets, for v2.0 and v2.1. All of the v2.0 test cases are present, but v2.1 tests don't currently have the x-amz-retry-after header tests (yet).
Retry strategies can optionally return a backoff even when token refresh fails. Add support for this in the sync and async retry stages. In RetryableStage and AsyncRetryableStage, check the value of TokenAcquisitionFailedException#delay() backoff if given.
* Use x-amz-retry-after for suggested delay In retries 2.1, 'x-amz-retry-after' must be parsed from the last response and if present, should be used as the suggested delay (i.e. suggested backoff) when attempting another retry. This changes makes updates to RetryableStage and AsyncRetryableStage to parse the header and pass it to the RetryStrategy. As part of this change, we also need to plumb whether retries 2.1 is enabled from the SDK client. * Review comments
This commit fixes two issues with the original retries implementation: - Honor the 'max_retries' property in the profile file if present - Treat 'LimitExceededException' as a throttling exception
In 2.1: - base delay : 25ms (existing) - max attempts: 4 (down from 9)
…ries/master-merge
For standard 2.1, there is additional treatment of the service suggested backoff so it's at least as long as the strategy computed value, and not longer than 5s more than the strategy computed value.
… into dongie/2026-new-retries/master-merge
This will allow us to better track opt-in behavior in the UA.
This commit adds a fix to STS to retry on IDPCommunicationError. This is implemented as a customization for the retry strategy lookup for the client. This is gated behind the AWS_NEW_RETRIES_2026 flag.
Fred1155
reviewed
Apr 30, 2026
Fred1155
approved these changes
Apr 30, 2026
joviegas
approved these changes
Apr 30, 2026
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This commit implements the retries 2.1 revision of SDK retries.
Modifications
This feature implements the v2.1 retry specification for the AWS SDK for Java v2. It introduces an opt-in feature gate (AWS_NEW_RETRIES_2026) that, when enabled, changes retry behavior across the SDK:
This commit also bumps the version to 2.44.0.
The individual changes in the branch were reviewed separately:
Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License