Skip to content

Let labelled pull requests keep their superseded CI runs - #684

Merged
hannesa2 merged 1 commit into
masterfrom
keep-ci-runs-on-labelled-prs
Sep 19, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
keep-ci-runs-on-labelled-prs

Conversation

@goneng

@goneng goneng commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • 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

Two things worth knowing before this is useful:

  • The keep-runs label does not exist in this repo yet, so nothing can
    match 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.
  • All four of the screenshot pull requests above already carry
    pipeline. If you would rather not maintain a second label, say so
    and I will key the expression on pipeline instead, which needs no
    new 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_file parses the workflow and reads cancel-in-progress
    back as the expression string, so the syntax is sound
  • This pull request is itself the unlabelled case: a second push to it
    should cancel the first run, exactly as today
  • Labelling any pull request keep-runs and pushing twice should leave
    both runs alive, each uploading its own artifacts

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
@goneng
goneng marked this pull request as ready for review September 19, 2026 08:57
@hannesa2
hannesa2 merged commit d3343c6 into master Sep 19, 2026
2 checks passed
@hannesa2
hannesa2 deleted the keep-ci-runs-on-labelled-prs branch September 19, 2026 09:06
@hannesa2

Copy link
Copy Markdown
Contributor

Screenshot differs: emulatorApi=arm64 with 4 screenshot(s)

setpoint (old) | diff | actual screenshot (new)

00-commit-context-menu.pngscreenshot

01-history-view.pngscreenshot

02-main-window.pngscreenshot

03-staging-view.pngscreenshot

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants