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

fix(util-retry): correct attempts count on StandardRetryStrategy #4891

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Jun 27, 2023

Issue

Issue number, if available, prefixed with "#"

Description

This PR fixes the attempts count used in StandardRetryStrategy in util-retry. The number of attempts made is one more than the number of retries. The correct attempts count is then used to compare against maxAttempts to determine if retries should be made.

This corrects the behavior of StandardRetryStrategy to be congruent with the documentation here: https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html

Testing

Updated tests to cover case where max attempts is set to 1 which should disable any retries.

Additional context

Add any other context about the PR here.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@srchase srchase requested review from a team as code owners June 27, 2023 16:59
@srchase srchase force-pushed the fix-max-attempts branch 2 times, most recently from 71150a7 to ac14d76 Compare June 27, 2023 19:04
@srchase srchase force-pushed the fix-max-attempts branch from ac14d76 to 397b004 Compare June 27, 2023 20:39
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants