CI has no concurrency group — superseded runs are never cancelled #158

Open
opened 2026-08-29 07:20:21 +00:00 by claude-bot · 0 comments

.forgejo/workflows/ci.yml has no top-level concurrency: key, so every push to a branch or PR starts a fresh run while the previous run for that same ref continues to completion.

Context

The shared Forgejo Actions runners are saturated — see Rhoving/iac-repo#371. Measured 2026-08-29: all six fleet-wide job slots were occupied, with three repos pushing at once, and jobs turning over in roughly 1–2 minutes. Runner capacity is shared across every repo on this instance, so superseded runs here are directly other repos' queue wait.

Several repos on this instance already set a top-level concurrency group (Quest-Board, Radome, TeaLeaves, ChoreMachine, HomeBooks, BatteryStorageCalculator). These workflows do not.

Affected

  • .forgejo/workflows/ci.yml (job: build-test)

Proposed

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Include github.workflow in the group so separate workflows in the same repo don't cancel each other.

⚠️ Before enabling cancel-in-progress: true, check that any teardown this CI relies on runs under cancellation (if: always()). Cancelled jobs skip normal cleanup steps. Leaked postgres:18 service containers aged 7–11h were found inside the runners' DinD daemons on 2026-08-29 and had to be removed by hand (Rhoving/iac-repo#292) — that failure mode gets more frequent, not less, if cancellation is enabled without cleanup that survives it.

Definition of done

  • Any teardown the CI depends on verified to run under cancellation
  • Top-level concurrency: added to .forgejo/workflows/ci.yml
  • Confirmed superseded runs actually cancel, by pushing twice in quick succession

Refs Rhoving/iac-repo#371

`.forgejo/workflows/ci.yml` has no top-level `concurrency:` key, so every push to a branch or PR starts a fresh run while **the previous run for that same ref continues to completion**. ## Context The shared Forgejo Actions runners are saturated — see Rhoving/iac-repo#371. Measured 2026-08-29: all six fleet-wide job slots were occupied, with three repos pushing at once, and jobs turning over in roughly 1–2 minutes. Runner capacity is shared across every repo on this instance, so superseded runs here are directly other repos' queue wait. Several repos on this instance already set a top-level concurrency group (`Quest-Board`, `Radome`, `TeaLeaves`, `ChoreMachine`, `HomeBooks`, `BatteryStorageCalculator`). These workflows do not. ## Affected - `.forgejo/workflows/ci.yml` (job: build-test) ## Proposed ```yaml concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true ``` Include `github.workflow` in the group so separate workflows in the same repo don't cancel each other. ⚠️ Before enabling `cancel-in-progress: true`, check that any teardown this CI relies on runs under cancellation (`if: always()`). Cancelled jobs skip normal cleanup steps. Leaked `postgres:18` service containers aged 7–11h were found inside the runners' DinD daemons on 2026-08-29 and had to be removed by hand (Rhoving/iac-repo#292) — that failure mode gets more frequent, not less, if cancellation is enabled without cleanup that survives it. ## Definition of done - [ ] Any teardown the CI depends on verified to run under cancellation - [ ] Top-level `concurrency:` added to `.forgejo/workflows/ci.yml` - [ ] Confirmed superseded runs actually cancel, by pushing twice in quick succession Refs Rhoving/iac-repo#371
Sign in to join this conversation.
No description provided.