Run CI on Node 24 - #1338
Run CI on Node 24#1338
Conversation
Hello francoisferrand,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
CI still built and tested against Node 22 only, so the 22->24 upgrade was never actually exercised. Bump the setup-node pin to the current Node 24 LTS (24.21.0) across all CI jobs (lint, v1 tests, v2 tests). actions/checkout and actions/setup-node are already on v4, so no action-pin bump is needed there. Issue: UTAPI-125
5ec8f0d to
1ee399a
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
bucketclient 8.2.5 nests its own non-peer arsenal 8.2.4 dependency
(pre-BKTCLT-51) and arsenal 8.5.6 is git-pinned, so both trigger their
own isolated build sandboxes on install. Neither sandbox honors the
root resolutions.nan override, so diskusage's native addon inside them
still builds against nan 2.22.0, which cannot compile against Node
24's V8/ABI -- a hard yarn install failure, not just a silently
dropped optionalDependency.
Bump bucketclient to 8.3.0 (depends on arsenal via peerDependency
instead of nesting a copy) and switch arsenal from a git pin to the
npm-published @scality/arsenal (prebuilt, no local build step). With
both isolated-build sources gone, nan naturally resolves to a
Node-24-compatible version across the whole tree (ioctl and diskusage
both accept nan >=2.23, and nothing else caps it lower), so the
explicit nan resolution pin is no longer needed and is dropped too.
Update require('arsenal') to require('@scality/arsenal') everywhere
in the codebase to match the new package name.
Verified with a clean install on Node 24: no unmet-peer-dependency
warning, single @scality/arsenal copy in node_modules, and
require('ioctl') / require('diskusage') / require('@scality/arsenal')
all load correctly (not just a green install exit code).
Issue: UTAPI-125
These pinned transitive deps of an old yarn-berry-era toolchain (@yarnpkg/fslib, libzip, json-proxy, parsers, string-width, cliui) that nothing in the current dependency tree still needs -- a fresh install resolves fine without them. Issue: UTAPI-125
Picks up the Node 24 build fix from VLTCLT-69, now tagged and released (was previously only an open PR). Issue: UTAPI-125
werelogs 8.2.2 -> 8.2.5: routine patch bump, no known Node 24 issue but picked up while touching the dependency list. eslint-config-scality moves from the git-pinned scality/Guidelines package to the npm-published @scality/eslint-config-scality (8.3.3), consistent with the arsenal/bucketclient npm migration. Update eslint.config.mjs compat.extends() call to match the new name. Issue: UTAPI-125
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
620a1d6 to
4420eee
Compare
Node 24 emits DEP0169 for url.parse() on stderr, and the functional CI jobs fail on any stderr output from the server or the tests. Parse the request target with arsenal's parseRequestTarget() instead, like the other 8.6 consumers do; the pathname/path/query it returns match what url.parse() gave for request targets. Issue: UTAPI-125
ioredis now defers its ready check behind CLIENT SETINFO, so subscribing right after construction lands before the INFO and the client errors out with "Connection in subscriber mode". Connect explicitly and wait for ready before subscribing. The test also silently dropped the callback of requests answered with InternalError, which is expected for requests hitting the master switch, and only waited for the load to finish after the +slave event, so it timed out whenever the requests completed first. Keep sending requests until the sentinel reports the switch and count failed ones as done, since the test is about connection accounting. Issue: UTAPI-125
oas-tools 2.2.2 is the last 2.x release and drags in request (form-data 2.3.3, with a critical and a high advisory) and jsonwebtoken 8.5.1 (high advisory). Moving to oas-tools 3.x is a rewrite, not a bump. Use resolutions to lift them to the fixed releases instead: form-data 2.5.6 is the same major that request expects, and jsonwebtoken 9.x only changes key handling in code paths utapi never hits since openapi.yaml declares no security scheme. Issue: UTAPI-125
35adeb6 to
5c26d06
Compare
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22.11.0' | ||
| node-version: '24.21.0' |
There was a problem hiding this comment.
how come sometimes we have 24.21.0, and other codebase, like the scuba one is just 24 :
- name: Setup Node 24
uses: actions/setup-node@v6
with:
node-version: '24'
cache: yarn
There was a problem hiding this comment.
i don't know, and choose to ignore that question... especially this repo is not active anymore, so probably does not matter much: we need the bumps mainly because it is pulled in cloudserver...
checkout, setup-node, setup-python, the docker actions, gh-release and ssh-to-runner were several majors behind. The new majors mainly move the action runtime to Node 24; nothing we rely on changed (we set the cache option explicitly, and use none of the removed inputs). Issue: UTAPI-125
5c26d06 to
749a7ab
Compare
The interval test creates its ioredis connections at file load and then blocks the event loop in waitUntilNextInterval() as soon as the first beforeEach runs. If the handshake has not completed by then, the pushes issued right after the wait hit a connection that is still in `connect` state and, with enableOfflineQueue disabled, are rejected with "Stream isn't writeable and enableOfflineQueue options is false". This was always a race, but ioredis 5.11 needs a few more round trips (CLIENT SETINFO, async package.json read) before it reaches `ready`, which made it fail intermittently in CI. Wait for the test's redis client and both UtapiClient datastores to be ready in the before() hook. Issue: UTAPI-125
Aligns the package name with the npm scope used by its sibling packages (arsenal, bucketclient, eslint-config-scality) after this round of dependency work, and bumps the version for release. Issue: UTAPI-125
749a7ab to
9fe53ab
Compare
| "resolutions": { | ||
| "oas-tools/jsonwebtoken": "^9.0.2", | ||
| "**/request/form-data": "^2.5.6" | ||
| }, |
There was a problem hiding this comment.
Maybe let's have a followup ticket for bumping to oas-tools 3.x? To drop these overrides properly.
|
/approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
This pull request did not target the following hotfix branch(es) so they
Please check the status of the associated issue UTAPI-125. Goodbye francoisferrand. The following options are set: approve |
Part of the OS-1155 Node.js 22→24 upgrade epic.
Why
utapi's
engines.nodealready said>=22, but CI had never actually run anything on Node 24 — so that claim was untested. It didn't hold up: a native addon (ioctl, used for atomic file locking) silently failed to build there, and yarn printed a "safe to ignore" message for what was actually a missing runtime dependency. Once CI did run on 24, the test jobs surfaced a couple more things. This PR makes Node 24 the CI target and fixes what that surfaced.What changed
ioctlbuild failure: bucketclient and arsenal were both pulled in through mechanisms (a nested copy, a git pin) that bypassed thenanversion override meant to fix this, so the native build kept using ananthat doesn't support Node 24's ABI. Fixing this properly meant moving both to their real npm-published packages (@scality/bucketclient,@scality/arsenal) instead of patching around it — that also means a single arsenal copy in the tree instead of several. Added an explicit load check so a build failure like this can't hide behind yarn's messaging again.@scality/eslint-config-scality).resolutionsfor whatoas-toolsdrags in: it's stuck on 2.2.2 (3.x is a rewrite) and pullsrequest→form-data2.3.3 (critical + high) andjsonwebtoken8.5.1 (high). Lifted toform-data2.5.6 (same majorrequestexpects) andjsonwebtoken9.x (only affects the security middleware, which utapi doesn't enable). That clears every remaining critical advisory.url.parse()and prints it on stderr, which our CI treats as a failure; switched the request handling to arsenal's request-target parser.@scality/utapi(8.4.0), matching the npm-scoped naming now used across its own dependencies, and retargeted this PR todevelopment/8.4.Known follow-ups (not blocking)
@scality/arsenalis pinned as^8.6.0-0to allow picking up 8.6.0 prereleases/final without another bump — tighten once a stable 8.6.0 ships. This is acceptable since utapi only uses misc utils from arsenal.oas-tools2.x itself is unmaintained; the two resolutions above are a stopgap. Moving to@oas-tools/core3.x (or another OpenAPI middleware) is a separate change.yarn auditfindings (2 high:semvervia arsenal,serialize-javascriptvia mocha) only clear with major bumps upstream; left for a separate pass.Verified
Clean installs, lint, and the full test suite pass on both Node 22 and Node 24 — including an explicit check that
ioctlactually loads after install, not just thatyarn installexits 0.Issue: UTAPI-125