Handle already-running job rerun 403s in transient auto-rerun workflow#1374
Merged
aaronpowell merged 2 commits intoMay 28, 2026
Merged
Conversation
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update GitHub Actions workflow to handle rerun safely
Handle already-running job rerun 403s in transient auto-rerun workflow
May 28, 2026
aaronpowell
approved these changes
May 28, 2026
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1374Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1374" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the transient failure auto-rerun workflow tolerate the known GitHub Actions rerun rejection that occurs when the containing workflow run is still considered in progress.
Changes:
- Captures
gh apirerun output instead of letting any non-zero exit immediately fail the step. - Skips only the known “workflow run containing this job is already running” failure.
- Preserves failure behavior for unexpected rerun API errors and only increments the rerun count after success.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/auto-rerun-transient-failures.yml |
Adds guarded handling around the job rerun API call for the known already-running workflow case. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Contributor
Minimum allowed line rate is |
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.
auto-rerun-transient-failures.ymlcould fail its own job whengh api .../jobs/{id}/rerunreturnedHTTP 403because the containing workflow run was still in progress. This change makes that specific rerun rejection non-fatal while preserving fail-fast behavior for unexpected API errors.Rerun API error handling
stdout/stderrfromgh api.The workflow run containing this job is already running.Failure semantics preserved
exit 1after printing the capturedghoutput.Rerun counting behavior
rerun_countis incremented only after a successful rerun request.