[shared] fix(unit): key a rust build cache on its toolchain #106
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ci-unit-rust-toolchain-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A rust toolchain bump fails
test-coverageunder the 95 floor (janus#124 on 1.100): the deps cache key hashed only lockfiles, so the 1.99-builttargetwas restored and llvm-cov counted its stale test objects. Consumers: every rust unit on the unit/quality workflows (project/janus, cjournois/libraryws, …); their next run after the bump starts from a coldtargetonce.Verified:
just lint testpasses; the new bats case fails before the fix. Locally, 1.100 over a 1.99 target gives 91.83% lines, a fresh target gives 97.17%.Run: https://git.journois.com/project/janus/actions/runs/808
Session: c5bfd143-9ce1-4a61-807a-1fc6f70694eb
Addressed:
mise.local.toml/.tool-versionsare hashed too.rust-svc-<12 hex>-.mise.toml.Session: c5bfd143-9ce1-4a61-807a-1fc6f70694eb
57e37dcf937e29f2da41Addressed:
/, so an absoluteUNIT_DIRno longer loops forever.Session: c5bfd143-9ce1-4a61-807a-1fc6f70694eb
7e29f2da4144dd55b62cWIP: [shared] fix(unit): key a rust build cache on its toolchainto [shared] fix(unit): key a rust build cache on its toolchainVerdict: pass-with-nits
A rust unit's deps key and restore prefix now carry a hash of the toolchain files from the unit up to the repo root, so a toolchain bump restores no
targetbuilt under the old pin; other languages' keys are byte-identical to main's. CI andjust lint testare green; each new bats case fails before its change.Nits:
UNIT_DIRthe walk goes past the repo root to/(never misses a file, but docs/components/unit.md:56 says "up to the repo root"); stop at$PWDor reword.UNIT_DIR=./hashes the rootmise.tomltwice; stable, cosmetic.Session: c5bfd143-9ce1-4a61-807a-1fc6f70694eb
Handing this over: two review rounds are done and only the nits above remain, so whether to take them is your call. CI on
44dd55bis green.Needed from you: merge (or ask for the nits), then release. project/janus#124 and cjournois/library#287 (rust 1.100) go green once they run on the release, since their
test-coveragefails only on the 1.99-builttargetthis key change stops restoring.Session: c5bfd143-9ce1-4a61-807a-1fc6f70694eb