mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-07 06:19:43 -10:00
ci: scope triage finalize concurrency to PR runs
Co-authored-by: Qwen-Coder <[email protected]>
This commit is contained in:
1 parent
91a6274075
commit
d190b876c4
2 files changed
+16
-9
No files matched your search
@@ -44,10 +44,15 @@ permissions:
|
||||
contents: 'read'
|
||||
|
||||
concurrency:
|
||||
# One finalize at a time per head SHA: concurrent completions (CI + E2E)
|
||||
# would read-modify-write the same comment. cancel-in-progress: false — the
|
||||
# queued run re-reads fresh state, so the last one always converges.
|
||||
group: 'qwen-triage-finalize-${{ github.event.workflow_run.head_sha }}'
|
||||
# PR runs serialize per head SHA because concurrent completions would
|
||||
# read-modify-write the same comment. Non-PR firings can never have a triage
|
||||
# comment to finalize, so give them a unique group instead of letting them
|
||||
# occupy a PR's group before the job-level PR gate skips them.
|
||||
# cancel-in-progress: false — the queued PR run re-reads fresh state, so the
|
||||
# last one always converges.
|
||||
group: >-
|
||||
qwen-triage-finalize-${{ github.event.workflow_run.event == 'pull_request'
|
||||
&& github.event.workflow_run.head_sha || github.run_id }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -51,11 +51,13 @@ describe('qwen-triage-finalize workflow', () => {
|
||||
expect(workflow.jobs.finalize.steps).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('serializes concurrent finalize runs per head SHA without cancelling', () => {
|
||||
// Two listed workflows can complete near-simultaneously; a cancelled run
|
||||
// would drop its read-modify-write, so queue instead of cancel.
|
||||
expect(workflowText).toContain(
|
||||
"group: 'qwen-triage-finalize-${{ github.event.workflow_run.head_sha }}'",
|
||||
it('serializes PR finalize runs per head SHA without cancelling', () => {
|
||||
// Two listed workflows can complete near-simultaneously; a cancelled PR
|
||||
// run would drop its read-modify-write, so queue instead of cancel.
|
||||
// Non-PR firings get a unique group so they never occupy a PR's group
|
||||
// before the job-level event gate skips them.
|
||||
expect(workflow.concurrency.group).toBe(
|
||||
"qwen-triage-finalize-${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.head_sha || github.run_id }}",
|
||||
);
|
||||
expect(workflowText).toContain('cancel-in-progress: false');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user