awslabs/aws-sdk-swift

Add back maxAttempts config back to AWS config

sichanyoo opened this issue · 0 comments

Background

During the client configuration rework for SRA compliance, a previously exposed optional config value for number of retries to do for a failed request got scrapped. It was part of AWSClientConfiguration and had the variable name maxAttempts, and it was added with this PR.

But the maxAttempts config option did not transfer over to the new corresponding config AWSDefaultClientConfiguration added with this rework PR.

The developer guide for the SDK currently advises SDK users to directly manipulate the retryStrategyOptions option, but that is NOT what we want to encourage the users do. Instead, users should generally only use the awsRetryMode and the maxAttempts options. The values configured on these two fields get used automatically to resolve the retryStrategyOptions used by the client.

But maxAttempts got scrapped, which is an issue.

To-do

Add back maxAttempts config by adding it to AWSDefaultClientConfiguration.
Update codegen / runtime default provider logic as needed to have the configured value for maxAttempts take effect.

Note

(Sorta) Tracks: smithy-lang/smithy-swift#818

  • After this config is added back, developer guide should scrap its current configure retry section and re-write it based on the two config fields (awsRetryMode and maxAttempts options) that we actually want to encourage users to use.