← Back to issue list

Cancel superseded 'Spread tests for source' runs to avoid exhausting self-hosted runners

View original Github issue

Metadata

Project
charmcraft
Number
#2903
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Fixed in #2904 by adding a concurrency group with cancel-in-progress to .github/workflows/spread.yaml, preventing stale runs from exhausting self-hosted runners.

Resolution: closed resolved

Reason: The issue was resolved by PR #2904 (commit 7c043c84), which added the requested concurrency block to spread.yaml to cancel superseded runs.

Evaluated by: mr-cal-bot

No scores available.

Issue body

## Problem The self-hosted `spread-enabled` runner pool (3 runners: `runner-charmcraft-ps7-2-{1,2,3}`) frequently gets exhausted by stale, superseded workflow runs of **"Spread tests for source"** (`.github/workflows/spread.yaml`). Unlike `.github/workflows/spread-manual.yaml`, `spread.yaml` has **no `concurrency:` block**. This means every new push to a PR branch starts a brand-new spread run without cancelling the previous (now-superseded) run on the same branch/ref. Since there are only 3 self-hosted runners available for the whole repo, a couple of PRs that get pushed to frequently can occupy all 3 runners with runs whose results no longer matter, blocking every other PR's spread tests (including manual spread runs) from ever being scheduled. For example, at the time of writing, these two runs had been occupying all 3 runners for hours with newer commits already pushed on top of them: - https://github.com/canonical/charmcraft/actions/runs/36483384216 (`work/update-starbase-2026-09-24`) - https://github.com/canonical/charmcraft/actions/runs/36476203077 (`work/CHARMCRAFT-725-Implement-metadata-mediation-for-actions-config`) ## Proposal Add a `concurrency:` group to `spread.yaml`, scoped per-workflow-per-ref (so unrelated branches/PRs don't cancel each other), with `cancel-in-progress: true`, e.g.: ```yaml concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true ``` This mirrors the pattern already used in `spread-manual.yaml` (currently scoped even more broadly, to the whole workflow name — that one may be intentional given how few runners exist, but is worth double-checking too). ## Benefit Pushing new commits to a PR would automatically cancel the now-irrelevant in-progress spread run for that PR's previous commit, freeing up self-hosted runners for other PRs/branches instead of leaving them tied up running tests against stale code.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b — closed resolved Fixed in #2904 by adding a concurrency group with cancel-in-progress to .github/workflows/spread.yaml, preventing stale runs from exhausting self-hosted runners.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 36
Complexity: 10
Confidence: 86
Actionability: 88
needs triage Maintainer-filed (AI-drafted) request to add a per-ref concurrency group with cancel-in-progress to .github/workflows/spread.yaml, since it lacks one and stale runs tie up the 3 self-hosted spread runners. Confirmed still unfixed; awaiting triage.
stealth/space-bunny-alpha
Impact: 62
Quick Win: 45
Complexity: 18
Confidence: 86
Actionability: 88
keep open CI infra ask: add a per-ref concurrency group with cancel-in-progress to .github/workflows/spread.yaml so superseded spread runs free the 3 self-hosted spread-enabled runners; verified the block is missing and the fix is specified.

Update history

Date Change
closed
created

Related work

  • Likely Fixed By: canonical/charmcraft#2904 (confidence 100%)

    PR #2904 added the concurrency configuration to spread.yaml as requested.

Related issues

Issue Project State Summary Similarity
#2904 ci: cancel superseded runs across PR workflows charmcraft merged Merged PR #2904 adds GitHub Actions concurrency groups with cancel-in-progress true, preventing superseded CI runs from consuming runner capacity. Fixes #2903.
73%
#571 ci: use self-hosted runners for ci workflows rockcraft closed Closed unmerged and superseded by PR #573, whose commit c8ff5823 moved spread tests to self-hosted runners labeled spread-enabled.
70%