Commit 7d08df6
ci(engines): widen engines.node to >=18 in CI to keep Node 18/20 jobs running (#9145)
* ci(engines): widen engines.node to >=18 in CI to keep Node 18/20 jobs running
engines.node is bumped to >=22 to match the supported runtime range. The
runtime guard (packages/dd-trace/src/guardrails/index.js) and the withVersions
test helper both read engines.node and bail when the running major is below it,
so on Node 18/20 every suite would silently skip (withVersions returns early,
the init guard short-circuits, mocha reports 0 passing).
CI widens engines.node back to >=18 at the action level (right after
actions/setup-node) via scripts/ci/widen-engines-for-ci.js, so Node 18/20 jobs
keep exercising real tests. The on-disk package.json that ships is unchanged
(engines.node stays >=22).
Co-authored-by: Cursor <cursoragent@cursor.com>
* ci(engines): only widen engines.node on Node 18/20 jobs
The widen step lives in the shared node/setup action, so it ran on every CI job,
including integration-guardrails-unsupported, which installs Node 0.8 through 14 on
purpose to verify the runtime guard aborts. Two problems: the script used a
node:-prefixed require (unsupported before Node 14.18) so it crashed and failed those
jobs, and even had it run, rewriting engines.node there would undermine a test that
relies on the shipped >=22.
Gate the step in the action so it only runs when the installed major is 18 or 20 (the
supported majors the >=22 bump newly excludes). Every other version, including the
unsupported matrix, keeps the shipped >=22 and the script is never parsed by a runtime
too old to run it.
Co-authored-by: Cursor <cursoragent@cursor.com>
* ci(node): pin oldest alias to Node 18 instead of deriving from engines.node
Commit 1a79e10 (prepare to drop Node 18/20) changed the `oldest` version alias
to read the minimum major out of package.json engines.node. With engines.node now
bumped to >=22, `oldest` resolved to Node 22, which dropped Node 18 from the matrix
and shifted the child_process job's legs to {22,20,24,26}. The resulting leg order
(Node 22 first, then 20) destabilized the Bluebird global-Promise tests on the Node
20 leg, which pass on master's {18,20,24,26}.
Pin `oldest` back to a literal 18 so CI keeps testing the oldest version we still
exercise, decoupled from the shipped engines floor. This restores the matrix and leg
order to match master; the widen step still restores >=18 on the 18/20 legs.
Co-authored-by: Cursor <cursoragent@cursor.com>
* add early return
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 2d62430 commit 7d08df6
2 files changed
Lines changed: 55 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | 66 | | |
49 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments