Repository navigation
ci: add concurrency groups to top-level workflows - #2333
Conversation
Cancel redundant in-progress runs on PR pushes so a rapid-fire feature branch with ~100 parallel jobs cannot monopolize runner capacity. Master pushes keep cancel-in-progress=false so every commit on the main branch is still fully validated. Applied to 85 top-level caller workflows. Skipped: 11 reusable templates (they inherit the caller's concurrency), claude.yml, project_*.yml, arduino_library_lint.yml, and the docker_compiler_*.yml image builds (cancelling mid-build would leave partial registry state). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/avr8js_uno_test.yml:
- Around line 3-5: Change the concurrency group to use github.run_id for non-PR
events and keep PRs deduplicated by ref: replace the current group expression
with one that evaluates to "${{ github.workflow }}-${{ github.event_name ==
'pull_request' && github.ref || github.run_id }}" and update cancel-in-progress
to be conditional (set to "${{ github.event_name == 'pull_request' }}" so only
PR runs cancel in-progress runs). This touches the concurrency `group` and
`cancel-in-progress` entries in the workflow.
In @.github/workflows/build_esp32c2.yml:
- Around line 3-5: The concurrency group currently uses a shared key that
collapses multiple master pushes; update the concurrency.group expression to use
github.ref for pull_request events but github.sha for push events (e.g. change
concurrency.group to something like ${{ github.workflow }}-${{ github.event_name
== 'pull_request' && github.ref || github.sha }}), and leave
concurrency.cancel-in-progress behaviour as-is (cancel-in-progress: ${{
github.event_name == 'pull_request' }}) so PRs still cancel pending runs while
pushes get unique queue keys.
In @.github/workflows/build_teensy41_ofled.yml:
- Around line 3-5: Change the concurrency group so non-PR runs use a unique
group (preventing queued push/master validations from canceling each other):
replace the current group expression (group: ${{ github.workflow }}-${{
github.ref }}) with a conditional that keeps the existing stable group for PRs
but appends a unique run identifier for non-PR events (use the existing
cancel-in-progress expression github.event_name == 'pull_request' and append
github.run_id for non-PRs), updating the concurrency.group line that references
${{ github.workflow }} and ${{ github.ref }} to include ${{ github.run_id }}
when github.event_name != 'pull_request'.
In @.github/workflows/build.yml:
- Around line 3-5: The concurrency block is ineffective because
cancel-in-progress: ${{ github.event_name == 'pull_request' }} will always be
false in this push-only workflow; either remove the entire concurrency block
(remove the concurrency: group/cancel-in-progress keys) if you don't want
serializing pushes, or change cancel-in-progress to a push-appropriate
expression (e.g. true to cancel previous runs for the same group) and/or adjust
group (currently using group: ${{ github.workflow }}-${{ github.ref }}) to
produce the desired uniqueness; update the concurrency keys (concurrency, group,
cancel-in-progress) accordingly.
In @.github/workflows/header-perf.yml:
- Around line 3-5: Current concurrency grouping groups all non-PR pushes by
branch which causes pending master/main pushes to be replaced; update the
concurrency.group expression so PR runs remain grouped by workflow+ref but
non-PR runs include a unique identifier (e.g., github.run_id) so each push
validation is its own group; implement this by changing the group expression
that currently uses github.workflow and github.ref (and checks
github.event_name) to conditionally append github.run_id when github.event_name
!= 'pull_request' while leaving PR behavior unchanged, and keep the existing
cancel-in-progress handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bc6458a3-76a1-4cfc-88b0-5522fa3b6daf
📒 Files selected for processing (85)
.github/workflows/avr8js_uno_test.yml.github/workflows/build.yml.github/workflows/build_adafruit_feather_nrf52840_sense.yml.github/workflows/build_adafruit_xiaoblesense.yml.github/workflows/build_apollo3_red.yml.github/workflows/build_apollo3_thing_explorable.yml.github/workflows/build_atmega8a.yml.github/workflows/build_attiny1604.yml.github/workflows/build_attiny1616.yml.github/workflows/build_attiny4313.yml.github/workflows/build_attiny85.yml.github/workflows/build_attiny88.yml.github/workflows/build_blackpill_stm32f4.yml.github/workflows/build_bluepill.yml.github/workflows/build_clone_and_compile.yml.github/workflows/build_digix.yml.github/workflows/build_due.yml.github/workflows/build_esp32_i2s_ws2812.yml.github/workflows/build_esp32c2.yml.github/workflows/build_esp32c3.yml.github/workflows/build_esp32c5.yml.github/workflows/build_esp32c6.yml.github/workflows/build_esp32dev.yml.github/workflows/build_esp32dev_idf3.3.yml.github/workflows/build_esp32dev_idf4.4.yml.github/workflows/build_esp32dev_namespace.yml.github/workflows/build_esp32h2.yml.github/workflows/build_esp32p4.yml.github/workflows/build_esp32s2.yml.github/workflows/build_esp32s3.yml.github/workflows/build_esp32wroom.yml.github/workflows/build_esp8266.yml.github/workflows/build_esp_extra_libs.yml.github/workflows/build_giga_r1.yml.github/workflows/build_linux.yml.github/workflows/build_maple_map.yml.github/workflows/build_mgm240s_thingplusmatter.yml.github/workflows/build_nano_every.yml.github/workflows/build_nrf52840_dk.yml.github/workflows/build_nrf52_xiaoblesense.yml.github/workflows/build_nucleo_f429zi.yml.github/workflows/build_nucleo_f439zi.yml.github/workflows/build_rgbw.yml.github/workflows/build_rp2040.yml.github/workflows/build_rp2350.yml.github/workflows/build_rp2350B.yml.github/workflows/build_stm103tb.yml.github/workflows/build_teensy30.yml.github/workflows/build_teensy31.yml.github/workflows/build_teensy32.yml.github/workflows/build_teensy35.yml.github/workflows/build_teensy36.yml.github/workflows/build_teensy40.yml.github/workflows/build_teensy41.yml.github/workflows/build_teensy41_ofled.yml.github/workflows/build_teensyLC.yml.github/workflows/build_teensy_octo.yml.github/workflows/build_uno.yml.github/workflows/build_uno_r4_wifif.yml.github/workflows/build_wasm.yml.github/workflows/build_wasm_compilers.yml.github/workflows/build_yun.yml.github/workflows/check_attiny85.yml.github/workflows/check_bluepill_size.yml.github/workflows/check_esp32_size.yml.github/workflows/check_teensy30_size.yml.github/workflows/check_teensy31_size.yml.github/workflows/check_teensy32_size.yml.github/workflows/check_teensy35_size.yml.github/workflows/check_teensy36_size.yml.github/workflows/check_teensy41_size.yml.github/workflows/check_teensylc_size.yml.github/workflows/check_uno_size.yml.github/workflows/docs2.yml.github/workflows/example_test_linux.yml.github/workflows/example_test_macos.yml.github/workflows/example_test_windows.yml.github/workflows/header-perf.yml.github/workflows/iwyu.yml.github/workflows/qemu_esp32c3_test.yml.github/workflows/qemu_esp32dev_test.yml.github/workflows/qemu_esp32s3_test.yml.github/workflows/unit_test_linux.yml.github/workflows/unit_test_macos.yml.github/workflows/unit_test_windows.yml
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Lists workflows using the shared github.ref concurrency group while also having non-PR triggers.
python - <<'PY'
from pathlib import Path
for p in sorted(Path(".github/workflows").glob("*.y*ml")):
s = p.read_text()
if "group: ${{ github.workflow }}-${{ github.ref }}" not in s:
continue
non_pr_events = []
for event in ("push", "workflow_dispatch", "schedule"):
if f"\n {event}:" in s or f"\n{event}:" in s:
non_pr_events.append(event)
if non_pr_events:
print(f"{p}: shared github.ref concurrency also applies to non-PR events: {', '.join(non_pr_events)}")
PYRepository: FastLED/FastLED
Length of output: 9053
Scope concurrency group to PRs only; use unique identifiers for non-PR runs.
GitHub Actions concurrency keeps only one pending run per group. With the current shared group based on github.workflow and github.ref, non-PR push and workflow_dispatch runs on the same branch can queue behind each other, preventing all from executing even with cancel-in-progress: false. Use github.run_id for non-PR events to give each non-PR run its own group while keeping PRs deduplicated.
Proposed fix
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/avr8js_uno_test.yml around lines 3 - 5, Change the
concurrency group to use github.run_id for non-PR events and keep PRs
deduplicated by ref: replace the current group expression with one that
evaluates to "${{ github.workflow }}-${{ github.event_name == 'pull_request' &&
github.ref || github.run_id }}" and update cancel-in-progress to be conditional
(set to "${{ github.event_name == 'pull_request' }}" so only PR runs cancel
in-progress runs). This touches the concurrency `group` and `cancel-in-progress`
entries in the workflow.
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
GitHub Actions concurrency behavior: when cancel-in-progress is false, does the platform still cancel/replace older pending runs in the same concurrency group?
💡 Result:
Yes, when cancel-in-progress is false, the GitHub Actions platform still cancels (replaces) older pending runs in the same concurrency group. Concurrency ensures at most one running and one pending job/workflow per group. When a new run is queued and there is already one running, the new one becomes pending and cancels any existing pending run, replacing it. Running jobs are not canceled unless cancel-in-progress: true.
Citations:
- 1: https://docs.github.com/enterprise-cloud@latest/actions/using-jobs/using-concurrency
- 2: https://docs.github.com/en/actions/using-jobs/using-concurrency
- 3: Why is my job cancelling when I have 'cancel-in-progress' set to false? actions/runner#3722
Concurrency group will suppress queued master pushes
The shared concurrency group for all master pushes will cause pending runs to be dropped when multiple pushes arrive in quick succession. GitHub Actions maintains at most one running and one pending run per concurrency group; any new queueing run replaces the existing pending one. With cancel-in-progress: false, running jobs are preserved, but intermediate pending runs will never execute—conflicting with the goal of completing master validations end-to-end.
Use a unique key for push events (e.g., github.sha) while keeping github.ref for pull requests:
Recommended fix
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build_esp32c2.yml around lines 3 - 5, The concurrency
group currently uses a shared key that collapses multiple master pushes; update
the concurrency.group expression to use github.ref for pull_request events but
github.sha for push events (e.g. change concurrency.group to something like ${{
github.workflow }}-${{ github.event_name == 'pull_request' && github.ref ||
github.sha }}), and leave concurrency.cancel-in-progress behaviour as-is
(cancel-in-progress: ${{ github.event_name == 'pull_request' }}) so PRs still
cancel pending runs while pushes get unique queue keys.
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
GitHub Actions concurrency cancel-in-progress false pending workflow run canceled same concurrency group github.run_id fallback
💡 Result:
In GitHub Actions, when using concurrency with cancel-in-progress: false, a concurrency group allows at most one running and one pending workflow run or job at a time. When a new run is queued for the same group: - If there is a running run, the new one becomes pending (without canceling the running one). - If there is already a pending run in the group, the existing pending run is canceled, and the new queued run takes its place as the pending one. This behavior occurs regardless of whether the concurrency group uses github.run_id as a fallback (e.g., group: ${{ github.head_ref || github.run_id }}). The github.run_id fallback ensures a unique group name when github.head_ref is undefined (e.g., non-PR events), preventing conflicts across different runs. However, if multiple triggers produce the same group name (not using a unique run_id), a pending run can still be canceled by a newer queued run in that shared group. The cancellation of pending runs is the default behavior to enforce the "one running + one pending" limit; cancel-in-progress: false only prevents canceling running (in-progress) runs, not pending ones. Example workflow snippet from docs: concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: false Here, runs with the same head_ref (same PR/branch) share a group. A new push/PR update queues a new run, which cancels any existing pending run in that group and becomes the new pending run (while letting any running run finish). This is confirmed in official GitHub docs and discussed in issues like actions/runner#3722, where users observe pending jobs canceling despite cancel-in-progress: false.
Citations:
- 1: https://docs.github.com/en/actions/using-jobs/using-concurrency
- 2: https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency
- 3: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
- 4: Why is my job cancelling when I have 'cancel-in-progress' set to false? actions/runner#3722
- 5: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-when-your-workflow-runs/control-the-concurrency-of-workflows-and-jobs
- 6: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
Use a unique group for non-PR runs.
Line 4 groups every push to master into the same concurrency group. Even with Line 5 set to false for pushes, GitHub Actions can still replace older pending runs in that group, so queued master validations may be dropped instead of running end-to-end. GitHub Actions concurrency limits each group to one running and one pending run; when a new run queues for the same group with an existing pending run, the pending run is canceled and replaced—regardless of cancel-in-progress: false (which only protects running runs).
Proposed fix
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build_teensy41_ofled.yml around lines 3 - 5, Change the
concurrency group so non-PR runs use a unique group (preventing queued
push/master validations from canceling each other): replace the current group
expression (group: ${{ github.workflow }}-${{ github.ref }}) with a conditional
that keeps the existing stable group for PRs but appends a unique run identifier
for non-PR events (use the existing cancel-in-progress expression
github.event_name == 'pull_request' and append github.run_id for non-PRs),
updating the concurrency.group line that references ${{ github.workflow }} and
${{ github.ref }} to include ${{ github.run_id }} when github.event_name !=
'pull_request'.
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat .github/workflows/build.ymlRepository: FastLED/FastLED
Length of output: 2364
Remove or fix the ineffective cancel-in-progress condition in this push-only workflow.
The workflow has no pull_request trigger, so github.event_name is always 'push'. This makes the condition cancel-in-progress: ${{ github.event_name == 'pull_request' }} always false, which doesn't provide the intended PR cancellation behavior. Either remove the concurrency block if serializing master pushes is unintended, or use a condition appropriate for push-only workflows.
Option A: remove the no-op concurrency block for this push-only workflow
name: build
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: ${{ github.event_name == 'pull_request' }}
-
on:Option B: keep the pattern but make non-PR runs unique
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| name: build | |
| on: |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build.yml around lines 3 - 5, The concurrency block is
ineffective because cancel-in-progress: ${{ github.event_name == 'pull_request'
}} will always be false in this push-only workflow; either remove the entire
concurrency block (remove the concurrency: group/cancel-in-progress keys) if you
don't want serializing pushes, or change cancel-in-progress to a
push-appropriate expression (e.g. true to cancel previous runs for the same
group) and/or adjust group (currently using group: ${{ github.workflow }}-${{
github.ref }}) to produce the desired uniqueness; update the concurrency keys
(concurrency, group, cancel-in-progress) accordingly.
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check if the workflow file exists and view its content
cat -n .github/workflows/header-perf.yml 2>/dev/null || echo "File not found"Repository: FastLED/FastLED
Length of output: 3680
🌐 Web query:
GitHub Actions concurrency pending run replacement behavior cancel-in-progress
💡 Result:
In GitHub Actions, concurrency groups limit execution to at most one running and one pending job or workflow run at a time. When a new job or workflow with the same concurrency group is queued: - If there is a job/workflow in progress (running), the new one becomes pending. - Any existing pending job/workflow in the group is automatically canceled, and the new queued one takes its place. The 'cancel-in-progress: true' option additionally cancels any currently running (in-progress) job/workflow, allowing the new one to proceed immediately. If false (default), the running one completes first, then the pending new one starts. This ensures the latest trigger replaces prior pending runs, preventing queue buildup. Ordering of runs in the group is not guaranteed. Example workflow YAML: on: push: branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: example: runs-on: ubuntu-latest steps: - run: echo "Latest run" No changes to this behavior in recent changelogs (up to 2026).
Citations:
- 1: https://docs.github.com/en/actions/using-jobs/using-concurrency
- 2: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-when-your-workflow-runs/control-the-concurrency-of-workflows-and-jobs
- 3: https://docs.github.com/enterprise-cloud@latest/actions/using-jobs/using-concurrency
- 4: https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency
- 5: Why is my job cancelling when I have 'cancel-in-progress' set to false? actions/runner#3722
Make non-PR concurrency groups unique to preserve master/main validation.
Line 4 groups every push run for refs/heads/master or refs/heads/main together. In GitHub Actions, when a new run is queued to the same concurrency group, any existing pending run in that group is automatically canceled and replaced—even when cancel-in-progress is false. Per GitHub's official documentation (https://docs.github.com/en/actions/using-jobs/using-concurrency), the cancel-in-progress setting only controls whether currently running jobs are canceled; pending job replacement happens regardless. This means intermediate master/main validation runs can be skipped under backlog, conflicting with the stated objective.
Keep PR runs grouped by branch, but give non-PR runs a unique group:
Proposed fix
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/header-perf.yml around lines 3 - 5, Current concurrency
grouping groups all non-PR pushes by branch which causes pending master/main
pushes to be replaced; update the concurrency.group expression so PR runs remain
grouped by workflow+ref but non-PR runs include a unique identifier (e.g.,
github.run_id) so each push validation is its own group; implement this by
changing the group expression that currently uses github.workflow and github.ref
(and checks github.event_name) to conditionally append github.run_id when
github.event_name != 'pull_request' while leaving PR behavior unchanged, and
keep the existing cancel-in-progress handling.
Summary
cancel-in-progress: ${{ github.event_name == 'pull_request' }}, so master-branch pushes are still each validated end-to-end.Motivation
A single feature branch fanning out ~100 parallel jobs was starving the GitHub-hosted runner pool — at the time this PR was opened the repo had ~1785 queued runs vs ~75 in_progress, with a 4-hour-old master push sitting in the queue unassigned. Canceling redundant per-branch PR runs is the standard fix for this.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit