fix(ci): pin Node from .node-version in the cargo-test jobs - #10383
proggeramlug wants to merge 2 commits into
Conversation
crates/perry/tests/bun_embedded_compression.rs shells out to
scripts/test-bun-embedded-compression.mjs, whose first assertion is that
process.versions.node equals the .node-version pin — the loader and byte
behaviour it gates on is version-specific, so the assertion is the point of
the test, not incidental.
Neither the cargo-test job nor the cargo-test-perry shards ran setup-node, so
both inherited whatever node the ubuntu-latest image ships. That is 22.23.2
today against a 26.5.1 pin, which is why standalone_compressed_asset_regression
fails on main with
AssertionError: + '22.23.2' - '26.5.1'
at scripts/test-bun-embedded-compression.mjs:10:8
and takes the whole job red. Every other job that runs node-backed tests
(lint, e2e-scoped, windows-build) already had the step; these two were the gap.
Pinned from the FILE rather than a literal: check_node_version_consistency.py
is a lint step and requires every literal node-version: to be a registered
exemption. Both shards are pinned, not just the one observed failing — which
shard a node-backed test lands in is decided by ci_cargo_test_shard.py, so
pinning only one moves the failure with the sharding instead of removing it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe ChangesNode.js test environment
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Both CI test jobs now use the pinned Node.js version, preventing the reported version-mismatch failures. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed via merge train #10397 (v0.5.1584). All source commits preserve authorship; merged main matches the validated train exactly. |
cargo-testis red onmain, and it is not the code under test:crates/perry/tests/bun_embedded_compression.rsshells out to that script, whose first line of work is assertingprocess.versions.nodeequals the.node-versionpin. That assertion is the point of the test — the loader and byte behaviour it gates on is version-specific — so it is doing its job. What is wrong is the job it runs in.Neither
cargo-testnor thecargo-test-perryshards ransetup-node, so both inherited whatever Node theubuntu-latestimage ships. Today that is 22.23.2 against a 26.5.1 pin. Every other job that runs node-backed tests —lint,e2e-scoped,windows-build— already had the step; these two were the gap.Both are pinned here, not just the one observed failing. Which shard a node-backed test lands in is decided by
ci_cargo_test_shard.py, so pinning onlycargo-testwould move the failure with the sharding rather than remove it.Pinned from the file, never a literal:
check_node_version_consistency.pyis alintstep and requires every literalnode-version:in a workflow to be a registered exemption, and this is not one.Validation
python3 scripts/check_node_version_consistency.py→ OK.python3 scripts/check_gate_freshness.py→ OK.Run cargo testin both jobs..node-version= 26.5.1 and node 26.5.1,assert.equal(process.versions.node, pin)succeeds. That is the whole of what this change affects; the rest of the test is untouched.This is one of several independently red gates on
main— it is not the only thing keepingpr-gatered, and it does not attempt to be.Summary by CodeRabbit
Bug Fixes
Documentation