Repository navigation
Let labelled pull requests keep their superseded CI runs - #684
Merged
Merged
Conversation
Cancelling a superseded run throws away the artifacts it would have uploaded, which is the very thing the screenshot experiments in #658, #661 and #681 exist to look at, and it makes each variant wait for the running build before it can start. Raised by hannesa2 on #623. - Read cancel-in-progress from the pull request's labels, so that a pull request labelled keep-runs runs every push to completion - Leave every other pull request cancelling as it does now, and master and tag builds untouched, since their group is keyed per run
Contributor
goneng
added a commit
to goneng/gitx
that referenced
this pull request
Sep 19, 2026
gitx#684 landed with the open question in its body unanswered: whether to key this on a new `keep-runs` label or on `pipeline`, which the screenshot pull requests already carry. * Read `cancel-in-progress` from `pipeline` rather than `keep-runs`, so a pull request that is already marked as CI work keeps its runs without anyone having to remember a second label.
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.




Per the thread on #623: cancelling a superseded run throws away the
artifacts it would have uploaded, which is the very thing the screenshot
experiments in #658, #661 and #681 exist to look at, and it makes each
variant wait for the running build before it can start.
cancel-in-progressfrom the pull request's labels, so that apull request labelled
keep-runsruns every push to completionand tag builds untouched, since their group is keyed per run
Two things worth knowing before this is useful:
keep-runslabel does not exist in this repo yet, so nothing canmatch it and every pull request goes on cancelling exactly as it does
today until the label is created and applied. Happy to create it, or
go ahead.
pipeline. If you would rather not maintain a second label, say soand I will key the expression on
pipelineinstead, which needs nonew habit at all.
Also note the expression is evaluated when a run is created, so adding
the label mid-run does not rescue a run that is already going.
Test plan:
YAML.load_fileparses the workflow and readscancel-in-progressback as the expression string, so the syntax is sound
should cancel the first run, exactly as today
keep-runsand pushing twice should leaveboth runs alive, each uploading its own artifacts