aws-sdk-js-codemod
aws-sdk-js-codemod copied to clipboard
[Feature]: Use codemod to convert RetryDelayOptions
Self-service
- [ ] I'd be willing to implement this feature
Problem
AWS.config.update({
maxRetries: request_params.maxRetries,
retryDelayOptions: {
base: request_params.retryDelay,
},
})
Solution
Requesting codemod to convert retryDelayOptions as they are deprecated in SDK V3 clients.
Alternatives
I have used ConfiguredRetryStrategy however I noticed some calls are not getting executed. Initially I had throttling error so I added + 1. After that I don't see any error. Thus, it would be helpful to have codemod show correct transalation or update SDK documentation. I am submitting this feature request per our discussion.
request_params.maxRetries = 8 request_params.retryDelay = 600
const maxRetries = request_params.maxRetries;
const base = request_params.retryDelay;
const retryStrategy = new ConfiguredRetryStrategy(maxRetries + 1, base);
Additional context
No response
As of >0.25.0, we add a comment to assist tranform retryDelayOptions
Example: https://github.com/awslabs/aws-sdk-js-codemod/blob/main/src/transforms/v2-to-v3/fixtures/config/retryDelayOptions.output.js
As of >0.25.0, we add a comment to assist tranform
retryDelayOptionsExample: https://github.com/awslabs/aws-sdk-js-codemod/blob/main/src/transforms/v2-to-v3/fixtures/config/retryDelayOptions.output.js
However, this documentation doesn't clarify how to convert retryDelayOptions with example for base