Repository navigation
ci(dylint): key the reusable workflow's concurrency group on the caller - #1875
Merged
Merged
Conversation
A `ci-full` PR runs dylint.yml twice inside ONE workflow run: ci-minimal calls it directly, and ci-full calls it again from its own `dylint` job. Inside a reusable workflow `github.run_id` is the caller's run, so the `inputs.ref != ''` branch gave both calls the identical group (`dylint.yml-<run_id>`) with `cancel-in-progress: true` -- the later call cancelled the earlier one. Observed on #1874 and #1872: dylint / Dylint policy fail 1s (cancelled) dylint / Dylint Full (Linux builder) fail 1s (cancelled) full / dylint / Dylint Full (Linux builder) pass 14m34s `dylint / Dylint` requires both of its jobs to succeed, so it failed, so the required `CI summary` failed: no `ci-full`-labelled PR could go green since 79a5200 dropped dylint.yml's own pull_request trigger. Prefix the group with `github.workflow` (the caller's name inside a called workflow, the same property dylint.yml's janitor already keys on). The supersede semantics are unchanged: for a PR both callers still key on the ref, so a new push cancels both lanes of the previous run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A
ci-full-labelled PR can never be green. It runsdylint.ymltwice inside one workflow run —ci-minimal.ymlcalls it directly (dylint) andci-full.ymlcalls it again (full / dylint) — and both calls pass a non-emptyref, so both take theinputs.ref != '' && github.run_idbranch of the concurrency group. Inside a reusable workflowgithub.run_idis the caller's run, so both jobs get the identical groupdylint.yml-<run_id>withcancel-in-progress: true: the later call cancels the earlier one.Evidence, #1874 (
gh pr checks 1874):Same shape on the #1872 canary run 41608933789 (
dylint / Dylint Fullfail 1s,full / dylint / Dylint Fullpass 14m34s). Re-running the failed jobs loses the coin flip again — attempt 2 of run 41623499499 cancelled thedylintcall in 1s.The regression window is 79a5200 ("drop standalone pull_request/merge_group triggers"): before it, dylint.yml's own
pull_requesttrigger also reported theDylintcheck, so the cancelled lane did not gate the PR.Fix
Key the group on
github.workflowas well — the caller's workflow name inside a called workflow, which is exactly what this file's ownqueue-cache-janitoralready uses (github.workflow == 'Dylint') to tell a standalone run from a called one:Both call sites now get distinct groups (
dylint.yml-ci-minimal-<run>vsdylint.yml-ci-full-<run>). Supersede semantics are unchanged: for a PR both callers still key on the ref, so a new push cancels both lanes of the previous run; non-PR events still key onrun_id.Test
ci/test_fractional_workflows.py::test_dylint_concurrency_distinguishes_each_call_sitepins the premise (bothci-minimal.ymlandci-full.ymluses: ./.github/workflows/dylint.yml) and the invariant (github.workflowin the group). RED first with the old expression ('github.workflow' not found in "dylint.yml-${{ inputs.ref != '' && ...), GREEN after.Gates (real output):
ci.test_fractional_workflows23 tests OK; drift set (test_setup_action test_fractional_workflows test_local_gate test_local_dylint_gate test_local_lint_gate test_publish_quota test_gen_mirror_manifest test_benchmark_publish test_sign_windows_release test_local_suites) 95 tests OK;ci.test_workflow_concurrency+ci.test_local_suitesOK;ci/check_workflow_concurrency.pyOK;ci/render_workflows.py --checkrc0;ruff checkclean;ci/check_python_complexity.pyclean. No Rust touched ->bash testnot run.Not in this PR
The duplicate run itself is still booked twice on a
ci-fullPR (two ~14 min Dylint passes, one now just wasted). The dedupe (skipci-minimal.yml:dylintwhenci-fullselects the tier, mirroring thelinuxjob's condition) changes the ci-minimal job graph that the GATE-001 replay proof attests, so it belongs in its own change. This PR only stops the two calls from killing each other.Unblocks #1874 (Windows
terminate_treevanished-pid fix), whosefull / windows / Checkalready passed in 48m13s on head 52ef278.🤖 Generated with Claude Code