Cancel superseded pull-request runs instead of queueing them #1060
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1060
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/cancel-superseded-pr-runs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every rebase or amend of a pull request started a new run while the run it superseded stayed in the queue. On this host there is one runner, so those dead runs are not free — they are the difference between the queue draining in hours and in days, and they report on a commit nobody will merge.
Adds a concurrency group keyed on the PR number with
cancel-in-progresson pull requests only.Measured on the current queue: 177 workflow runs in ~8 h, median 239 s between run starts, so roughly 15 pull requests an hour. The backlog is 192 open PRs, and every rebase added up to five more jobs on top of runs that were already obsolete. After this lands, rebasing a PR costs exactly one run instead of two.
Pushes to
mainare deliberately excluded from cancellation: each describes a different commit, and a cancelled push run is a gap in the history of the default branch.