CI: a newer run cancels the one it supersedes #126

Merged
dev-agent merged 5 commits from ci-concurrency into main 2026-10-08 03:48:09 +00:00
Collaborator

A newer CI run now cancels the one it supersedes. The concurrency block is set once for the whole workflow, grouped per PR or branch, with cancel-in-progress: true.

Why: there's one runner. A superseded run used to hold it, and the GPU, until it was cancelled by hand. That includes the duplicate run from opening a PR with the e2e:full label already on it, as on #125. Our earlier attempt put concurrency on the e2e job only and didn't cancel anything. Gitea documents the workflow-level form (since 1.26).

Unrelated labels: adding a label other than e2e:full (say discuss) starts a run whose jobs all skip. In the shared group, that run would cancel the real one, so it gets a group of its own.

Gitea's label events, found while testing: the workflow sees the action as label_updated, not labeled, and github.event.label is empty.

  • That meant the old job filter never matched, so every label change ran checks plus the smoke e2e.
  • Checks now accept both action spellings, and recognise an e2e:full event from the PR's labels.
  • The cost: changing another label on an e2e:full PR restarts its full run.

Checked live on this PR: details are in the comment below.

  • Pushes cancel superseded runs.
  • An unrelated label skips without cancelling anything.
  • Adding e2e:full starts a full run that supersedes the push run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE

A newer CI run now cancels the one it supersedes. The `concurrency` block is set once for the whole workflow, grouped per PR or branch, with `cancel-in-progress: true`. **Why:** there's one runner. A superseded run used to hold it, and the GPU, until it was cancelled by hand. That includes the duplicate run from opening a PR with the `e2e:full` label already on it, as on #125. Our earlier attempt put `concurrency` on the `e2e` job only and didn't cancel anything. Gitea documents the workflow-level form (since 1.26). **Unrelated labels:** adding a label other than `e2e:full` (say `discuss`) starts a run whose jobs all skip. In the shared group, that run would cancel the real one, so it gets a group of its own. **Gitea's label events, found while testing:** the workflow sees the action as `label_updated`, not `labeled`, and `github.event.label` is empty. - That meant the old job filter never matched, so every label change ran checks plus the smoke e2e. - Checks now accept both action spellings, and recognise an `e2e:full` event from the PR's labels. - The cost: changing another label on an `e2e:full` PR restarts its full run. **Checked live on this PR:** details are in the comment below. - Pushes cancel superseded runs. - An unrelated label skips without cancelling anything. - Adding `e2e:full` starts a full run that supersedes the push run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added 1 commit 2026-10-08 03:36:03 +00:00
CI: a newer run cancels the one it supersedes
CI / checks (push) Skipped
CI / e2e (pull_request) Canceled after 0s
CI / checks (pull_request) Canceled after 23s
ef29a1271e
Workflow-level concurrency, per PR or branch, with cancel-in-progress.
The earlier attempt (job-level, on the e2e job) didn't cancel anything;
Gitea documents the workflow-level form. A label other than e2e:full
starts a run whose jobs all skip, so it gets a group of its own and
can't cancel the real run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added 1 commit 2026-10-08 03:36:20 +00:00
Development Plan: superseded runs are cancelled by CI now
CI / checks (push) Skipped
CI / e2e (pull_request) Canceled after 0s
CI / checks (pull_request) Canceled after 1m33s
9c181d973a
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added the discuss label 2026-10-08 03:36:38 +00:00
dev-agent added 1 commit 2026-10-08 03:38:06 +00:00
CI: Gitea's label events are label_updated in the payload
CI / checks (push) Skipped
CI / e2e (pull_request) Canceled after 27s
CI / event (pull_request) Successful in 2s
CI / checks (pull_request) Successful in 1m50s
8bfc1e5f24
Temporarily prints the event, to check what Gitea sends.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added the design label 2026-10-08 03:38:23 +00:00
dev-agent added 1 commit 2026-10-08 03:40:37 +00:00
CI: tell e2e:full label events by the PR's labels
CI / checks (push) Skipped
CI / event (pull_request) Successful in 3s
CI / checks (pull_request) Skipped
CI / e2e (pull_request) Skipped
b80225d821
Gitea leaves github.event.label empty.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent removed the designdiscuss labels 2026-10-08 03:41:17 +00:00
dev-agent added 1 commit 2026-10-08 03:41:18 +00:00
CI: drop the temporary event job
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m50s
CI / e2e (pull_request) Successful in 4m33s
8840facceb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
Author
Collaborator

Live results on this PR:

  1. A push cancels the run it supersedes. The second push cancelled run 446 on its own, and later pushes did the same (447 → 452 → 457).
  2. Gitea's label events use a different action name. The workflow sees label_updated, not labeled, and github.event.label is empty. A temporary job printed this: action=[label_updated] label=[]. Gitea maps the name to labeled only when deciding whether to trigger the workflow.
    • Consequence: the jobs' old if: github.event.action != 'labeled' never matched. Every label change has been running checks plus the smoke e2e.
    • My first group exception had the same blind spot: the discuss label run cancelled the real one (447 → 449).
  3. Fixed. Checks accept both action spellings, and an e2e:full label event is recognised from the PR's labels.
    • Adding design ran in its own group (451), skipped checks and e2e, and left the push run (450) going.
    • Adding e2e:full cancelled the push run (452) and started a full run (453: 48 walk seeds). I cancelled 453 by hand before e2e reached the GPU.
  4. Known cost: a label change on a PR that already has e2e:full restarts its full run. Removing three labels at once produced two such runs, which were cancelled within 2 s, before either used the runner.

The temporary job is removed in the last commit.

**Live results on this PR:** 1. **A push cancels the run it supersedes.** The second push cancelled run 446 on its own, and later pushes did the same (447 → 452 → 457). 2. **Gitea's label events use a different action name.** The workflow sees `label_updated`, not `labeled`, and `github.event.label` is empty. A temporary job printed this: `action=[label_updated] label=[]`. Gitea maps the name to `labeled` only when deciding whether to trigger the workflow. - Consequence: the jobs' old `if: github.event.action != 'labeled'` never matched. **Every label change has been running checks plus the smoke e2e.** - My first group exception had the same blind spot: the `discuss` label run cancelled the real one (447 → 449). 3. **Fixed.** Checks accept both action spellings, and an `e2e:full` label event is recognised from the PR's labels. - Adding `design` ran in its own group (451), skipped checks and e2e, and left the push run (450) going. - Adding `e2e:full` cancelled the push run (452) and started a full run (453: 48 walk seeds). I cancelled 453 by hand before e2e reached the GPU. 4. **Known cost:** a label change on a PR that already has `e2e:full` restarts its full run. Removing three labels at once produced two such runs, which were cancelled within 2 s, before either used the runner. The temporary job is removed in the last commit.
dongar approved these changes 2026-10-08 03:46:13 +00:00
dev-agent merged commit d0fde2f136 into main 2026-10-08 03:48:09 +00:00
dev-agent deleted branch ci-concurrency 2026-10-08 03:48:09 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#126