ci(docker): the smoke job runs Node 20, below the repo's 22.18 floor, so a .ts engine module cannot load #2488
Labels
No labels
blocked-on-build
bug
device
device-request
enhancement
from-github
needs-datasheet
needs-info
needs-triage
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#2488
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What
The
Server smoke and Docker buildjob runs its steps in the runner'subuntu-latestcontainer, which isnode:20-bookworm— Node v20.20.2, printed by the job's own "Which runtime is running this" step. That isbelow the floor
package.jsondeclares ("engines": { "node": ">=22.18.0" }) and below the release Node needsbefore type stripping is on with no flag. It went unnoticed because until now no
.tsfile was on a runtimepath: the converted files under
scripts/are only run by explicitnode scripts/x.tsinvocations and byscripts/run-tests.js, and this job runs neither.engine/segment.ts(the first converted engine module, #2483) loaded fromengine/simulator.jsis on that path,and the smoke test now dies there:
engine/simulator.js:116:20isrequire('./segment.ts'). The image build in the same job is green(
Step 8/8 ... Successfully built), so this is the runtime of the job, not the Dockerfile. The threeTestlegs pass because they download and run Node 22 and 24 themselves.
Why it matters now
Every later conversion adds another
.tsfile to that path, so the first one turns this job red permanentlyuntil it runs on a runtime that can load the language the repository writes. It also means the smoke test is
currently the one gate that never exercises the code as
engines.nodesays it may be run.The way forward
The likely fix is the job's own runtime rather than the code: give the
dockerjob a container at or above thefloor (
node:22-bookworm), or run the smoke step under a downloaded Node 22/24 the way the test legs already do,and then re-check the socket/
apt-getpaths the job's comments describe for the host daemon. Recorded hererather than guessed at, because the job's step order and its docker-socket handling are load-bearing and its
comments document several past failures.
Found while converting
engine/segment.js; the pull request that surfaced it is #2483.