-
Notifications
You must be signed in to change notification settings - Fork 190
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
Improve manual config experience for SDK retries and timeouts #1603
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
@@ -130,6 +130,7 @@ async fn retry_test(sleep_impl: Arc<dyn AsyncSleep>) -> Result<(), Box<dyn std:: | |||
.credentials_provider(aws_types::credentials::SharedCredentialsProvider::new( | |||
credentials, | |||
)) | |||
.retry_config(RetryConfig::standard()) |
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.
need to figure out how this plays with aws-smithy-client::retry::Standard.config
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.
Yeah, that's a good callout. I think we need to remove the retry policy from the client's generic args, since it really should be configured by the RetryConfig
that feeds into Config
rather than by the client builder. That way, the RetryMode
in RetryConfig
would set the policy instead.
If we want to retain the ability to customize the retry policy implementation completely for non-SDK Smithy clients, we could potentially add a Custom
variant to RetryMode
, but I don't think we want that for the SDK.
What are your thoughts on this?
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.
From discussion with @rcoh, it seems like removing the retry generic may be the best long term approach for simplifying this, but isn't currently possible due to tower::retry::Policy
not being dyn
-safe yet. This potential simplification should be punted to an RFC.
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Won't be able to fix the rest of CI until #1654 is merged, but I think this is otherwise ready for review. |
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.
I had 2 minor comments but otherwise this looks good.
P.S. we can probably delete TriState
now; I think we were only using it for sleep impls
It looks like |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Posted a PR to fix the examples: awsdocs/aws-doc-sdk-examples#3526 |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
This PR addresses awslabs/aws-sdk-rust#586 by:
Default
implementation foraws_config::RetryConfig
and renamingRetryConfig::new
toRetryConfig::standard
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.