generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 24
Implement Retry Strategy Resolver Pattern with Per-Client Caching #600
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
Open
SamRemis
wants to merge
4
commits into
smithy-lang:develop
Choose a base branch
from
SamRemis:retry-mode-resolver
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+118
−13
Conversation
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
nateprewitt
reviewed
Nov 13, 2025
nateprewitt
reviewed
Nov 14, 2025
...gen/core/src/main/java/software/amazon/smithy/python/codegen/generators/ConfigGenerator.java
Outdated
Show resolved
Hide resolved
nateprewitt
previously approved these changes
Nov 15, 2025
Contributor
nateprewitt
left a comment
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.
Not sure what happened with the commits for the last change but once that's fixed this should be set.
nateprewitt
previously approved these changes
Nov 17, 2025
36749b8 to
a4c632b
Compare
- Add CachingRetryStrategyResolver for per-client retry strategy caching - Add retry strategy configuration options - Update client generation to support retry mode resolution - Add comprehensive tests for retry functionality
a4c632b to
ad9074d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Introduces a resolver pattern for retry strategies that enables per-client caching and state management. This allows multiple operations from the same client to share a single retry strategy instance, which is important for strategies that maintain state across retries such as token buckets and rate limiters.
Motivation
Previously, each operation created its own retry strategy instance, preventing state sharing across operations from the same client. This change implements a resolver-based approach.
Key Changes
RetryStrategyResolverprotocol similar toAuthSchemeResolver. This will be used for objects which will supply clients with retry strategies.CachingRetryStrategyResolverwhich implements the protocol and returns a unique instance of a requested retry strategy object per unique combination of max attempts setting and retry mode setting. This will get called by the client when no RetryStrategy is specified.RetryStrategyOptionsfor users to configure their retry strategy mode and max attempts per client call.