Repository navigation
Cancel superseded CI runs and add job timeouts - #76
Merged
Merged
Conversation
The PR workflow ran 92 times from 2026-10-06 to 10-08 with no concurrency group; 44 of those runs were superseded by a newer commit on the same branch before they finished, and their jobs waited a median 33 minutes for a shared org runner. The workflow only builds, tests and lints, so cancel the older run, and give each job a 10-minute timeout (the slowest took 2 minutes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The concurrency group cancelled superseded runs on main as well as on pull requests. A cancelled run leaves that main commit with no result, and anything that reads main's status sees "cancelled". Pull request runs still cancel when a newer commit arrives. Each push to main now gets a group of its own (run_id), so it is neither cancelled nor left pending behind another push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Landing on the merge gates. Audit at head
|
This branch was successfully deployed
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.
What changes
pr.yaml: add the concurrency group${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}withcancel-in-progress: ${{ github.event_name == 'pull_request' }}. A new push to a PR cancels that PR's older run. Each push tomaingets a group of its own (its run id), somainruns are never cancelled and never left pending behind one another.Why
PolicyEngine is on GitHub Team, which runs at most 60 standard GitHub-hosted jobs at once across all the org's repos (limits). That pool was saturated from 2026-10-06 to 10-08, mostly by policyengine-us PR CI. At 2026-10-08 16:28Z all 60 slots were busy and 227 jobs were queued.
The jobs here are short, but each run waits in that queue. In the window below:
main);main) were superseded by a newer commit on the same branch before they finished. Their remaining job time was 67 runner-minutes on PRs and 15 onmain.How this was measured
Data: every workflow run created in the PolicyEngine org from 2026-10-06 00:00Z to a snapshot at 2026-10-08 16:28:45Z (2.687 days), with all of each run's jobs, fetched from the GitHub REST API.
completed_at(or the snapshot time, if still running) minusstarted_at.started_atminuscreated_atfor the same jobs.max(0, end - max(start, newer run's created_at)).Expected saving
mainruns, another 15 runner-min in the window. That was dropped so everymaincommit keeps its own result.)Risks and how they are bounded
mainruns are never cancelled. This is the repo's only workflow, and it only builds, tests and lints. Nothing deploys from it, so a cancelled run skips no deploy. The newest commit's run still runs every job, so required checks keep reporting on the PR head.main), so different PRs never cancel each other.Verification
Run on the branch after
git fetch originandgit rebase origin/main(already on the tip,ee50e7d9):actionlint1.7.12 onorigin/main's workflows and on the branch's: 0 findings on both..github/workflows, and no application code changed. This PR's own CI runs the edited workflow.🤖 Generated with Claude Code