Skip to content

Conversation

@vcjana
Copy link
Contributor

@vcjana vcjana commented Dec 16, 2025

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::v2025_01_17() and later. Older behavior versions keep the current behavior for backward compatibility.

Changes

  • Modified default_retry_config_plugin() to enable retries for new behavior versions
  • Modified default_timeout_config_plugin() to add 3.1s connection timeout
  • Updated generated .send() docs to clarify when retries are enabled

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

  • Code changes implemented
  • Backward compatibility maintained via BehaviorVersion
  • Generated documentation updated
  • Tests pass
  • AWS Developer Guide documentation updated (external)

cc @rcoh @aajtodd

Fixes #1389 and #1393

- Enable RetryConfig::standard() for BehaviorVersion v2025_01_17+
- Add default 3.1s connection timeout for v2025_01_17+
- Update generated send() docs to clarify retry behavior
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from f7a4014 to fc83a75 Compare December 23, 2025 22:58
Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failure is real, need to fix the test or pin the behavior version

I would also appreciate a few tests

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch 3 times, most recently from 8b3dcd0 to 8b014c8 Compare January 5, 2026 23:06
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch 3 times, most recently from ada4678 to 796622b Compare January 6, 2026 02:47
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from c82874c to f02053c Compare January 6, 2026 07:46
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from f02053c to 0f588c2 Compare January 6, 2026 09:32
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh
Copy link
Collaborator

rcoh commented Jan 6, 2026

Thinking about this more, I wonder if we should enable retries for AWS SDK clients ONLY by default (and not for non-SDK smithy clients).

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from 61a604b to c6c51da Compare January 6, 2026 21:48
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from c6c51da to 929a051 Compare January 6, 2026 22:11
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from c2d8eca to e43bec8 Compare January 8, 2026 08:20
@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from e43bec8 to fb0de85 Compare January 8, 2026 20:01
@vcjana vcjana marked this pull request as ready for review January 8, 2026 20:32
@vcjana vcjana requested a review from a team as a code owner January 8, 2026 20:32
Copy link
Collaborator

@rcoh rcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic is backwards. This is important.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

@vcjana vcjana force-pushed the fix-retry-defaults-clean branch from 771078c to 61347dc Compare January 9, 2026 23:08
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

A new generated diff is ready to view.

A new doc preview is ready to view.

}

#[test]
fn test_client_with_new_behavior_version_builds_successfully() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test descriptions are too generic, we have multiple behavior versions and will add more in the future. This should be named according to what it is testing more specifically (e.g. test_default_retry_bmbv_2025_08_07 or similar)


#[tokio::test]
#[expect(deprecated)]
async fn test_connect_timeout_enabled_by_default_with_new_behavior_version() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment on naming

let behavior_version = params
.behavior_version
.unwrap_or_else(BehaviorVersion::latest);
let retry_partition = RetryPartition::new(default_partition_name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let retry_partition = RetryPartition::new(params.retry_partition.expect("retry partition name is required")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated docs on send() method are not correct Constructing an SDK client from Config::builder().<.....>.build() does not enable retries

4 participants