From 339306d16d5b4894db3b0ba558429f1eb1f5e949 Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Fri, 5 Jun 2026 14:53:51 +0200 Subject: [PATCH] ci: key main concurrency group per-sha so main runs stay conclusive (#436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #436: Playwright E2E (and Criterion benchmarks) were red/cancelled across consecutive main merges and nobody noticed, because main never reached a conclusive result. Root cause (verified): the concurrency group fell back to `github.ref` on push, so every main commit shared one group (`-refs/heads/main`). With `cancel-in-progress` false the *running* job completes, but GitHub still supersedes *queued* runs in the group — so in a PR-merge train each new main push cancelled the previous queued run, and main rarely produced a conclusive Playwright/benchmark result. A real regression in any covered view would have looked identical to the benign dataset-growth failures (#435). Fix: fall back to `github.sha` (not `github.ref`) on push, so every main commit gets its own concurrency group and is never superseded. PRs are unchanged — `head_ref` still groups per source branch, so cancel-in-progress keeps superseding stale PR runs. Applied to both workflows that shared the pattern (ci.yml, benchmarks.yml). This is the pure-hygiene half of #436; whether to promote Playwright to a required status check remains a separate maintainer decision. --- .github/workflows/benchmarks.yml | 6 ++++-- .github/workflows/ci.yml | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index eb915423..58b95f37 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,8 +1,10 @@ name: Benchmarks -# Cancel superseded PR runs; protect main + scheduled runs. +# Cancel superseded PR runs; keep every main commit's run conclusive. +# On push the group falls back to `github.sha` (not `github.ref`) so a later +# main push never supersedes an earlier main run (incl. queued ones) — #436. concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} on: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0540cdb5..5648bcd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,14 @@ name: CI -# Cancel superseded PR runs; protect main + scheduled runs. -# `head_ref || ref` keys per-PR-source-branch on PRs, falls back to ref on push. +# Cancel superseded PR runs; keep every main commit's run conclusive. +# On PRs, `head_ref` groups per source branch so cancel-in-progress supersedes +# stale runs. On push, the fallback is `github.sha` (NOT `github.ref`): keying +# every main commit to its own group means a later push never supersedes an +# earlier main run — even queued ones (#436). With a shared `refs/heads/main` +# group, rapid merges left main's runs `cancelled` and Playwright never reached +# a conclusive result, hiding real regressions. concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} on: