Commit f2e9994
authored
Enable retries by default (#4454)
Fixes awslabs/aws-sdk-rust#1389
Fixes awslabs/aws-sdk-rust#1393
## Problem
When users create a client with `Config::builder().build()`, retries are
disabled by default. This is confusing because our docs say retries are
enabled by default, and `aws_config::load_from_env()` does enable them.
Users expect retries to just work.
## Solution
Enable `RetryConfig::standard()` and a 3.1s connection timeout by
default for `BehaviorVersion::v2026_01_12()` and later. Older behavior
versions keep the current behavior for backward compatibility.
## Changes
- AWS SDK clients now have `RetryConfig::standard()` enabled by default (3 max attempts) when using `BehaviorVersion >= v2026_01_12()`. Previously, retries were disabled by default unless explicitly configured via `aws_config::load_from_env()`
- All clients now have a 3.1s connection timeout by default when using BehaviorVersion >= v2026_01_12. This prevents indefinite hangs on connection attempts.
### Documentation Updates Needed
The AWS Developer Guide at
https://docs.aws.amazon.com/sdk-for-rust/latest/dg/retries.html needs to
be updated to reflect this change.
## Checklist
- [x] Code changes implemented
- [x] Backward compatibility maintained via BehaviorVersion
- [x] Generated documentation updated
- [x] Tests pass1 parent 5f8cf1e commit f2e9994
19 files changed
Lines changed: 528 additions & 110 deletions
File tree
- aws
- codegen-aws-sdk/src
- main/kotlin/software/amazon/smithy/rustsdk
- test/kotlin/software/amazon/smithy/rustsdk
- rust-runtime
- aws-config
- sdk
- integration-tests
- codecatalyst/tests
- s3/tests
- codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client
- rust-runtime
- aws-smithy-runtime-api
- src/client
- aws-smithy-runtime/src/client
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
489 | 490 | | |
490 | 491 | | |
491 | 492 | | |
| 493 | + | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
161 | | - | |
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments