feat: Support new 2026 retries#3379
Conversation
|
Detected 1 possible performance regressions:
|
|
|
||
| # Minimum `aws-sdk-core` version for new gem builds | ||
| MINIMUM_CORE_VERSION = "3.247.0" | ||
| MINIMUM_CORE_VERSION = "3.248.0" |
There was a problem hiding this comment.
Note to self to check this before merging.
jterapin
left a comment
There was a problem hiding this comment.
Nice - you should check with everyone else when these changes should be going out. Also is there a blog post or documentation on how new standard retries work?
| if RetryErrors.new_retries? | ||
| backoff_scalar = if error_inspector.throttling_error? | ||
| 1 | ||
| elsif ['DynamoDB', 'DynamoDB Streams'].include?(service_id) |
There was a problem hiding this comment.
We can make a quick helper check since we do this multiple times - like dynamodb_service?(cfg)
There was a problem hiding this comment.
I can define a constant which contains the list of DynamoDB related services, I think the check is simple enough that we don't need any method overhead.
| # - Remove the old retries branch in #exponential_backoff | ||
| # - Remove LEGACY_RETRY_COST and TIMEOUT_RETRY_COST from RetryQuota | ||
| # @api private | ||
| def self.new_retries? |
There was a problem hiding this comment.
We have a quite a bit class methods here - we might as well do class << self to group there.
|
|
||
| * Feature - Add YJIT & ZJIT tracking to user agent. | ||
| * Issue - Fix error messaging in SSO OIDC. | ||
| * Feature - Add new retry behavior behind `AWS_NEW_RETRIES_2026` environment variable. When enabled, defaults to `standard` retry mode, service-specific tuning for DynamoDB, long-polling backoff support, and `x-amz-retry-after` header support. |
There was a problem hiding this comment.
This changelog entry is a dense read with internal details so maybe:
* Feature - Add `AWS_NEW_RETRIES_2026` environment variable to opt-in to updated
`standard` retry mode with reduced backoff intervals.
We may want to consider having changelog entries in DyanmoDB/DynamoDBStreams - customers who uses these service gems may not necessarily look at the core gem updates. I think we do generate a default "take a look at core for generated changes" but we could have more meaningful change entry for these services
|
|
||
| # Hard-coded combination of services and operations as having the | ||
| # longPoll trait. To be removed when trait is enabled. | ||
| LONG_POLLING_OPERATIONS = { |
There was a problem hiding this comment.
I'm not comfortable with service-specific logic living in core. I recognize this pattern exists in V3, but we should be more intentional about this in V4.
This PR adds support for new 2026 retries behavior, including changing the default retry mode, updating retry quotas, and introducing new behavior for long-polling operations and retry backoff headers.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.