-
Notifications
You must be signed in to change notification settings - Fork 55
fix(dispatch): per-role two-layer concurrency for per-repo (#981) #2465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8e0e3c9
72e66cd
346776d
354759b
6cc890f
c0ffc02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,11 @@ | |
| # workflow_call jobs. This is the per-repo equivalent of the per-org | ||
| # dispatch.yml + thin caller pair. | ||
| # | ||
| # Concurrency: each stage job declares a per-role cancel-in-progress dispatch group. | ||
| # Reusable stage workflows use distinct agent-scoped groups (fullsend-{stage}-agent-…) | ||
| # so workflow_call parents are not cancelled. Roles operate independently — review | ||
| # dispatches do not cancel triage, code, fix, etc. | ||
| # | ||
| # Flow: shim (per-repo) → reusable-dispatch.yml → reusable-{stage}.yml | ||
| # Nesting: 3 levels of workflow_call (within GitHub's 4-level limit) | ||
| # | ||
|
|
@@ -360,6 +365,9 @@ jobs: | |
| name: Triage | ||
| needs: route | ||
| if: needs.route.outputs.stage == 'triage' | ||
| concurrency: | ||
| group: fullsend-triage-${{ github.repository }}-${{ github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| # @v0 is hardcoded — GHA does not support expressions in uses:. | ||
| # fullsend_ai_ref controls the ref for composite actions inside stage workflows. | ||
| uses: fullsend-ai/fullsend/.github/workflows/reusable-triage.yml@v0 | ||
|
|
@@ -380,6 +388,9 @@ jobs: | |
| name: Code | ||
| needs: route | ||
| if: needs.route.outputs.stage == 'code' | ||
| concurrency: | ||
| group: fullsend-code-${{ github.repository }}-${{ github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| uses: fullsend-ai/fullsend/.github/workflows/reusable-code.yml@v0 | ||
| with: | ||
| event_type: ${{ github.event_name }} | ||
|
|
@@ -398,6 +409,9 @@ jobs: | |
| name: Review | ||
| needs: route | ||
| if: needs.route.outputs.stage == 'review' | ||
| concurrency: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] edge-case The review stage concurrency group uses github.event.pull_request.number || github.event.issue.number. When review is triggered by issues/labeled (ready-for-review), the key uses the issue number; when triggered by pull_request_target, it uses the PR number. For a linked issue/PR pair where the numbers differ, the two triggers produce different concurrency keys and will not cancel each other. Two concurrent review runs are possible for the same logical work item. The same concern applies to fix and retro stages. |
||
| group: fullsend-review-${{ github.repository }}-${{ github.event.pull_request.number || github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| uses: fullsend-ai/fullsend/.github/workflows/reusable-review.yml@v0 | ||
| with: | ||
| event_type: ${{ github.event_name }} | ||
|
|
@@ -416,6 +430,9 @@ jobs: | |
| name: Fix | ||
| needs: route | ||
| if: needs.route.outputs.stage == 'fix' | ||
| concurrency: | ||
| group: fullsend-fix-${{ github.repository }}-${{ github.event.pull_request.number || github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| uses: fullsend-ai/fullsend/.github/workflows/reusable-fix.yml@v0 | ||
| with: | ||
| event_type: ${{ github.event_name }} | ||
|
|
@@ -435,6 +452,9 @@ jobs: | |
| name: Retro | ||
| needs: route | ||
| if: needs.route.outputs.stage == 'retro' | ||
| concurrency: | ||
| group: fullsend-retro-${{ github.repository }}-${{ github.event.pull_request.number || github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| uses: fullsend-ai/fullsend/.github/workflows/reusable-retro.yml@v0 | ||
| with: | ||
| event_type: ${{ github.event_name }} | ||
|
|
@@ -453,6 +473,9 @@ jobs: | |
| name: Prioritize | ||
| needs: route | ||
| if: needs.route.outputs.stage == 'prioritize' | ||
| concurrency: | ||
| group: fullsend-prioritize-${{ github.repository }}-${{ github.event.issue.number }} | ||
| cancel-in-progress: true | ||
| uses: fullsend-ai/fullsend/.github/workflows/reusable-prioritize.yml@v0 | ||
| with: | ||
| event_type: ${{ github.event_name }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[low] edge-case
The review stage concurrency group uses github.event.pull_request.number || github.event.issue.number. When triggered by issues/labeled vs pull_request_target, different concurrency keys are produced for linked issue/PR pairs with different numbers. Two concurrent review runs are possible for the same logical work item.