Repository navigation
Conversation
xma2-decoder.yml was the only workflow without a concurrency group, so a superseded pull request run kept a windows-latest runner busy until it ended. Add the same block ci.yml uses, with the group prefix xma2-decoder-. Pull requests cancel the superseded run; pushes to main are not cancelled.
|
The YAML parses and the block matches the other workflows' shape. Two PRs get separate groups ( One claim in the description is not accurate: "A push to main ... is never cancelled." Two pushes to main both resolve to This is the exact pattern #771 removes from ci.yml, jactionlint.yml, no-game-data.yml and runtime.yml, and #771 leaves xma2-decoder.yml to this PR. Suggest using Note: the workflow runs on this PR are still AI-assisted review (Claude Code). |
… will A push keyed on the ref made two pushes to main share one group, and GitHub keeps at most one pending run per group, so a queued main run was replaced by a newer one. The group now uses the PR number or the run id, which is the shape ProjectLeonida#771 gives ci.yml, jactionlint.yml, no-game-data.yml and runtime.yml. CI-XMA2-CONCURRENCY
|
Fair point, and thanks for catching it. Two pushes to main did share 24569ea switches the group to |
|
The The link step reports Those three functions come from |
Claimed in the coordination issue as: CI-XMA2-CONCURRENCY (#14 (comment))
xma2-decoder.ymlis the only workflow in.github/workflows/without a top-levelconcurrency:block. It runs onwindows-latest, so a superseded pull request run keeps a Windows runner busy until it finishes.This adds the same block
ci.ymluses, with the group prefixxma2-decoder-:xma2-decoder-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}cancel-in-progress: ${{ github.event_name == 'pull_request' }}A pull request cancels its superseded run. A push gets its own group, because
run_idis unique per run, so a burst of merges cannot replace a queued main run before it starts. This is the shape #771 givesci.yml,jactionlint.yml,no-game-data.ymlandruntime.yml, which leaves this file to this PR. Nothing else in the file changes.The branch is based on origin/main. #595 (
persist-credentials: falseon checkout) was still open when this branch was made. Its hunk is elsewhere in the same file, so the two do not overlap.Tested:
python3 -I -c "import yaml,glob; ..."parses every file in.github/workflows/: printsok.concurrencyof xma2-decoder.yml is the expected mapping, and the top-level keys are name, on, permissions, concurrency, jobs.git diff --check: clean.git diff --numstat: 5 added lines, 0 removed.python3 -I tests/test_ci_registration.py: 15 tests OK.python3 -I tests/test_no_game_data_workflow.py: 3 tests OK.python3 -I tests/test_runtime_paths.py: 5 tests OK.python3 -I tests/test_pr_conflict_label.py: 12 tests OK.python3 -I scripts/check_no_game_data.py .github/workflows/xma2-decoder.yml: exit 0.xma2-decoder-pull_request-<n>with different n. A push has no PR number, so it falls through to the run id, givingxma2-decoder-push-<run_id>, a different group for every push.cancel-in-progressis false for a push.Review follow-up: MoonEyes pointed out that the first revision keyed a push on the ref, so two pushes to main shared one group and GitHub, which keeps at most one pending run per group, replaced the queued one. The second commit uses the run id, as #771 does for the other workflows.
Not tested:
AI-assisted (Claude Code).