Skip to content
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

[Feature]: Use codemod to convert RetryDelayOptions #610

Open
1 task
abhirpat opened this issue Oct 17, 2023 · 2 comments
Open
1 task

[Feature]: Use codemod to convert RetryDelayOptions #610

abhirpat opened this issue Oct 17, 2023 · 2 comments
Labels
enhancement New feature or request p2 This is a standard priority issue

Comments

@abhirpat
Copy link

abhirpat commented Oct 17, 2023

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

@abhirpat abhirpat added the enhancement New feature or request label Oct 17, 2023
@trivikr
Copy link
Member

trivikr commented Oct 26, 2023

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

@abhirpat
Copy link
Author

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

However, this documentation doesn't clarify how to convert retryDelayOptions with example for base

@trivikr trivikr added the p2 This is a standard priority issue label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants