Repository navigation
ci: route the Dylint Full lane through the forge pool selector (#2214) - #2221
Merged
Merged
Conversation
The required `dylint / Dylint Full (Linux builder, all OS targets)` lane ran 3-4 minutes on ubuntu-latest on every main push, PR and merge-group run. It was left out of the #2214 conversion because `ci/test_fractional_workflows.py` pinned it free of any `if:` -- the lane is never conditionally skippable, and `needs: pool` alone would let a skipped selector skip the gate silently. This teaches the guard that pattern instead of weakening it: - dylint.yml gains the same pinned `pool-select@a36bc81a` job used by check-ubuntu.yml, with a hosted `fallback: ubuntu-latest`. Only trusted events are offered the pool (push, merge_group, workflow_dispatch) and never a pull request, so a fork PR cannot land on self-hosted hardware. - the `dylint` job takes `needs: pool` with `if: ${{ !cancelled() }}` -- the only condition that skips nothing but a whole-run cancellation -- and reads `needs.pool.outputs.runs-on` only after the selector SUCCEEDED, with a literal `ubuntu-latest` fallback for a skip, a failure or an unset variable. - the structural guard is now an EXACT pin: the lane must carry exactly `${{ !cancelled() }}`, `needs: pool`, and that selector-derived `runs-on`; `success()` or `needs.pool.result == 'success'` (both of which can turn a skipped selector into a skipped required gate) fail the test. A new case in ci/test_pool_selector.py pins the same shape, and the lane moves from DEFERRED into ROUTED. - the merge-queue cache janitor needs the new selector job too (its `needs` is asserted to be every other job in the file). RED proof: restoring HEAD's dylint.yml with the lane still in ROUTED gives 2 failures + 4 errors (`'!cancelled()' not found`, no `pool` job, no `needs.pool.outputs.runs-on`); with the change the same modules are 34/34 green. #2214 stays open: qemu (needs a KVM probe), the PR-only tiers, rendered aggregators, nightly and release-auto are still deferred with reasons.
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.
Part of #2214 (stage 3). #2214 stays open.
Why
dylint / Dylint Full (Linux builder, all OS targets)was the last build-capablehosted Linux x64 lane in the repo: 3-4 minutes on
ubuntu-lateston every mainpush, PR run and merge-group run. It was deferred in stages 1-2 because
ci/test_fractional_workflows.pypins this job free of anyif:— the lane isthe required Dylint check and must never be conditionally skippable, while
needs: poolalone lets a skipped selector skip the dependent job silently.What
.github/workflows/dylint.yml: the pinnedpool-select@a36bc81ajob (sameaction/SHA as the other converted lanes) with
fallback: ubuntu-latest; onlytrusted events are offered the pool (
push,merge_group,workflow_dispatch) and neverpull_request, so a fork PR cannot reachself-hosted hardware and the PR lane stays hosted.
dylintjob:needs: pool+if: ${{ !cancelled() }}(the onlycondition that skips nothing except a whole-run cancellation) and a
runs-onthat readsneeds.pool.outputs.runs-ononly after the selectorsucceeded, with a literal
ubuntu-latestfallback for a skip, a failure oran unset pool variable. The existing
if: runner.os == 'Linux' && runner.environment == 'github-hosted'disk stepalready handles a pool runner.
needsis asserted to be every other job in the file).
Guard, not a weakened guard
The structural pin is now an exact assertion rather than an absence check:
the lane must carry exactly
${{ !cancelled() }},needs: pooland thatselector-derived
runs-on.success()orneeds.pool.result == 'success'—both of which can turn a skipped selector into a silently skipped required
gate — fail the test.
ci/test_pool_selector.pygains the same case and moves("dylint.yml", "dylint")fromDEFERREDintoROUTED.Real output
dylint.ymlrestored, lane still inROUTED):ci.test_pool_selector+ci.test_fractional_workflows→ 2 failures +4 errors (
'!cancelled()' not found in '', nopooljob, noneeds.pool.outputs.runs-on).ci.local_suites.DRIFT_UNITTEST_MODULES, 37 modules,TMPDIR=/tmp): 674 tests, OK.ci/render_workflows.py --checkexit 0;ci/check_python_types.py0 errors;ci/check_python_complexity.pyexit 0;ci/check_workflow_concurrency.pyexit 0;
ruff checkclean.Still deferred on #2214
qemu-linux-runtime.yml(needs a pool KVM capability probe), the PR-only tiers(
ci-test.yml) and rendered aggregators,esp32s3-size-parity.yml(firmwaresize, not capacity), the nightly/benchmark/release-auto lanes, and dylint's
static
policyjob (under a minute).