feat: add max-attempts and retry-mode input parameters#203
Open
AdunSG wants to merge 2 commits into
Open
Conversation
Expose AWS SDK retry configuration as action inputs, allowing users to control retry behavior without relying on environment variables that bleed into other workflow steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kddejong
reviewed
May 26, 2026
Contributor
kddejong
left a comment
There was a problem hiding this comment.
Thanks for the contribution — the feature makes sense and the implementation is clean. A few things needed before we can merge:
Missing tests: parseRetryMode in src/utils.ts needs unit tests covering:
- Valid inputs (
'standard','adaptive') return the expected value - Invalid input (e.g.
'exponential') throws with the expected error message - Empty string / undefined returns undefined
The validation schema changes should also have test coverage confirming max-attempts and retry-mode are parsed correctly through validateAndParseInputs.
Address PR review feedback requesting test coverage for the new retry configuration inputs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
There was no existing test for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
max-attemptsandretry-modeas action input parameters to configure AWS SDK retry behaviorCloudFormationClient(andS3Client) constructor configAWS_MAX_ATTEMPTSandAWS_RETRY_MODEenvironment variables, which are global and can bleed into other workflow stepsMotivation
There was no way to configure the SDK-level retry behavior from the action inputs. Users had to set environment variables outside the action context, which is not discoverable and affects the entire job.
Changes
action.yml: Addedmax-attemptsandretry-modeinput definitionssrc/utils.ts: AddedparseRetryMode()validator (accepts'standard'or'adaptive')src/validation.ts: Added both fields to the base schema (applies to all modes)src/main.ts: Reads inputs and setsmaxAttempts/retryModeon the shared client configurationTest plan
dist/index.jsrebuilt successfullymax-attempts: 10andretry-mode: adaptive🤖 Generated with Claude Code
Please notice that although i created this PR using Claude Code i did review the changes myself and the need for this feature is real. Highly parallelized stack deployment can cause issues with Rate Excceeded errors.