refactor(ci): extract shared AWS-credentials retry into a composite action - #25
Merged
Merged
Conversation
…ction The three-shot AssumeRole retry (survives the first-colocation race with Crossplane minting xp-<svc>-gha-push, trading#616) was duplicated ~35 lines each in chart-release.yml and docker-release.yml, and had already drifted in comment wording. Factor it into actions/configure-aws-with-retry so both workflows share one copy and future edits land in one place. Referenced via pinpredict/.github/actions/...@main (not ./actions), since these reusable workflows check out the consumer repo — a local ./ path would resolve against the caller and fail. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
configure-aws-credentialsretry (try / sleep 30 / retry / sleep 60 / retry) — which survives the first-colocation race with Crossplane minting the per-servicexp-<svc>-gha-pushrole (pinpredict/trading#616) — into a new composite actionactions/configure-aws-with-retry.chart-release.ymlanddocker-release.ymleach drop ~35 lines of duplicated (and already comment-drifted) retry steps down to a singleuses:step. Net −92/+85 lines, retry logic now in one place.role-to-assume(required),aws-region(defaultus-east-1). Thematrix.role || secrets.AWS_ROLE_ARNfallback andenv.AWS_REGIONstay caller-side (secrets aren't readable inside a composite action), so the un-migrated-service fallback is unchanged.pinpredict/.github/actions/configure-aws-with-retry@main(matching the org convention for the other composites) rather than./actions/...— these reusable workflows check out the consumer repo, so a local./path would resolve against the caller and fail (the trap documented inactionlint.yml).Test plan
actionlint(repo-pinned 1.7.7) clean on both edited workflowsservice-template) pointing its releaseuses:at this branch — actionlint can't reach the composite-action resolution at runtime