Repository navigation
1.14: pin Rust toolchain to 1.99.0 - #51
Open
cunninghamcard-bit wants to merge 9 commits into
Open
cunninghamcard-bit wants to merge 9 commits into
cunninghamcard-bit wants to merge 9 commits into
Conversation
rust-toolchain.toml channel stable -> 1.99.0 (components unchanged); every dtolnay/rust-toolchain step in ci.yml and release.yml uses @1.99.0 so installed targets land on the pinned toolchain; ci prints rustup show.
scripts/check_toolchain_pin.sh fails with file:line for any dtolnay/rust-toolchain@<v> that differs from the pinned channel; the Rust core job runs it.
Also fails when no dtolnay/rust-toolchain@ step is found.
…vely GitHub resolves action owners/repos case-insensitively, so DTolnay/Rust-Toolchain@stable must not slip past the check.
…lchain keys Scan .github/**/*.yml and *.yaml (incl. composite actions), reject any toolchain: key anywhere on a line (block, flow, quoted), and run the check first in release.yml's rust-publish job.
Jobs run in parallel, so a step inside rust-publish gated nothing. A dedicated check-toolchain job now runs the pin check and the eight root jobs need it; node-publish, flutter-publish and github-release reach it through their existing needs.
scripts/check_release_gate.py (stdlib only) walks release.yml needs transitively and fails listing UNGATED jobs, or when check-toolchain is missing. Runs next to check_toolchain_pin.sh in ci.yml's Rust core step and in release.yml's check-toolchain job.
check_release_gate.py now parses with PyYAML (fails if it can't import it, or if no jobs parse), and fails on any job if: using always(), cancelled()/!cancelled() or failure(), and on continue-on-error on any job or check-toolchain step. CI installs python3-yaml if missing.
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.
What (unit 1.14)
rust-toolchain.toml:channel = "stable"→"1.99.0";components = ["rustfmt", "clippy"]kept..github/workflows/ci.yml(11) andrelease.yml(9): everydtolnay/rust-toolchain@stable→@1.99.0. With@stablethe action installed stable and addedtargets:to stable, while cargo in the repo used the toml toolchain; now both are 1.99.0, so cross targets land on the pinned toolchain. No other rustup/toolchain usage besidesrustup target addin release.yml android job, which runs in the repo and so honours the toml.ci.ymlrust-test job printsrustup show && cargo --versionfor log evidence.Local evidence
rustup showin the repo:1.99.0-x86_64-unknown-linux-gnu, active because overridden byrust-toolchain.toml.cargo fmt --all --checkOK,cargo clippy --workspace --all-targets -D warningsOK.Upgrades
Toolchain upgrades go in a separate PR that bumps rust-toolchain.toml and all workflow refs together.
CI evidence (run 38194851398, job "Rust core" 114635145063: success)
fmt, clippy, doc, test steps green on 1.99.0. Failing jobs are the same set failing on exp/restart head 8455db9 (run 38111665412), and none of them come from the toolchain:
flutter analyzereports twounused_element_parameterwarnings atbindings/flutter/test/typed_model_test.dart:130:10/:131:10(base job 114388336001, this run 114635145229).test_decision.pyKeyErrors,'decision_result'(recording test) and'input_tokens'(4 usage cases).decision.test.ts:60:36, the missing/null usage test readsusage.input_tokens.All three are fixed in 1.15: binding CI green (flutter analyze, decision usage shape, recording key) #52 (unit 1.15).
Toolchain pin check (94d3667, b597f7d, aa6051e)
scripts/check_toolchain_pin.sh, run by a new "Workflow toolchain refs match rust-toolchain.toml" step in the Rust core job. It fails withfile:linewhen anydtolnay/rust-toolchainreference in.github/workflows/*.ymlhas a ref other than therust-toolchain.tomlchannel: a wrong version, a non-version (@stable,@master), or no@refat all. It also fails on anytoolchain:input, and when no reference is found. The 20 existing@1.99.0refs are untouched.Local mutations (each reverted, then baseline
toolchain pin OK: 20 dtolnay/rust-toolchain steps use 1.99.0, rc 0):@stableci.yml:23: dtolnay/rust-toolchain@stable is not a version@master+with: toolchain: 1.99.0release.yml:53 ... @master is not a versionandrelease.yml:55: ... 'toolchain:' input overrides the pin@1.98.0release.yml:53: ... @1.98.0 does not match rust-toolchain.toml channel 1.99.0dtolnay/rust-toolchainci.yml:23: dtolnay/rust-toolchain without @1.99.0no dtolnay/rust-toolchain@ steps foundCase-insensitive match (5a35008)
The grep and the ref extraction are now case-insensitive (
grep -in, seds///I), because GitHub resolves action owner/repo names case-insensitively. Mutationci.yml:23→DTolnay/Rust-Toolchain@stable: rc 1,ci.yml:23: ... @stable is not a version. I re-ran the five earlier mutations and all are still red (stable, master+toolchain:, 1.98.0, bare, zero matches). Baseline is OK with 20.All .github yml/yaml and flow-style keys (dc86fa8)
.github/**/*.ymland*.yaml, including composite actions under.github/actions/**/action.yml, not justworkflows/*.yml. It also fails if there are no such files.toolchain:key fails, in block, flow (with: { toolchain: x }) or quoted form, anywhere on the line.release.yml gate job (4201ba3)
Jobs run in parallel, so the step dc86fa8 added inside
rust-publishgated nothing; it is removed. A dedicatedcheck-toolchainjob (checkout, thenbash scripts/check_toolchain_pin.sh) now gates the release. The eight root jobsneeds: check-toolchain: rust-publish, node-build, python-release, go-build, ffi-build, console-build, flutter-ffi-mobile, jvm-publish. node-publish, flutter-publish and github-release reach it through their existingneeds.Verified by parsing release.yml with PyYAML and walking
needstransitively: every job except check-toolchain reaches it (UNGATED: []). Mutation: dropping jvm-publish'sneedsgivesUNGATED: ['jvm-publish'].release.yml runs only on push/tags and workflow_dispatch, not on PRs, so neither the gate job nor the needs graph has run in CI. ci.yml's Rust core job runs the same script.
Mutations (local, each reverted; baseline
toolchain pin OK: 20 ..., rc 0; the count stays at 20 because the gate job names nodtolnay/rust-toolchain):.github/workflows/extra.yamlwith@stableextra.yaml:4: ... @stable is not a version.github/actions/x/action.ymlwith@stableaction.yml:4: ... @stable is not a versionci.ymlwith: { toolchain: stable }ci.yml:24: ... 'toolchain:' input overrides the pinDTolnay/Rust-Toolchain@stable@stable@master+toolchain:@1.98.0@Release gate check (a9602e9, 5a21291)
scripts/check_release_gate.pyparses release.yml with PyYAML. It fails, listing what it found, when:needcheck-toolchain(lists the UNGATED jobs);check-toolchainjob is missing, or no jobs parse;if:usesalways(),cancelled()/!cancelled()orfailure(), since each of these runs a job past a failed gate;continue-on-erroris set on any job or on anycheck-toolchainstep;It runs in ci.yml's Rust core step after
check_toolchain_pin.sh, and in release.yml'scheck-toolchainjob. Both steps installpython3-yamlvia apt only ifimport yamlfails. (a9602e9 was a stdlib-only first version; 5a21291 replaced it.)Mutations (local, each reverted; baseline
release gate OK: all 11 release.yml jobs transitively need check-toolchain, rc 0):needsUNGATED jobs ...: jvm-publishjob 'check-toolchain' is missingif: always() && (...)job 'jvm-publish' if: ... bypasses a failed 'check-toolchain'if: ${{ !cancelled() && (...) }}/failure()/cancelled()continue-on-error: trueon the check-toolchain jobcontinue-on-error: trueon a check-toolchain stepstep 1 has continue-on-errorpython3 -S)cannot import PyYAMLjobsno jobs parsed