Skip to content

test(test-optimization): skip unsupported v5 Mocha cases - #9834

Merged
pabloerhard merged 1 commit into
masterfrom
agent/test-optimization-v5-mocha-skip
Aug 17, 2026
Merged

test(test-optimization): skip unsupported v5 Mocha cases#9834
pabloerhard merged 1 commit into
masterfrom
agent/test-optimization-v5-mocha-skip

Conversation

@IlyasShabi

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Skips the reporter afterAll finalization test for dd-trace v5 with Mocha 5.2.
  • Skips the retry-reporting test for the same combination.

Motivation

The v5 release proposal fails with older Mocha versions that do not support the lifecycle behavior introduced in #9762 and #9797. The supported v5 versions and v6 continue to run these tests.

@dd-octo-sts

dd-octo-sts Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.2 MB
Deduped: 8.86 MB
No deduping: 8.86 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 445.14 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-official datadog-official 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.

Datadog Autotest: PASS

More details

The predicate resolves oldest to Mocha 5.2.0 before gating and also requires dd-trace v5, so only the two documented unsupported cases lose coverage; v5/latest and every v6 matrix remain active.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 6d243e2 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@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: 6d243e28a8

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

})

it('tests with retries', async () => {
reporterFinalizationIt('tests with retries', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the supported Mocha 5 retry test enabled

When the v5 oldest-version CI leg resolves MOCHA_VERSION=oldest to 5.2.0, this change skips the entire pre-existing retry test even though the test contains explicit expectations for Mocha versions below 6. The new TODO acknowledges that this is a regression introduced by #9798, so skipping the test hides a deterministic regression in a supported v5 configuration and removes the remaining CI coverage for Mocha 5 retry reporting; keep this test enabled and fix or version-gate the underlying finalization behavior instead.

AGENTS.md reference: AGENTS.md:L345-L349

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This PR intentionally only skips the failing v5 cases to unblock the release, following #9821. The underlying Mocha 5 behavior can be addressed separately.

@datadog-official

datadog-official Bot commented Aug 17, 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: 98.53% (+0.00%)

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

@pr-commenter

pr-commenter Bot commented Aug 17, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-17 08:57:23

Comparing candidate commit 6d243e2 in PR branch agent/test-optimization-v5-mocha-skip with baseline commit 7142bf6 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2281 metrics, 11 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-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-19620.648KB; +19659.048KB] or [-5.132%; +5.142%]

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

  • unstable max_rss_usage [-17.875MB; +11.824MB] or [-6.765%; +4.475%]

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

  • unstable max_rss_usage [-15729.253KB; +14413.253KB] or [-6.325%; +5.796%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-191.587ms; +422.021ms] or [-3.894%; +8.576%]
  • unstable execution_time [-186.573ms; +419.787ms] or [-3.736%; +8.405%]
  • unstable throughput [-147615.352op/s; +66602.569op/s] or [-8.792%; +3.967%]

scenario:plugin-aws-sdk-extract-response-body-20

  • unstable cpu_user_time [-71.107ms; +136.705ms] or [-3.744%; +7.199%]
  • unstable execution_time [-70.376ms; +136.704ms] or [-3.702%; +7.191%]
  • unstable throughput [-281561.634op/s; +145215.925op/s] or [-6.644%; +3.427%]

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

  • unstable max_rss_usage [-22724.928KB; +21720.128KB] or [-5.739%; +5.486%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-3.797MB; +10.164MB] or [-4.620%; +12.367%]

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (7142bf6) to head (6d243e2).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9834    +/-   ##
========================================
  Coverage   98.53%   98.53%            
========================================
  Files         975      975            
  Lines      144148   144148            
  Branches    12448    12813   +365     
========================================
  Hits       142031   142031            
  Misses       2117     2117            
Flag Coverage Δ
aiguard 57.23% <ø> (-0.03%) ⬇️
aiguard-integration 55.49% <ø> (ø)
apm-bucket-0 57.63% <ø> (-0.03%) ⬇️
apm-bucket-1 62.82% <ø> (-0.02%) ⬇️
apm-bucket-2 61.65% <ø> (-0.03%) ⬇️
apm-bucket-3 59.27% <ø> (-0.03%) ⬇️
apm-capabilities-tracing 62.35% <ø> (ø)
apm-integrations-aerospike 55.52% <ø> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka-javascript 60.63% <ø> (+<0.01%) ⬆️
apm-integrations-couchbase 56.21% <ø> (-0.03%) ⬇️
apm-integrations-http 61.38% <ø> (-0.02%) ⬇️
apm-integrations-kafkajs 61.15% <ø> (-0.03%) ⬇️
apm-integrations-next 58.89% <ø> (-0.03%) ⬇️
apm-integrations-prisma 58.33% <ø> (-0.02%) ⬇️
appsec 71.49% <ø> (-0.05%) ⬇️
appsec-express_fastify_graphql 68.91% <ø> (-0.02%) ⬇️
appsec-integration 49.60% <ø> (ø)
appsec-kafka_ldapjs_lodash 62.88% <ø> (-0.02%) ⬇️
appsec-mongodb-core_mongoose_mysql 66.37% <ø> (-0.02%) ⬇️
appsec-next 56.24% <ø> (-0.02%) ⬇️
appsec-node-serialize_passport_postgres 65.78% <ø> (-0.02%) ⬇️
appsec-sourcing_stripe_template 64.21% <ø> (-0.02%) ⬇️
debugger 63.68% <ø> (-0.04%) ⬇️
instrumentations-bucket-0 51.24% <ø> (-0.03%) ⬇️
instrumentations-bucket-1 59.13% <ø> (-0.03%) ⬇️
instrumentations-bucket-10 60.39% <ø> (-0.02%) ⬇️
instrumentations-bucket-11 61.05% <ø> (-0.02%) ⬇️
instrumentations-bucket-12 51.15% <ø> (-0.03%) ⬇️
instrumentations-bucket-13 52.00% <ø> (-0.03%) ⬇️
instrumentations-bucket-14 51.26% <ø> (-0.03%) ⬇️
instrumentations-bucket-2 52.49% <ø> (-0.03%) ⬇️
instrumentations-bucket-3 53.13% <ø> (-0.03%) ⬇️
instrumentations-bucket-4 58.21% <ø> (-0.03%) ⬇️
instrumentations-bucket-5 48.82% <ø> (-0.02%) ⬇️
instrumentations-bucket-6 59.74% <ø> (-0.03%) ⬇️
instrumentations-bucket-7 51.44% <ø> (-0.03%) ⬇️
instrumentations-bucket-8 57.91% <ø> (-0.02%) ⬇️
instrumentations-bucket-9 56.75% <ø> (-0.03%) ⬇️
instrumentations-instrumentation-couchbase 50.22% <ø> (-0.03%) ⬇️
instrumentations-integration-esbuild 33.87% <ø> (ø)
llmobs-ai_anthropic_bedrock 62.31% <ø> (-0.02%) ⬇️
llmobs-bucket-1 60.84% <ø> (-0.02%) ⬇️
llmobs-openai 61.46% <ø> (-0.02%) ⬇️
llmobs-openai-agents_vertex-ai 59.56% <ø> (-0.02%) ⬇️
llmobs-sdk 67.23% <ø> (-0.03%) ⬇️
master-coverage 98.53% <ø> (?)
openfeature 55.19% <ø> (ø)
openfeature-unit 52.84% <ø> (-0.03%) ⬇️
platform-core_esbuild_instrumentations-misc 40.85% <ø> (-0.02%) ⬇️
platform-integration 59.92% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 38.49% <ø> (-0.02%) ⬇️
plugins-bucket-0 56.43% <ø> (-0.02%) ⬇️
plugins-bucket-1 53.55% <ø> (ø)
plugins-bucket-11 60.93% <ø> (-0.03%) ⬇️
plugins-bucket-17 60.75% <ø> (-0.03%) ⬇️
plugins-bucket-18 61.42% <ø> (-0.02%) ⬇️
plugins-bucket-19 60.78% <ø> (-0.03%) ⬇️
plugins-bucket-20 63.15% <ø> (-0.03%) ⬇️
plugins-bucket-4 57.81% <ø> (-0.03%) ⬇️
plugins-bullmq_cassandra_cookie 60.84% <ø> (-0.03%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 55.86% <ø> (-0.03%) ⬇️
plugins-fetch_fs_generic-pool 57.72% <ø> (-0.06%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 63.59% <ø> (-0.03%) ⬇️
plugins-hapi_hono_ioredis 59.38% <ø> (-0.03%) ⬇️
plugins-knex_langgraph_ldapjs 54.60% <ø> (-0.03%) ⬇️
plugins-light-my-request_limitd-client_lodash 57.86% <ø> (-0.02%) ⬇️
plugins-mariadb_memcached_mercurius 61.02% <ø> (-0.02%) ⬇️
plugins-mongodb_mongodb-core_mongoose 58.75% <ø> (-0.03%) ⬇️
plugins-multer_mysql_mysql2 58.34% <ø> (-0.03%) ⬇️
plugins-nats_node-serialize_opensearch 59.86% <ø> (-0.03%) ⬇️
plugins-passport-http_pino_postgres 58.08% <ø> (-0.03%) ⬇️
plugins-process_pug_redis 56.89% <ø> (-0.03%) ⬇️
plugins-undici_url_valkey 57.51% <ø> (-0.02%) ⬇️
plugins-vm_winston_ws 59.07% <ø> (-0.03%) ⬇️
profiling 61.16% <ø> (-0.02%) ⬇️
serverless-aws-sdk-aws-sdk 54.40% <ø> (-0.02%) ⬇️
serverless-aws-sdk-base-inject-field 50.47% <ø> (-0.03%) ⬇️
serverless-aws-sdk-bedrockruntime 54.19% <ø> (-0.02%) ⬇️
serverless-aws-sdk-client 55.71% <ø> (-0.03%) ⬇️
serverless-aws-sdk-dynamodb 55.01% <ø> (-0.03%) ⬇️
serverless-aws-sdk-eventbridge 56.49% <ø> (-0.02%) ⬇️
serverless-aws-sdk-kinesis 58.55% <ø> (-0.02%) ⬇️
serverless-aws-sdk-lambda 56.73% <ø> (-0.02%) ⬇️
serverless-aws-sdk-s3 55.11% <ø> (-0.02%) ⬇️
serverless-aws-sdk-serverless-peer-service 59.13% <ø> (-0.02%) ⬇️
serverless-aws-sdk-sns 59.34% <ø> (-0.02%) ⬇️
serverless-aws-sdk-sqs 59.75% <ø> (-0.02%) ⬇️
serverless-aws-sdk-stepfunctions 54.94% <ø> (-0.02%) ⬇️
serverless-aws-sdk-util 50.99% <ø> (-0.03%) ⬇️
serverless-bucket-0 53.35% <ø> (ø)
serverless-bucket-1 58.36% <ø> (-0.03%) ⬇️
test-optimization-cucumber 70.52% <ø> (-0.06%) ⬇️
test-optimization-cypress 64.74% <ø> (+0.03%) ⬆️
test-optimization-jest 72.00% <ø> (+0.01%) ⬆️
test-optimization-mocha 72.05% <ø> (+0.03%) ⬆️
test-optimization-playwright-playwright-atr 59.52% <ø> (-0.02%) ⬇️
test-optimization-playwright-playwright-efd 59.67% <ø> (-0.02%) ⬇️
test-optimization-playwright-playwright-final-status 59.83% <ø> (-0.03%) ⬇️
test-optimization-playwright-playwright-impacted-tests 59.39% <ø> (+0.12%) ⬆️
test-optimization-playwright-playwright-reporting 60.86% <ø> (-0.07%) ⬇️
test-optimization-playwright-playwright-test-management 60.32% <ø> (-0.14%) ⬇️
test-optimization-playwright-playwright-test-span 59.57% <ø> (-0.23%) ⬇️
test-optimization-selenium 58.77% <ø> (-0.16%) ⬇️
test-optimization-testopt 57.44% <ø> (+0.07%) ⬆️
test-optimization-vitest 72.70% <ø> (+0.02%) ⬆️
test-optimization-vitest-browser 58.62% <ø> (-0.02%) ⬇️
test-optimization-webdriverio 64.91% <ø> (+0.04%) ⬆️

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.

@pabloerhard
pabloerhard merged commit dc672dd into master Aug 17, 2026
726 of 727 checks passed
@pabloerhard
pabloerhard deleted the agent/test-optimization-v5-mocha-skip branch August 17, 2026 18:46
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Aug 17, 2026
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Aug 17, 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