Skip to content

ci: one CI/CD run per pushed ref; a newer push replaces one still waiting - #897

Merged
transfix merged 1 commit into
masterfrom
ci/ci-concurrency
Oct 30, 2026
Merged

transfix merged 1 commit into
masterfrom
ci/ci-concurrency

Conversation

@transfix

Copy link
Copy Markdown
Owner

Why

Every push to master started a full CI/CD run of about 20 jobs. Merges landed faster than the account's shared GitHub-hosted runners could clear those runs. On 2026-10-30, seven full runs (five master commits and two tags) were queued at once, plus runs for PRs that had already merged. Every other repository's jobs waited behind them, and the workstreams tracker's single-job gates sat queued for over an hour. Those stale runs were cancelled by hand.

Change

ci.yml gets a workflow-level concurrency group for push runs: master, tags and ci/full/**.

  • One run per pushed ref at a time. A newer push replaces that ref's run if it hasn't started yet, so intermediate master commits no longer pile up.
  • cancel-in-progress: false: a run that has started still finishes, so its package jobs seed their caches. That's the reason the per-job groups don't cancel in-progress, as the comment above them explains.
  • Pull requests are unchanged. Each PR run gets its own group (github.run_id), so cheap jobs still cancel per job and heavy jobs still finish.

The new group names (ci-push-<ref>, ci-run-<id>) can't collide with the per-job ci-<ref>-<job> groups.

Checked

  • The workflow parses as YAML, and the concurrency block reads as intended.
  • actionlint isn't installed locally, so this PR's own CI run is the first check of the expression. For a pull_request event it takes the per-run branch, so it has no effect on that run.

Not covered

  • PRs that merge mid-run: their last CI run still runs to the end. Cancelling those would need a pull_request: closed job.
  • Tag pushes: a tag still runs CI/CD on the same commit master already ran.

Either could be a follow-up if the queue builds up again.

…ting

Every push to master started a full 20-job CI/CD run, and merges landed faster than the
account's shared GitHub-hosted runners cleared them: on 2026-10-30 seven full runs (five
master commits and two tags) were queued at once, and every other repository's jobs waited
behind them.

A workflow-level concurrency group for pushes (master, tags, ci/full/**) keeps one run per ref
going and lets a newer push replace that ref's run still waiting to start. cancel-in-progress
stays false, so a running run finishes and its package jobs seed their caches, as the
per-job groups intend. Pull requests get a group per run (github.run_id), so they behave as
before: their cheap jobs cancel per job, their heavy jobs finish.
@transfix
transfix enabled auto-merge (squash) October 30, 2026 06:21
@transfix
transfix merged commit 2d40710 into master Oct 30, 2026
19 of 26 checks passed
@transfix
transfix deleted the ci/ci-concurrency branch October 30, 2026 08:47
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.

1 participant