Skip to content

ci(engines): widen engines.node to >=18 in CI to keep Node 18/20 jobs running#9145

Merged
pabloerhard merged 4 commits into
masterfrom
pabloerhard/rewrite-engines
Jun 30, 2026
Merged

ci(engines): widen engines.node to >=18 in CI to keep Node 18/20 jobs running#9145
pabloerhard merged 4 commits into
masterfrom
pabloerhard/rewrite-engines

Conversation

@pabloerhard

@pabloerhard pabloerhard commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Bumps the shipped package.json#engines.node from >=18 to >=22, while keeping CI exercising real tests on Node 18 and 20 (rather than letting them silently skip). Concretely:

  • Bumps package.json#engines.node to >=22 (nodeMaxMajor unchanged at 27). This is the value that ships.
  • Adds scripts/ci/widen-engines-for-ci.js, which reads package.json, sets engines.node to >=18, writes it back, and logs the before/after.
  • Wires that script into .github/actions/node/setup/action.yml as a new step right after actions/setup-node. The step is gated to Node majors 18 and 20: on those legs it widens engines.node to >=18; on every other version it leaves the shipped >=22 untouched and never even invokes the script.
  • Pins the oldest version alias in the same action back to a literal Node 18, instead of deriving the minimum major from engines.node.

Motivation

With engines.node bumped to >=22, the runtime guard in 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. On Node 18/20 that means every suite would silently skip: withVersions returns early, the init.js guard short-circuits, and mocha reports 0 passing — green CI that exercised nothing.

Widening engines.node to >=18 at the action level keeps the Node 18/20 jobs exercising real tests. The widen step is the only new CI logic — there are no per-spec or per-helper workarounds. The on-disk package.json that ships is unchanged: engines.node stays >=22; the widening only happens in the CI checkout at runtime.

Two follow-up fixes were needed so the rest of CI keeps working with the bumped floor:

  • Gate the widen step to Node 18/20. The step lives in the shared node/setup action, so it ran on every job — including integration-guardrails-unsupported, which installs ancient Node (0.8–14) on purpose to verify the guard aborts. The script used a node:-prefixed require (unsupported before Node 14.18) and crashed there; even without the crash, rewriting engines.node on those runtimes would undermine that job. Gating to majors 18/20 fixes both, and means the script is only ever parsed by a runtime new enough to run it. The unsupported matrix keeps seeing the shipped >=22.

  • Pin the oldest alias to Node 18. A prior commit (prepare infrastructure for dropping Node 18/20 in v6, ci: prepare infrastructure for dropping Node.js 18/20 in v6 #9033) had changed the oldest alias to derive the minimum major from engines.node. Once engines.node became >=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}. That 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}. Pinning oldest back to a literal 18 restores the matrix and leg order to match master; the widen step still restores >=18 on the 18/20 legs.

Additional Notes

CI on the latest commit: the previously red child_process, instrumentation-child_process, and all integration-guardrails / integration-guardrails-unsupported / unit-guardrails jobs are green. (The Performance and correctness tests failure is unrelated to this change and is being handled separately.)

Verified locally with engines widened to >=18:

  • ./node_modules/.bin/mocha --timeout 30000 packages/dd-trace/test/plugins/with-versions.spec.js → 2 passing
  • ./node_modules/.bin/mocha --timeout 60000 packages/dd-trace/test/profiling/exporters/agent.spec.js → 7 passing

No production code (packages/*/src/) is touched.

Made with Cursor

@datadog-official

datadog-official Bot commented Jun 29, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/apm-reliability/dd-trace-js | benchmark: [26, 2]   View in Datadog   GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 88.01% (-0.03%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 14ae973 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.43 MB
Deduped: 7.49 MB
No deduping: 7.49 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.71%. Comparing base (759c72c) to head (14ae973).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9145      +/-   ##
==========================================
- Coverage   93.73%   93.71%   -0.03%     
==========================================
  Files         892      892              
  Lines       51236    51238       +2     
  Branches    11924    11923       -1     
==========================================
- Hits        48025    48016       -9     
- Misses       3211     3222      +11     
Flag Coverage Δ
aiguard 34.87% <ø> (-0.08%) ⬇️
aiguard-integration 41.79% <ø> (+0.01%) ⬆️
apm-bucket-0 34.84% <ø> (-0.08%) ⬇️
apm-bucket-1 40.33% <ø> (-0.07%) ⬇️
apm-bucket-2 37.34% <ø> (-0.07%) ⬇️
apm-capabilities-tracing 48.68% <ø> (+<0.01%) ⬆️
apm-integrations-aerospike 33.12% <ø> (-0.08%) ⬇️
apm-integrations-confluentinc-kafka-javascript 40.02% <ø> (-0.08%) ⬇️
apm-integrations-couchbase 33.40% <ø> (-0.08%) ⬇️
apm-integrations-http 41.95% <ø> (-0.07%) ⬇️
apm-integrations-kafkajs 40.26% <ø> (-0.12%) ⬇️
apm-integrations-next 29.51% <ø> (-0.06%) ⬇️
apm-integrations-prisma 35.03% <ø> (-0.07%) ⬇️
apm-integrations-tedious 33.89% <ø> (-0.07%) ⬇️
appsec 57.69% <ø> (-0.06%) ⬇️
appsec-express_fastify_graphql 53.66% <ø> (-0.06%) ⬇️
appsec-integration 36.22% <ø> (+<0.01%) ⬆️
appsec-kafka_ldapjs_lodash 43.58% <ø> (-0.07%) ⬇️
appsec-mongodb-core_mongoose_mysql 48.74% <ø> (-0.06%) ⬇️
appsec-next 28.00% <ø> (-0.07%) ⬇️
appsec-node-serialize_passport_postgres 47.91% <ø> (-0.06%) ⬇️
appsec-sourcing_stripe_template 45.47% <ø> (-0.06%) ⬇️
debugger 44.37% <ø> (+0.01%) ⬆️
instrumentations-bucket-0 28.15% <ø> (-0.08%) ⬇️
instrumentations-bucket-1 37.40% <ø> (-0.07%) ⬇️
instrumentations-bucket-10 40.35% <ø> (-0.07%) ⬇️
instrumentations-bucket-11 27.95% <ø> (-0.08%) ⬇️
instrumentations-bucket-12 28.67% <ø> (-0.07%) ⬇️
instrumentations-bucket-13 27.78% <ø> (-0.08%) ⬇️
instrumentations-bucket-2 30.23% <ø> (-0.07%) ⬇️
instrumentations-bucket-3 35.90% <ø> (-0.07%) ⬇️
instrumentations-bucket-4 28.56% <ø> (+0.42%) ⬆️
instrumentations-bucket-5 36.28% <ø> (-0.07%) ⬇️
instrumentations-bucket-6 38.25% <ø> (-0.07%) ⬇️
instrumentations-bucket-7 36.01% <ø> (-0.07%) ⬇️
instrumentations-bucket-8 36.95% <ø> (-0.07%) ⬇️
instrumentations-bucket-9 39.45% <ø> (-0.07%) ⬇️
instrumentations-instrumentation-couchbase 46.48% <ø> (-0.07%) ⬇️
instrumentations-integration-esbuild 24.87% <ø> (+<0.01%) ⬆️
llmobs-ai_anthropic_bedrock 39.53% <ø> (-0.06%) ⬇️
llmobs-google-genai_langchain_vertex-ai 36.97% <ø> (-0.06%) ⬇️
llmobs-openai 39.58% <ø> (-0.07%) ⬇️
llmobs-sdk 43.59% <ø> (-0.08%) ⬇️
master-coverage 93.71% <ø> (?)
openfeature 37.76% <ø> (+0.01%) ⬆️
openfeature-unit 50.39% <ø> (ø)
platform-core_esbuild_instrumentations-misc 23.36% <ø> (+<0.01%) ⬆️
platform-integration 47.42% <ø> (+<0.01%) ⬆️
platform-shimmer_unit-guardrails_webpack 18.91% <ø> (+0.01%) ⬆️
plugins-bucket-0 36.33% <ø> (-0.07%) ⬇️
plugins-bucket-1 39.60% <ø> (+<0.01%) ⬆️
plugins-bucket-11 38.46% <ø> (-0.07%) ⬇️
plugins-bucket-17 39.15% <ø> (-0.07%) ⬇️
plugins-bucket-18 42.01% <ø> (-0.07%) ⬇️
plugins-bucket-19 39.56% <ø> (-0.07%) ⬇️
plugins-bucket-20 43.20% <ø> (-0.13%) ⬇️
plugins-bucket-4 37.71% <ø> (-0.07%) ⬇️
plugins-bullmq_cassandra_cookie 39.76% <ø> (-0.07%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 33.22% <ø> (-0.08%) ⬇️
plugins-fetch_fs_generic-pool 36.05% <ø> (-0.07%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 43.10% <ø> (-0.07%) ⬇️
plugins-hapi_hono_ioredis 37.78% <ø> (-0.07%) ⬇️
plugins-jest_knex_langgraph 32.60% <ø> (-0.07%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 27.85% <ø> (-0.08%) ⬇️
plugins-lodash_mariadb_memcached 35.17% <ø> (-0.08%) ⬇️
plugins-mongodb_mongodb-core_mongoose 36.31% <ø> (-0.07%) ⬇️
plugins-multer_mysql_mysql2 35.14% <ø> (-0.08%) ⬇️
plugins-nats_node-serialize_opensearch 37.14% <ø> (-0.02%) ⬇️
plugins-passport-http_pino_postgres 35.53% <ø> (-0.08%) ⬇️
plugins-process_pug_redis 34.26% <ø> (-0.08%) ⬇️
plugins-undici_url_valkey 35.88% <ø> (-0.07%) ⬇️
plugins-vm_winston_ws 37.55% <ø> (-0.07%) ⬇️
profiling 43.62% <ø> (-0.06%) ⬇️
serverless-aws-sdk-aws-sdk 33.29% <ø> (-0.06%) ⬇️
serverless-aws-sdk-bedrockruntime 32.16% <ø> (-0.07%) ⬇️
serverless-aws-sdk-client 37.16% <ø> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 34.14% <ø> (-0.07%) ⬇️
serverless-aws-sdk-eventbridge 27.25% <ø> (-0.07%) ⬇️
serverless-aws-sdk-kinesis 37.40% <ø> (-0.07%) ⬇️
serverless-aws-sdk-lambda 34.59% <ø> (-0.07%) ⬇️
serverless-aws-sdk-s3 32.59% <ø> (-0.07%) ⬇️
serverless-aws-sdk-serverless-peer-service 39.56% <ø> (+0.01%) ⬆️
serverless-aws-sdk-sns 38.25% <ø> (-0.07%) ⬇️
serverless-aws-sdk-sqs 38.00% <ø> (-0.07%) ⬇️
serverless-aws-sdk-stepfunctions 33.18% <ø> (-0.07%) ⬇️
serverless-aws-sdk-util 47.95% <ø> (ø)
serverless-bucket-0 39.46% <ø> (+<0.01%) ⬆️
serverless-lambda 34.33% <ø> (-0.09%) ⬇️
test-optimization-cucumber 52.24% <ø> (+0.05%) ⬆️
test-optimization-cypress 49.41% <ø> (+0.06%) ⬆️
test-optimization-jest 55.34% <ø> (+0.07%) ⬆️
test-optimization-mocha 53.42% <ø> (+0.11%) ⬆️
test-optimization-playwright-playwright-atr 43.32% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-efd 43.61% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-final-status 43.73% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-impacted-tests 43.15% <ø> (+<0.01%) ⬆️
test-optimization-playwright-playwright-reporting 43.26% <ø> (+0.08%) ⬆️
test-optimization-playwright-playwright-test-management 44.72% <ø> (+0.09%) ⬆️
test-optimization-playwright-playwright-test-span 44.51% <ø> (+0.07%) ⬆️
test-optimization-selenium 45.28% <ø> (+0.06%) ⬆️
test-optimization-testopt 48.04% <ø> (+0.09%) ⬆️
test-optimization-vitest 50.62% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

rochdev
rochdev previously approved these changes Jun 29, 2026
pabloerhard and others added 3 commits June 30, 2026 09:32
… 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>
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>
…s.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>
@pabloerhard pabloerhard force-pushed the pabloerhard/rewrite-engines branch from 97be674 to b13d145 Compare June 30, 2026 15:32
@pabloerhard pabloerhard marked this pull request as ready for review June 30, 2026 15:48
@pabloerhard pabloerhard requested a review from a team as a code owner June 30, 2026 15:48
@pr-commenter

pr-commenter Bot commented Jun 30, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-30 18:13:53

Comparing candidate commit 14ae973 in PR branch pabloerhard/rewrite-engines with baseline commit 759c72c in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2253 metrics, 33 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-20

  • unstable execution_time [-191.401ms; +182.339ms] or [-5.172%; +4.927%]

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-178587.768µs; +177677.334µs] or [-6.789%; +6.755%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-207158.628µs; +208263.495µs] or [-8.252%; +8.296%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-159.616ms; +154.967ms] or [-5.545%; +5.383%]

scenario:appsec-control-20

  • unstable execution_time [-160.249ms; +152.911ms] or [-9.164%; +8.744%]

scenario:appsec-control-24

  • unstable execution_time [-102746.008µs; +103751.242µs] or [-8.462%; +8.545%]

scenario:appsec-control-26

  • unstable execution_time [-106.729ms; +116.449ms] or [-8.880%; +9.688%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-3662.498ms; +2509.840ms] or [-34.794%; +23.843%]
  • unstable execution_time [-3679.765ms; +2544.250ms] or [-32.734%; +22.633%]
  • unstable instructions [-32.5G instructions; +22.3G instructions] or [-36.807%; +25.198%]
  • unstable max_rss_usage [-11.333MB; +6.713MB] or [-6.941%; +4.112%]
  • unstable throughput [-575.510op/s; +798.184op/s] or [-19.027%; +26.388%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-1676.978ms; +590.432ms] or [-21.113%; +7.433%]
  • unstable execution_time [-1719.267ms; +586.606ms] or [-19.940%; +6.803%]
  • unstable instructions [-14.7G instructions; +4.8G instructions] or [-22.700%; +7.410%]
  • unstable throughput [-173.431op/s; +491.342op/s] or [-4.522%; +12.811%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-2917.164ms; +4044.253ms] or [-27.627%; +38.301%]
  • unstable execution_time [-2936.554ms; +4086.956ms] or [-26.090%; +36.311%]
  • unstable instructions [-26.1G instructions; +36.5G instructions] or [-29.431%; +41.100%]
  • unstable max_rss_usage [-8.150MB; +12.946MB] or [-4.995%; +7.935%]
  • unstable throughput [-899.793op/s; +655.615op/s] or [-29.912%; +21.795%]

scenario:debugger-line-probe-without-snapshot-24

  • unstable cpu_user_time [-2.643s; +0.374s] or [-31.084%; +4.404%]
  • unstable execution_time [-2.678s; +0.387s] or [-29.151%; +4.214%]
  • unstable instructions [-22.7G instructions; +3.0G instructions] or [-32.631%; +4.376%]
  • unstable throughput [-119.288op/s; +774.985op/s] or [-3.248%; +21.100%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-1844.681ms; +550.765ms] or [-19.689%; +5.878%]
  • unstable execution_time [-1858.944ms; +554.317ms] or [-18.483%; +5.511%]
  • unstable instructions [-16.6G instructions; +5.0G instructions] or [-21.266%; +6.365%]
  • unstable throughput [-119.800op/s; +419.784op/s] or [-3.671%; +12.864%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-313.768ms; +398.219ms] or [-6.584%; +8.356%]
  • unstable execution_time [-312.201ms; +398.784ms] or [-6.449%; +8.238%]
  • unstable throughput [-136169.267op/s; +106915.567op/s] or [-7.850%; +6.164%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-20

  • unstable max_rss_usage [-20.834MB; +41.734MB] or [-5.554%; +11.126%]

@pabloerhard pabloerhard added the only-land-on-next Only land this change on the next major version when released. label Jun 30, 2026
@pabloerhard pabloerhard marked this pull request as draft June 30, 2026 17:02
@pabloerhard pabloerhard removed the only-land-on-next Only land this change on the next major version when released. label Jun 30, 2026
@pabloerhard pabloerhard marked this pull request as ready for review June 30, 2026 17:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14ae9730b6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/ci/widen-engines-for-ci.js
@pabloerhard pabloerhard enabled auto-merge (squash) June 30, 2026 17:35
@pabloerhard pabloerhard merged commit 7d08df6 into master Jun 30, 2026
918 of 919 checks passed
@pabloerhard pabloerhard deleted the pabloerhard/rewrite-engines branch June 30, 2026 18:15
dd-octo-sts Bot pushed a commit that referenced this pull request Jul 1, 2026
… 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>
This was referenced Jul 1, 2026
rochdev pushed a commit that referenced this pull request Jul 2, 2026
… 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>
rochdev pushed a commit that referenced this pull request Jul 2, 2026
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants