Skip to content

test(aap): select mongodb version by Node.js runtime in plugin tests#9322

Merged
BridgeAR merged 3 commits into
masterfrom
ccapell/aap-plugin-test-select-version-by-nodejs-runtime
Jul 14, 2026
Merged

test(aap): select mongodb version by Node.js runtime in plugin tests#9322
BridgeAR merged 3 commits into
masterfrom
ccapell/aap-plugin-test-select-version-by-nodejs-runtime

Conversation

@CarlesDD

@CarlesDD CarlesDD commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a Node.js runtime gate (node: '>=20') to the mongodb >=7 version entries in test/plugins/externals.js for the express-mongo-sanitize and mquery plugin tests, using the version-selection mechanism from #9306. Removes the now-redundant NODE_MAJOR < 20 skip guards from the two NoSQL injection analyzer specs.

Motivation

mongodb@>=7 requires Node.js >=20; this was previously enforced with a manual describe.skip at test time.

Additional Notes

mongodb here is a test-only dependency declared in externals.js, not the plugin's own addHook, so no production code changes were needed.

@CarlesDD CarlesDD self-assigned this Jul 14, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.74 MB
Deduped: 7.4 MB
No deduping: 7.4 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 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

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 14, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 96.57% (+0.00%)

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

@pr-commenter

pr-commenter Bot commented Jul 14, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-14 14:21:46

Comparing candidate commit e7b9ea3 in PR branch ccapell/aap-plugin-test-select-version-by-nodejs-runtime with baseline commit 665ccb5 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2313 metrics, 45 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-24

  • unstable execution_time [-211.517ms; +208.575ms] or [-7.948%; +7.837%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-235.544ms; +230.821ms] or [-9.227%; +9.042%]

scenario:appsec-appsec-enabled-with-attacks-24

  • unstable execution_time [-163448.188µs; +162453.488µs] or [-5.282%; +5.249%]

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

  • unstable execution_time [-185.857ms; +196.490ms] or [-6.398%; +6.764%]

scenario:appsec-control-20

  • unstable execution_time [-131.402ms; +121.620ms] or [-7.948%; +7.356%]

scenario:appsec-control-24

  • unstable execution_time [-115.075ms; +117.392ms] or [-9.296%; +9.483%]

scenario:appsec-control-26

  • unstable execution_time [-123.608ms; +119.278ms] or [-9.999%; +9.649%]

scenario:appsec-iast-no-vulnerability-control-20

  • unstable execution_time [-16401.060µs; +16057.785µs] or [-6.483%; +6.347%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable execution_time [-19.013ms; +7.953ms] or [-7.354%; +3.076%]

scenario:appsec-iast-with-vulnerability-control-20

  • unstable execution_time [-27.649ms; +29.863ms] or [-5.081%; +5.487%]

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

  • unstable cpu_user_time [-3084.812ms; +1893.531ms] or [-32.798%; +20.132%]
  • unstable execution_time [-3198.622ms; +2015.483ms] or [-31.574%; +19.895%]
  • unstable instructions [-26.0G instructions; +16.1G instructions] or [-33.625%; +20.877%]
  • unstable max_rss_usage [-12.753MB; +8.303MB] or [-7.913%; +5.152%]
  • unstable throughput [-566.747op/s; +881.478op/s] or [-17.005%; +26.448%]

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

  • unstable cpu_user_time [-3367.034ms; +3692.701ms] or [-33.024%; +36.218%]
  • unstable execution_time [-3382.681ms; +3737.753ms] or [-30.958%; +34.208%]
  • unstable instructions [-29.9G instructions; +32.8G instructions] or [-35.071%; +38.558%]
  • unstable max_rss_usage [-10.155MB; +12.171MB] or [-6.281%; +7.528%]
  • unstable throughput [-720.898op/s; +678.545op/s] or [-23.401%; +22.026%]

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

  • unstable cpu_user_time [-3225.708ms; +3383.031ms] or [-34.952%; +36.656%]
  • unstable execution_time [-3252.034ms; +3409.774ms] or [-32.674%; +34.259%]
  • unstable instructions [-27520.5M instructions; +29171.2M instructions] or [-36.425%; +38.609%]
  • unstable max_rss_usage [-12302.901KB; +12111.701KB] or [-7.704%; +7.585%]
  • unstable throughput [-787.038op/s; +812.010op/s] or [-23.220%; +23.956%]

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

  • unstable cpu_user_time [-3529.666ms; +5128.334ms] or [-31.906%; +46.357%]
  • unstable execution_time [-3514.537ms; +5106.743ms] or [-29.690%; +43.140%]
  • unstable instructions [-32.0G instructions; +45.6G instructions] or [-34.254%; +48.921%]
  • unstable max_rss_usage [-12.404MB; +15.929MB] or [-7.548%; +9.694%]
  • unstable throughput [-1002.446op/s; +682.140op/s] or [-34.393%; +23.404%]

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

  • unstable cpu_user_time [-1584.726ms; +708.030ms] or [-18.591%; +8.306%]
  • unstable execution_time [-1611.194ms; +707.495ms] or [-17.455%; +7.665%]
  • unstable instructions [-13.6G instructions; +6.0G instructions] or [-19.450%; +8.582%]
  • unstable throughput [-233.484op/s; +440.334op/s] or [-6.562%; +12.376%]

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

  • unstable cpu_user_time [-4349.244ms; +3155.783ms] or [-39.901%; +28.952%]
  • unstable execution_time [-4387.142ms; +3159.395ms] or [-37.601%; +27.079%]
  • unstable instructions [-38.6G instructions; +27.5G instructions] or [-41.976%; +29.947%]
  • unstable max_rss_usage [-13.742MB; +10.308MB] or [-8.400%; +6.301%]
  • unstable throughput [-618.716op/s; +870.168op/s] or [-20.986%; +29.516%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-351.146ms; +353.992ms] or [-7.333%; +7.392%]
  • unstable execution_time [-353.842ms; +360.041ms] or [-7.272%; +7.400%]
  • unstable throughput [-127259.972op/s; +126718.073op/s] or [-7.372%; +7.340%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable cpu_user_time [-745.119ms; +726.393ms] or [-5.764%; +5.619%]
  • unstable execution_time [-750.826ms; +731.573ms] or [-5.685%; +5.540%]
  • unstable throughput [-3.329op/s; +3.413op/s] or [-5.461%; +5.599%]

@CarlesDD
CarlesDD marked this pull request as ready for review July 14, 2026 07:40
@CarlesDD
CarlesDD requested review from a team as code owners July 14, 2026 07:40
@CarlesDD
CarlesDD requested review from crysmags and removed request for a team July 14, 2026 07:40
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.61%. Comparing base (665ccb5) to head (e7b9ea3).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9322    +/-   ##
========================================
  Coverage   96.60%   96.61%            
========================================
  Files         919      920     +1     
  Lines      121832   122236   +404     
  Branches    21079    21453   +374     
========================================
+ Hits       117701   118095   +394     
- Misses       4131     4141    +10     
Flag Coverage Δ
aiguard 53.55% <ø> (-0.10%) ⬇️
aiguard-integration 56.97% <ø> (-0.04%) ⬇️
apm-bucket-0 53.78% <ø> (-0.10%) ⬇️
apm-bucket-1 58.05% <ø> (-0.09%) ⬇️
apm-bucket-2 56.10% <ø> (-0.09%) ⬇️
apm-capabilities-tracing 60.38% <ø> (-0.01%) ⬇️
apm-integrations-aerospike 52.92% <ø> (-0.10%) ⬇️
apm-integrations-confluentinc-kafka-javascript 56.98% <ø> (-0.10%) ⬇️
apm-integrations-couchbase 53.26% <ø> (-0.10%) ⬇️
apm-integrations-http 57.94% <ø> (-0.09%) ⬇️
apm-integrations-kafkajs 57.69% <ø> (-0.10%) ⬇️
apm-integrations-next 54.23% <ø> (-0.09%) ⬇️
apm-integrations-prisma 54.16% <ø> (-0.09%) ⬇️
apm-integrations-tedious 53.03% <ø> (-0.10%) ⬇️
appsec 68.97% <ø> (-0.07%) ⬇️
appsec-express_fastify_graphql 65.66% <ø> (-0.06%) ⬇️
appsec-integration 51.86% <ø> (-0.13%) ⬇️
appsec-kafka_ldapjs_lodash 59.07% <ø> (-0.08%) ⬇️
appsec-mongodb-core_mongoose_mysql 62.22% <ø> (-0.08%) ⬇️
appsec-next 52.84% <ø> (-0.08%) ⬇️
appsec-node-serialize_passport_postgres 61.85% <ø> (-0.08%) ⬇️
appsec-sourcing_stripe_template 60.31% <ø> (-0.08%) ⬇️
debugger 65.72% <ø> (-0.07%) ⬇️
instrumentations-bucket-0 48.75% <ø> (-0.10%) ⬇️
instrumentations-bucket-1 54.95% <ø> (-0.09%) ⬇️
instrumentations-bucket-10 56.61% <ø> (-0.09%) ⬇️
instrumentations-bucket-11 48.74% <ø> (-0.10%) ⬇️
instrumentations-bucket-12 48.85% <ø> (-0.10%) ⬇️
instrumentations-bucket-13 48.68% <ø> (-0.10%) ⬇️
instrumentations-bucket-2 49.74% <ø> (-0.10%) ⬇️
instrumentations-bucket-3 53.82% <ø> (-0.09%) ⬇️
instrumentations-bucket-4 49.16% <ø> (-0.10%) ⬇️
instrumentations-bucket-5 53.00% <ø> (-0.09%) ⬇️
instrumentations-bucket-6 55.58% <ø> (-0.10%) ⬇️
instrumentations-bucket-7 53.59% <ø> (-0.09%) ⬇️
instrumentations-bucket-8 54.63% <ø> (-0.09%) ⬇️
instrumentations-bucket-9 56.08% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-couchbase 48.13% <ø> (-0.10%) ⬇️
instrumentations-integration-esbuild 33.89% <ø> (-0.10%) ⬇️
llmobs-ai_anthropic_bedrock 57.73% <ø> (-0.06%) ⬇️
llmobs-bucket-1 57.00% <ø> (-0.05%) ⬇️
llmobs-openai 57.39% <ø> (-0.24%) ⬇️
llmobs-sdk 59.96% <ø> (-0.06%) ⬇️
llmobs-vertex-ai 54.22% <ø> (-0.07%) ⬇️
master-coverage 96.61% <ø> (?)
openfeature 54.60% <ø> (-0.04%) ⬇️
openfeature-unit 49.78% <ø> (-0.10%) ⬇️
platform-core_esbuild_instrumentations-misc 38.37% <ø> (-0.12%) ⬇️
platform-integration 62.33% <ø> (+0.03%) ⬆️
platform-shimmer_unit-guardrails_webpack 37.20% <ø> (-0.12%) ⬇️
plugins-bucket-0 53.17% <ø> (-0.09%) ⬇️
plugins-bucket-1 55.02% <ø> (-0.05%) ⬇️
plugins-bucket-11 57.45% <ø> (+1.78%) ⬆️
plugins-bucket-18 57.06% <ø> (-0.09%) ⬇️
plugins-bucket-19 55.37% <ø> (-0.07%) ⬇️
plugins-bucket-20 57.42% <ø> (-0.09%) ⬇️
plugins-bucket-4 53.84% <ø> (-0.09%) ⬇️
plugins-bullmq_cassandra_cookie 57.34% <ø> (-0.09%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 52.31% <ø> (-0.10%) ⬇️
plugins-fetch_fs_generic-pool 54.45% <ø> (-0.17%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 59.84% <ø> (-0.09%) ⬇️
plugins-hapi_hono_ioredis 55.84% <ø> (-0.09%) ⬇️
plugins-jest_knex_langgraph 51.66% <ø> (-0.10%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 53.43% <ø> (-0.07%) ⬇️
plugins-lodash_mariadb_memcached 54.20% <ø> (-0.10%) ⬇️
plugins-moleculer_mongodb_mongodb-core 57.28% <ø> (-0.09%) ⬇️
plugins-mongoose_multer_mysql 54.69% <ø> (-0.09%) ⬇️
plugins-mysql2_nats_node-serialize 56.19% <ø> (-0.10%) ⬇️
plugins-opensearch_passport-http_pino 55.04% <ø> (-0.09%) ⬇️
plugins-postgres_process_pug 54.28% <ø> (-0.10%) ⬇️
plugins-redis_router_sequelize 56.99% <ø> (-0.12%) ⬇️
plugins-test-and-upstream-rhea_undici_url 56.99% <ø> (-0.09%) ⬇️
plugins-valkey_vm_winston 53.91% <ø> (-0.10%) ⬇️
plugins-ws 54.78% <ø> (-0.10%) ⬇️
profiling 58.20% <ø> (-0.09%) ⬇️
serverless-aws-sdk-aws-sdk 50.66% <ø> (-0.08%) ⬇️
serverless-aws-sdk-bedrockruntime 50.68% <ø> (-0.09%) ⬇️
serverless-aws-sdk-client 51.93% <ø> (-0.09%) ⬇️
serverless-aws-sdk-dynamodb 51.74% <ø> (-0.09%) ⬇️
serverless-aws-sdk-eventbridge 46.22% <ø> (-0.09%) ⬇️
serverless-aws-sdk-kinesis 54.70% <ø> (-0.09%) ⬇️
serverless-aws-sdk-lambda 52.78% <ø> (-0.09%) ⬇️
serverless-aws-sdk-s3 51.53% <ø> (-0.09%) ⬇️
serverless-aws-sdk-serverless-peer-service 54.71% <ø> (-0.09%) ⬇️
serverless-aws-sdk-sns 55.47% <ø> (-0.09%) ⬇️
serverless-aws-sdk-sqs 55.90% <ø> (-0.16%) ⬇️
serverless-aws-sdk-stepfunctions 51.25% <ø> (-0.09%) ⬇️
serverless-aws-sdk-util 48.43% <ø> (-0.10%) ⬇️
serverless-bucket-0 55.17% <ø> (-0.05%) ⬇️
serverless-bucket-1 56.00% <ø> (-0.09%) ⬇️
test-optimization-cucumber 72.92% <ø> (-0.05%) ⬇️
test-optimization-cypress 66.34% <ø> (+0.06%) ⬆️
test-optimization-jest 74.22% <ø> (-0.06%) ⬇️
test-optimization-mocha 74.66% <ø> (+0.02%) ⬆️
test-optimization-playwright-playwright-atr 61.60% <ø> (+0.05%) ⬆️
test-optimization-playwright-playwright-efd 61.72% <ø> (-0.01%) ⬇️
test-optimization-playwright-playwright-final-status 61.70% <ø> (-0.01%) ⬇️
test-optimization-playwright-playwright-impacted-tests 61.41% <ø> (+0.16%) ⬆️
test-optimization-playwright-playwright-reporting 61.30% <ø> (-0.01%) ⬇️
test-optimization-playwright-playwright-test-management 62.27% <ø> (-0.06%) ⬇️
test-optimization-playwright-playwright-test-span 61.44% <ø> (-0.06%) ⬇️
test-optimization-selenium 60.64% <ø> (-0.11%) ⬇️
test-optimization-testopt 59.13% <ø> (+0.05%) ⬆️
test-optimization-vitest 71.56% <ø> (+0.01%) ⬆️

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.

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I will think about how the unversioned part will still stay latest even with your changes :)

Comment thread packages/dd-trace/test/plugins/externals.js Outdated
Comment thread packages/dd-trace/test/plugins/externals.js Outdated
@BridgeAR
BridgeAR merged commit 0ad9953 into master Jul 14, 2026
657 checks passed
@BridgeAR
BridgeAR deleted the ccapell/aap-plugin-test-select-version-by-nodejs-runtime branch July 14, 2026 14:52
This was referenced Jul 15, 2026
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