-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Adds a concurrency group to the Release workflow so that rapid pushes to main (e.g., a dependabot batch, multiple squash-merges) cannot trigger parallel release-please runs. Concurrent runs risk conflicting writes to the release manifest and consume unnecessary runner minutes.
Optimizations
1. Release Workflow Concurrency Guard
Type: Conditional Execution / Resource Sizing
Impact: Eliminates duplicate workflow runs on burst pushes to main; saves ~1–5 minutes of runner time per burst event
Risk: Low
Changes:
- Added
concurrency.group: releasewithcancel-in-progress: falsetorelease.yml
Rationale: cancel-in-progress: false queues runs rather than cancelling them, because release-please is stateful — each run processes new commits and updates .release-please-manifest.json. Cancelling a run mid-flight could leave the manifest in an inconsistent state. Queuing guarantees sequential processing with no wasted parallel work.
Detailed Analysis
Before: Every push to main starts a new release-please job immediately, regardless of how many are already running. A burst of 3 dependabot merges in <60 seconds would start 3 simultaneous release-please jobs.
After: The second and third jobs queue behind the first. Once the first completes and updates the manifest, the queued job runs on the already-updated state (and typically completes faster because there is less work to do).
All other workflows were reviewed and found to be already well-optimised:
- CI (
ci.yml): path filters, concurrency withcancel-in-progress: true, npm cache, lint deduplicated to Linux only. - Validate PR Title: minimal, 5-minute timeout, appropriate triggers.
- Copilot Setup Steps / Agentics Maintenance: auto-managed or utility workflows, no changes warranted.
Expected Impact
- Time Savings: ~1–5 minutes per burst-push event (eliminates redundant parallel
release-pleaseruns) - Risk Level: Low —
cancel-in-progress: falseis the safe default for stateful release tooling; no existing behaviour is broken on normal single-push flows
Testing Recommendations
- Review workflow YAML syntax (no functional logic changed)
- Monitor the next few
push-to-mainevents to confirm runs queue correctly - Verify release-please manifest remains consistent after a multi-push burst
Generated by CI Optimization Coach · ◷
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/ci-coach.md@b466f28f0f65b68d6f2b10b15b44f51d787b93be
- expires on Mar 16, 2026, 1:13 PM UTC
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 create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 23088574756 -n agent-artifacts -D /tmp/agent-artifacts-23088574756
# Create a new branch
git checkout -b ci/release-concurrency-group-f1c9f7a13658badf
# Apply the patch (--3way handles cross-repo patches where files may already exist)
git am --3way /tmp/agent-artifacts-23088574756/aw-ci-release-concurrency-group.patch
# Push the branch to origin
git push origin ci/release-concurrency-group-f1c9f7a13658badf
# Create the pull request
gh pr create --title '[ci-coach] ci: add concurrency group to release workflow to prevent overlapping runs' --base main --head ci/release-concurrency-group-f1c9f7a13658badf --repo askpt/code-metricsShow patch (38 lines)
From 7db31221ba1d83c0005cdec8380df3706304c9c6 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sat, 14 Mar 2026 13:11:49 +0000
Subject: [PATCH] ci: add concurrency group to release workflow to prevent
overlapping runs
Parallel release-please executions triggered by rapid pushes to main can
conflict and waste runner minutes. Queuing them (cancel-in-progress: false)
ensures every commit is processed by the release state machine while
eliminating redundant concurrent runs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
.github/workflows/release.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f27dc00..f631487 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,12 @@ on:
branches:
- main
+# Prevent overlapping release-please runs; queue rather than cancel so every
+# commit is accounted for in the release state machine.
+concurrency:
+ group: release
+ cancel-in-progress: false
+
jobs:
release-please:
timeout-minutes: 5
--
2.53.0