chore: add concurrency control to test project workflow - #2206
chore: add concurrency control to test project workflow#2206SHUBHANSHU602 wants to merge 1 commit into
Conversation
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
|
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe pull request testing workflow now groups runs by pull request number and cancels earlier in-progress runs when a new run starts. ChangesPull request workflow optimization
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change only limits outdated pull-request workflow runs so newer commits receive CI feedback sooner; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
|
@CodeRabbit review my pr |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== PR metadata ==='
gh pr view 2206 --repo asyncapi/generator --json number,title,body,state,isDraft,baseRefName,headRefName,changedFiles,additions,deletions,commits
echo
echo '=== Changed files ==='
gh pr diff 2206 --repo asyncapi/generator --name-only
echo
echo '=== PR diff ==='
gh pr diff 2206 --repo asyncapi/generator -- .github/workflows/pr-testing-with-test-project.yml
echo
echo '=== Workflow outline ==='
ast-grep outline .github/workflows/pr-testing-with-test-project.yml --items all || true
echo
echo '=== Workflow content ==='
cat -n .github/workflows/pr-testing-with-test-project.yml
echo
echo '=== Existing concurrency declarations ==='
rg -n -C 4 '^\s*concurrency\s*:|cancel-in-progress|group\s*:' .github/workflowsLength of output: 2840 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== PR diff ==='
gh pr diff 2206 --repo asyncapi/generator
echo
echo '=== Workflow content on PR branch ==='
cat -n .github/workflows/pr-testing-with-test-project.yml
echo
echo '=== Concurrency declarations in workflows ==='
rg -n -C 4 '^\s*concurrency\s*:|cancel-in-progress|^\s+group\s*:' .github/workflows || true
echo
echo '=== Workflow trigger and job identifiers ==='
rg -n -C 3 '^(name|on|jobs)\s*:|^\s{2}(pull_request|push|workflow_dispatch)\s*:|^\s{2}[A-Za-z0-9_-]+\s*:' .github/workflows/pr-testing-with-test-project.ymlLength of output: 10496
No issues found. The concurrency group is scoped to the pull request number. It cancels only outdated runs of this workflow for the same pull request. The configuration matches the existing pattern in
|
|
@Adi-204 ready for review |



Summary
Add workflow-level concurrency control to the
Test using test projectworkflow.Changes
cancel-in-progress: trueto cancel outdated workflow runs.Benefit
When multiple commits are pushed to the same PR in quick succession, outdated runs are cancelled and only the latest run continues.
This reduces unnecessary CI resource usage and provides faster feedback for the latest commit.
Resolve #2133
Generated-by:Summary by CodeRabbit