fix(ci): pin Node 24 for the unit test job and restore the launcher URL tests - #737
Merged
Conversation
…RL tests The `Unit & Integration Tests` job installs Bun but never pins Node, so a test that spawns `bin/studio.js` gets whatever the runner image ships, currently 22.x. The launcher's own floor is Node 24, so it refuses and the case dies on a bare exit 1 in about 40ms. That is why #709 had to drop its three subprocess cases to go green, and the gap was ours rather than the contributor's. Pin the product's baseline in that job and bring the three cases back, written by mikevillari in #709. They assert what a pure case table cannot: that studio.js passes the real HOSTNAME and PORT through startupUrl and leaves the bind address alone. Replacing the call with the old template literal fails all three. The cases now ask the launcher's own assessNodeRuntime about the ambient node before spawning, so a machine below the floor fails with that sentence instead of an unexplained exit code. `tests/unit/launcher-utils.test.ts` is the only place in the suite that spawns the ambient node; everything else uses process.execPath, which is Bun. Measured both arms locally: with Node 22.15.1 on PATH the three cases fail and name the reason; with Node 24.14.0 the file is 102 pass / 0 fail.
|
Member
Author
|
Hi @mikevillari |
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.



Why
The
Unit & Integration Testsjob installs Bun but never pins Node. Anything in the suite that spawnsnodetherefore runs on the ubuntu-24.04 image default, currently 22.x, while the launcher's own floor is Node 24 (assessNodeRuntimeinbin/lib/launcher-utils.mjs). The launcher refuses and the case dies on a bare exit 1 in about 40ms.That is exactly why #709 shipped without its three subprocess cases. The tests were right and the job was wrong, so the fix belongs here rather than in a contributor's PR.
What changed
.github/workflows/ci.yml: pinactions/setup-nodeto Node 24 in that job, matchingengine-payloadin the same file.tests/unit/launcher-utils.test.ts: restore the threelauncher startup URLcases from fix(cli): print usable startup URLs for wildcard and IPv6 hosts #709, credited in a comment to their author. They cover what the 12 purestartupUrlcases cannot, thatbin/studio.jspasses the realHOSTNAMEandPORTthrough the helper and leaves the bind address alone.assessNodeRuntimeabout the ambient node before spawning, so a machine below the floor fails with the launcher's own sentence rather than an unexplained exit code. The floor is read from the product, not repeated here.Measured
Both arms, locally:
PATHpointing at Node 22.15.1: 99 pass, 3 fail, each namingLibreDB Studio requires Node.js 24.0 or newer; this is Node 22.15.1. This is the state CI is in today.Non-vacuity: replacing
startupUrl(env.HOSTNAME, env.PORT)inbin/studio.jswith the oldhttp://${env.HOSTNAME}:${env.PORT}template fails all three restored cases.Blast radius of the pin:
tests/unit/launcher-utils.test.tsis the only file in the suite that spawns the ambientnode. The two other subprocess tests useprocess.execPath, which is Bun.Gates run locally: format, lint, typecheck, knip,
chart:check,channels:showcase:check,readme:check,security:check, and the fullbun run test.