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

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

.forgejo/workflows/ci.yml and .forgejo/workflows/cd.yml have 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 (pull_request only, job: test)
  • .forgejo/workflows/cd.yml (push-to-main, job: 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.

Note on publish/release workflows: where a workflow pushes images or artifacts, prefer cancel-in-progress: false. Cancelling a half-completed publish is worse than letting it finish; the group still prevents two from running at once.

⚠️ 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 and .forgejo/workflows/cd.yml
  • Confirmed superseded runs actually cancel, by pushing twice in quick succession

Refs Rhoving/iac-repo#371

`.forgejo/workflows/ci.yml` and `.forgejo/workflows/cd.yml` have 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` (pull_request only, job: test) - `.forgejo/workflows/cd.yml` (push-to-main, job: 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. Note on publish/release workflows: where a workflow pushes images or artifacts, prefer `cancel-in-progress: false`. Cancelling a half-completed publish is worse than letting it finish; the group still prevents two from running at once. ⚠️ 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` and `.forgejo/workflows/cd.yml` - [ ] Confirmed superseded runs actually cancel, by pushing twice in quick succession Refs Rhoving/iac-repo#371
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/WeatherBot#189
No description provided.