fix: add concurrency groups to long-running CI workflows#3133
fix: add concurrency groups to long-running CI workflows#3133
Conversation
Add concurrency groups to gem-tests, integration-tests, examples, and playwright workflows. When multiple commits push to the same PR branch, stale runs are now cancelled automatically, reducing runner pool contention and queue times. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
WalkthroughAdds concurrency configuration to four GitHub Actions workflow files (examples, gem-tests, integration-tests, and playwright), enabling automatic cancellation of in-progress runs when new commits are pushed to the same branch or pull request, reducing runner pool contention. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryAdds a workflow-level Confidence Score: 5/5Safe to merge — workflow-only change with no impact on production code; concurrency logic is correct and consistent across all four files. All findings are P2 or below. The concurrency pattern correctly scopes PR runs by PR number (with cancellation) and main-branch runs by SHA (without cancellation). The previously raised playwright.yml concern is fully addressed in the current implementation. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Workflow triggered] --> B{Event type?}
B -->|pull_request| C["group = '{workflow}-pr-{pr_number}'"]
B -->|push to main / workflow_dispatch| D["group = '{workflow}-{sha}'"]
C --> E["cancel-in-progress: true"]
D --> F["cancel-in-progress: false"]
E --> G[New commit cancels prior PR run]
F --> H[Each commit gets isolated run, no cancellation]
Reviews (2): Last reviewed commit: "fix: use PR-number concurrency groups an..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef2222e114
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review: Add concurrency groups to CI workflowsOverall this is a solid, low-risk improvement using the standard GitHub pattern. Adding concurrency cancellation to the three workflows that also run on One concern worth addressing — Unlike the other three workflows, The fix is to use concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true # still cancels duplicate workflow_dispatch re-runs of the same SHASee the inline comment for the specific change. The other three files look good as-is. |
- Use github.event.pull_request.number for concurrency group key instead of github.head_ref, preventing cross-fork collisions when two PRs share the same branch name (e.g. patch-1) - Fall back to github.sha for non-PR events so each main push gets its own isolated run - Only cancel in-progress runs for pull_request events, matching the pattern already used in benchmark.yml — main branch runs are never cancelled so every merge commit is verified Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Review feedback addressed in b33ddc6All review comments have been addressed with a single commit that updates the concurrency configuration in all four workflows. Changes made1. Main branch runs are no longer cancelled (raised by @cursor[bot], @greptile-apps[bot], @claude[bot])
2. Fork-safe concurrency group keys (raised by @chatgpt-codex-connector[bot])
Concurrency behavior after this change
|
|
To use Codex here, create an environment for this repo. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b33ddc6. Configure here.
ReviewThe approach is correct and safe. A few things worth noting: The concurrency expression works as intendedgroup: ${{ github.event.pull_request.number && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}', github.workflow, github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
playwright.yml concurrency block is a no-op
Other PR-triggering workflows were skipped
PR description vs. implementationThe description says "Uses the standard GitHub pattern: |
…ages * origin/main: Fix initial page startup race for late-loading client bundles (#3151) chore: apply prettier formatting to tracked docs files (#3153) docs: comprehensive RSC API documentation and registration consolidation (#3140) Split rspec-package-tests into parallel generator/unit shards (#3134) fix: add concurrency groups to long-running CI workflows (#3133) refactor: add RenderRequest, JsCodeBuilder, and RenderingStrategy abstractions (#3094) fix: address deferred review items from PR #2849 (#3093) Add complimentary OSS license policy for React on Rails Pro (#3123) fix: centralize CI docs-only detection and add CLI flag validation (#3091) refactor: replace stub-throw + Object.assign with capability-based composition (#3096) Enhance address-review with parallel fixes, self-review, and Greptile verification (#3121) fix: Doctor no longer fails custom projects for missing bin/dev (#3117) fix: cap webpack <5.106.0 to prevent ExecJS SSR breakage (#3095) Add Rspack + RSC compatibility tests and documentation (#1828) (#3120) Add error scenarios hub and test pages (#2497) docs: document polyfill requirements for web-targeted server bundles (#3092) docs: RSC integration pitfalls from tutorial app (#3087) docs: fix render function/helper API documentation (#3088) Doctor: accept TS/TSX server bundle suffixes (#3111) feat: add CI guard requiring sidebar updates when adding docs (#3089)
## Summary Closes #3129 - Adds `concurrency` groups with `cancel-in-progress: true` to four long-running CI workflows: `gem-tests.yml`, `integration-tests.yml`, `examples.yml`, and `playwright.yml` - When multiple commits push to the same PR branch, stale runs are cancelled automatically, reducing runner pool contention and queue times (~5-10 minutes saved during peak activity) - Uses the standard GitHub pattern: `group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}` ## Test plan - [ ] Verify CI passes on this PR - [ ] Push a second commit to this PR branch while CI is running to confirm old runs get cancelled 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk workflow-only change that primarily affects CI scheduling; main risk is inadvertently canceling desired parallel runs within the same PR if grouping is too broad. > > **Overview** > Adds **workflow-level `concurrency`** to `examples.yml`, `gem-tests.yml`, `integration-tests.yml`, and `playwright.yml` so that **new commits on the same PR cancel prior in-progress runs**. > > Concurrency grouping keys off the PR number (or falls back to the commit SHA), with `cancel-in-progress` enabled only for `pull_request` events to avoid canceling main-branch runs. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b33ddc6. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added workflow concurrency configuration across multiple CI/CD pipelines to automatically cancel redundant runs when new commits are pushed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>

Summary
Closes #3129
concurrencygroups withcancel-in-progress: trueto four long-running CI workflows:gem-tests.yml,integration-tests.yml,examples.yml, andplaywright.ymlgroup: ${{ github.workflow }}-${{ github.head_ref || github.ref }}Test plan
🤖 Generated with Claude Code
Note
Low Risk
Low risk workflow-only change that primarily affects CI scheduling; main risk is inadvertently canceling desired parallel runs within the same PR if grouping is too broad.
Overview
Adds workflow-level
concurrencytoexamples.yml,gem-tests.yml,integration-tests.yml, andplaywright.ymlso that new commits on the same PR cancel prior in-progress runs.Concurrency grouping keys off the PR number (or falls back to the commit SHA), with
cancel-in-progressenabled only forpull_requestevents to avoid canceling main-branch runs.Reviewed by Cursor Bugbot for commit b33ddc6. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit