Skip to content

fix: implement workflow-specific concurrency groups (#2073) #2123

@botantler

Description

@botantler

Goal and Rationale

Completes issue #2073 (CI Concurrency Fix) - the URGENT priority item from the roadmap. This fix eliminates cross-workflow cancellation that causes false CI failures in merge queue runs.

Why this matters:

Approach

Applied workflow-specific concurrency pattern to all remaining GitHub Actions workflows, following the established pattern already in ci.yaml:

concurrency:
  group: "${{ github.workflow }}-${{ github.ref }}"
  cancel-in-progress: true  # or false for critical workflows

Strategy:

  1. Identified workflows needing updates (5 total)
  2. Added or updated concurrency groups to include github.workflow
  3. Set appropriate cancel-in-progress values based on workflow purpose
  4. Preserved existing behavior while fixing the race condition

Impact

What Changed

5 workflows updated with workflow-specific concurrency:

  • cd.yaml - Added concurrency (cancel-in-progress: false for releases)
  • maintenance.yaml - Changed from generic "maintenance" to workflow-specific
  • publish-pages.yaml - Changed from generic "pages" to workflow-specific
  • test-pages.yaml - Added concurrency (cancel-in-progress: true)
  • sync-labels.yaml - Added concurrency (cancel-in-progress: false)

Pattern now consistent across all workflows:

  • ci.yaml - Already had workflow-specific concurrency (✅ previously done)
  • All other YAML workflows now follow same pattern

⚠️ Reusable workflows cannot be updated:

  • release.yaml - Uses reusable workflow (concurrency controlled by called workflow)
  • todos.yaml - Uses reusable workflow (concurrency controlled by called workflow)

What Was Added

  • Workflow-specific concurrency groups prevent cross-workflow cancellation
  • Each workflow now has independent concurrency control
  • Appropriate cancel-in-progress settings per workflow type

Design Decisions

Cancel-in-progress values:

  • true for parallel-safe workflows (ci, test-pages, publish-pages)
  • false for critical workflows (cd, maintenance, sync-labels) where interruption could cause issues

Why workflow-specific groups:

  • Multiple workflows trigger on same ref (e.g., merge_group)
  • Without workflow name in group, they share concurrency key
  • GitHub's cancel-in-progress cancels jobs from one workflow when another starts
  • Result: False failures even though tests didn't actually fail

Validation

Testing Approach

  1. ✅ Code review - verified pattern matches ci.yaml
  2. ✅ YAML syntax validated
  3. ⏳ Integration testing - CI will verify workflows run independently
  4. ⏳ Merge queue testing - monitor next 5-10 runs for false failures

Success Criteria (from #2073)

  • ✅ Concurrency groups include workflow name
  • ⏳ No cross-workflow cancellations (validate in CI)
  • ⏳ Matrix aggregation false failures eliminated (validate over 10+ merge queue runs)
  • ⏳ Pattern documented (separate PR for documentation recommended)

CI Expectations

  • All workflows should continue functioning normally
  • No more cross-workflow job cancellations
  • Merge queue runs should complete without false failures

Future Work

Immediate Next Steps:

  1. Monitor next 10 merge queue runs to confirm false failures eliminated
  2. Document pattern in workflow best practices guide
  3. Consider automated validation (CI check to ensure pattern compliance)

Related Issues Closed:

  • Fixes #2073 (CI concurrency configuration)
  • Fixes #1903 (parent investigation of merge queue failures)

Notes


Closes #2073
Closes #1903
Priority: URGENT (roadmap Phase 1)
Testing: Validation needed in CI/merge queue runs

AI generated by Daily Roadmap Progress


Note

This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available in the agent-artifacts artifact in the workflow run linked above.

To apply the patch locally:

# Download the artifact from the workflow run https://github.com/devantler-tech/ksail/actions/runs/21869352846
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 21869352846 -n agent-artifacts

# The patch file will be at agent-artifacts/tmp/gh-aw/aw.patch after download
# Apply the patch
git am agent-artifacts/tmp/gh-aw/aw.patch
Show patch preview (109 of 109 lines)
From ca8c20d595cd6fec827578eb60816650194153f6 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Tue, 10 Feb 2026 14:44:47 +0000
Subject: [PATCH] fix: implement workflow-specific concurrency groups (#2073)

Apply workflow-specific concurrency pattern to all remaining workflows
to eliminate cross-workflow cancellation and false CI failures.

Changes:
- cd.yaml: Add workflow-specific concurrency (cancel-in-progress: false for releases)
- maintenance.yaml: Update from generic 'maintenance' to workflow-specific group
- publish-pages.yaml: Update from generic 'pages' to workflow-specific group
- test-pages.yaml: Add workflow-specific concurrency (cancel-in-progress: true)
- sync-labels.yaml: Add workflow-specific concurrency (cancel-in-progress: false)

All workflows now follow the pattern:
  group: "${{ github.workflow }}-${{ github.ref }}"

This ensures each workflow has independent concurrency control and
prevents the matrix aggregation failures documented in #1903.

Closes #2073
Closes #1903
---
 .github/workflows/cd.yaml            | 4 ++++
 .github/workflows/maintenance.yaml   | 2 +-
 .github/workflows/publish-pages.yaml | 4 ++--
 .github/workflows/sync-labels.yaml   | 4 ++++
 .github/workflows/test-pages.yaml    | 4 ++++
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml
index 3e0cc48..09f9cf7 100644
--- a/.github/workflows/cd.yaml
+++ b/.github/workflows/cd.yaml
@@ -11,6 +11,10 @@ env:
   # proxy.golang.org outages. go.sum still verifies module integrity.
   GOPROXY: "https://proxy.golang.org|direct"
 
+concurrency:
+  group: "${{ github.workflow }}-${{ github.ref }}"
+  cancel-in-progress: false
+
 jobs:
   goreleaser:
     name: Release with GoReleaser
diff --git a/.github/workflows/maintenance.yaml b/.github/workflows/maintenance.yaml
index f21e7c8..af521bb 100644
--- a/.github/workflows/maintenance.yaml
+++ b/.github/workflows/maintenance
... (truncated)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions