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 (#16070)
* ci: scope triage finalize concurrency to PR runs
Co-authored-by: Qwen-Coder <[email protected]>
* test(qwen-triage-finalize): compare the concurrency group with whitespace flattened
The group is a folded YAML scalar, so its rendered value keeps a newline
next to the more-indented continuation line. Pinning the literal string made
the assertion fail on the PR's own workflow file (Test (ubuntu-latest,
Node 22.x) at d190b876c4), while GitHub Actions treats whitespace inside
${{ }} as insignificant.
Compare the flattened expression instead, matching the normalizer already
used for multi-line conditions in capture-tmux-ci.test.js. The workflow file
does not change.
Co-authored-by: Qwen-Coder <[email protected]>
Patrol-Run: qwen-pr-closeout/jmvyeef987p
* test(qwen-triage-finalize): pin the folded group without normalizing
The more-indented continuation made the folded scalar keep a literal
newline, which the whitespace normalizer hid, so the assertion no longer
pinned the committed value. Put the expression on one physical line so it
folds to the single-space form, assert the parsed value directly, and
correct the comment that credited the wrap to the formatter.
Co-authored-by: Qwen-Coder <[email protected]>
---------
Co-authored-by: Qwen-Coder <[email protected]>
Co-authored-by: qwen-code patrol <[email protected]>
This commit is contained in:
2 files changed
+17
-9
No files matched your search
@@ -51,11 +51,15 @@ 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.
|
||||
// Keep the expression on one line: a more-indented continuation would
|
||||
// survive folding as a literal newline inside the group.
|
||||
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