Skip to content

fix(playwright): do not mark unchanged tests as impacted#9314

Merged
juan-fernandez merged 1 commit into
masterfrom
juan-fernandez/fix-playwright-impacted-tests
Jul 14, 2026
Merged

fix(playwright): do not mark unchanged tests as impacted#9314
juan-fernandez merged 1 commit into
masterfrom
juan-fernandez/fix-playwright-impacted-tests

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Returns the Playwright impacted-test result as a boolean instead of wrapping it in an object.

Adds an unchanged Playwright fixture and integration coverage proving that Impacted Tests does not mark or retry tests from files outside the git diff when Early Flake Detection is enabled.

Motivation

The Playwright instrumentation expects its onDone callback to receive a boolean. The plugin returned { isModified }, so { isModified: false } was truthy and every Playwright test was treated as modified. When Early Flake Detection was enabled, unchanged tests were repeated unnecessarily.

@dd-octo-sts

dd-octo-sts Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.71 MB
Deduped: 7.37 MB
No deduping: 7.37 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

@juan-fernandez

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 3278927c9f

ℹ️ 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".

@pr-commenter

pr-commenter Bot commented Jul 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-13 22:37:26

Comparing candidate commit 3278927 in PR branch juan-fernandez/fix-playwright-impacted-tests with baseline commit c708123 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2317 metrics, 41 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 [-196.255ms; +128.096ms] or [-7.482%; +4.884%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-238.120ms; +233.351ms] or [-9.346%; +9.159%]

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

  • unstable execution_time [-161.314ms; +169.533ms] or [-5.214%; +5.479%]

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

  • unstable execution_time [-194.524ms; +180.400ms] or [-6.716%; +6.228%]

scenario:appsec-control-20

  • unstable execution_time [-124.016ms; +133.881ms] or [-7.578%; +8.180%]

scenario:appsec-control-24

  • unstable execution_time [-116358.104µs; +118293.671µs] or [-9.389%; +9.545%]

scenario:appsec-control-26

  • unstable execution_time [-127391.727µs; +126758.294µs] or [-10.311%; +10.260%]

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

  • unstable execution_time [-13490.293µs; +14559.160µs] or [-5.241%; +5.656%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-20.695ms; +8.036ms] or [-7.866%; +3.054%]

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

  • unstable execution_time [-18.274ms; +12.857ms] or [-7.037%; +4.951%]

scenario:appsec-iast-with-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-24.694ms; +41.020ms] or [-4.461%; +7.410%]

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

  • unstable cpu_user_time [-1737.419ms; +3587.864ms] or [-19.473%; +40.213%]
  • unstable execution_time [-1727.825ms; +3602.358ms] or [-17.958%; +37.440%]
  • unstable instructions [-14.7G instructions; +30.8G instructions] or [-20.103%; +42.183%]
  • unstable max_rss_usage [-7.105MB; +15.335MB] or [-4.471%; +9.649%]
  • unstable throughput [-1004.278op/s; +490.251op/s] or [-29.150%; +14.230%]

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

  • unstable cpu_user_time [-2.782s; +0.388s] or [-27.863%; +3.884%]
  • unstable execution_time [-2.806s; +0.393s] or [-26.161%; +3.665%]
  • unstable instructions [-25.0G instructions; +3.4G instructions] or [-29.897%; +4.006%]
  • unstable throughput [-90.623op/s; +612.993op/s] or [-2.914%; +19.714%]

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

  • unstable cpu_user_time [-2510.069ms; +2262.943ms] or [-28.390%; +25.595%]
  • unstable execution_time [-2523.376ms; +2262.598ms] or [-26.418%; +23.688%]
  • unstable instructions [-21.3G instructions; +18.9G instructions] or [-29.421%; +26.192%]
  • unstable max_rss_usage [-9944.708KB; +10276.708KB] or [-6.259%; +6.468%]
  • unstable throughput [-621.061op/s; +734.877op/s] or [-17.873%; +21.149%]

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

  • unstable cpu_user_time [-1834.226ms; +583.508ms] or [-19.557%; +6.222%]
  • unstable execution_time [-1806.363ms; +620.541ms] or [-17.884%; +6.144%]
  • unstable instructions [-16.1G instructions; +5.2G instructions] or [-20.583%; +6.623%]
  • unstable throughput [-142.546op/s; +396.495op/s] or [-4.388%; +12.206%]

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

  • unstable cpu_user_time [-1786.429ms; +525.996ms] or [-21.081%; +6.207%]
  • unstable execution_time [-1805.808ms; +496.558ms] or [-19.683%; +5.412%]
  • unstable instructions [-15.3G instructions; +4.2G instructions] or [-22.028%; +6.097%]
  • unstable throughput [-139.731op/s; +511.308op/s] or [-3.899%; +14.267%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-407.575ms; +327.155ms] or [-8.444%; +6.778%]
  • unstable execution_time [-412.952ms; +327.864ms] or [-8.419%; +6.684%]
  • unstable throughput [-113460.420op/s; +141664.231op/s] or [-6.618%; +8.263%]

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

  • unstable max_rss_usage [-8.511MB; +5.968MB] or [-6.636%; +4.653%]

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

  • unstable cpu_user_time [-696.778ms; +738.366ms] or [-5.444%; +5.769%]
  • unstable execution_time [-706.075ms; +736.575ms] or [-5.397%; +5.630%]
  • unstable throughput [-3.390op/s; +3.248op/s] or [-5.511%; +5.279%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4432.991KB; +6237.991KB] or [-5.530%; +7.782%]

@juan-fernandez
juan-fernandez marked this pull request as ready for review July 13, 2026 22:38
@juan-fernandez
juan-fernandez requested a review from a team as a code owner July 13, 2026 22:38
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 13, 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: 3278927 | Docs | Datadog PR Page | Give us feedback!

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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 Playwright plugin was returning an object { isModified } instead of a boolean to its impacted-test callback. In JavaScript, any non-null object is truthy, so even { isModified: false } evaluated as true, marking all tests as impacted. With Early Flake Detection enabled, this caused unnecessary retries on unmodified tests. The fix passes the boolean directly, now correctly filtering out unmodified tests.

Was this helpful? React 👍 or 👎

📊 Validated against 5 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 3278927 · What is Autotest? · Any feedback? Reach out in #autotest

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.60%. Comparing base (c708123) to head (3278927).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9314      +/-   ##
==========================================
+ Coverage   96.59%   96.60%   +0.01%     
==========================================
  Files         919      919              
  Lines      121692   121692              
  Branches    20294    20824     +530     
==========================================
+ Hits       117549   117565      +16     
+ Misses       4143     4127      -16     
Flag Coverage Δ
aiguard 53.56% <ø> (-0.05%) ⬇️
aiguard-integration 57.01% <ø> (ø)
apm-bucket-0 53.79% <ø> (-0.05%) ⬇️
apm-bucket-1 58.07% <ø> (-0.05%) ⬇️
apm-bucket-2 56.11% <ø> (-0.05%) ⬇️
apm-capabilities-tracing 60.34% <0.00%> (ø)
apm-integrations-aerospike 52.94% <ø> (-0.05%) ⬇️
apm-integrations-confluentinc-kafka-javascript 57.06% <ø> (-0.05%) ⬇️
apm-integrations-couchbase 53.27% <ø> (-0.05%) ⬇️
apm-integrations-http 57.96% <ø> (-0.04%) ⬇️
apm-integrations-kafkajs 57.71% <ø> (-0.05%) ⬇️
apm-integrations-next 54.24% <ø> (-0.05%) ⬇️
apm-integrations-prisma 54.17% <ø> (-0.05%) ⬇️
apm-integrations-tedious 53.04% <ø> (-0.05%) ⬇️
appsec 68.94% <ø> (-0.10%) ⬇️
appsec-express_fastify_graphql 65.68% <ø> (-0.05%) ⬇️
appsec-integration 51.98% <ø> (ø)
appsec-kafka_ldapjs_lodash 59.09% <ø> (-0.04%) ⬇️
appsec-mongodb-core_mongoose_mysql 62.25% <ø> (-0.03%) ⬇️
appsec-next 52.85% <ø> (-0.04%) ⬇️
appsec-node-serialize_passport_postgres 61.88% <ø> (-0.04%) ⬇️
appsec-sourcing_stripe_template 60.34% <ø> (-0.04%) ⬇️
debugger 65.71% <ø> (-0.02%) ⬇️
instrumentations-bucket-0 48.75% <ø> (-0.05%) ⬇️
instrumentations-bucket-1 54.96% <ø> (-0.05%) ⬇️
instrumentations-bucket-10 56.62% <ø> (-0.05%) ⬇️
instrumentations-bucket-11 48.74% <ø> (-0.05%) ⬇️
instrumentations-bucket-12 48.85% <ø> (-0.05%) ⬇️
instrumentations-bucket-13 48.68% <ø> (-0.05%) ⬇️
instrumentations-bucket-2 49.75% <ø> (-0.05%) ⬇️
instrumentations-bucket-3 53.83% <ø> (-0.05%) ⬇️
instrumentations-bucket-4 49.16% <ø> (-0.05%) ⬇️
instrumentations-bucket-5 53.01% <ø> (-0.05%) ⬇️
instrumentations-bucket-6 55.60% <ø> (-0.05%) ⬇️
instrumentations-bucket-7 53.61% <ø> (-0.05%) ⬇️
instrumentations-bucket-8 54.64% <ø> (-0.05%) ⬇️
instrumentations-bucket-9 56.10% <ø> (-0.04%) ⬇️
instrumentations-instrumentation-couchbase 48.18% <ø> (-0.05%) ⬇️
instrumentations-integration-esbuild 33.98% <ø> (ø)
llmobs-ai_anthropic_bedrock 57.73% <ø> (-0.04%) ⬇️
llmobs-bucket-1 56.98% <ø> (-0.04%) ⬇️
llmobs-openai 57.56% <ø> (-0.04%) ⬇️
llmobs-sdk 59.95% <ø> (-0.05%) ⬇️
llmobs-vertex-ai 54.21% <ø> (-0.05%) ⬇️
master-coverage 96.60% <100.00%> (?)
openfeature 54.62% <ø> (ø)
openfeature-unit 49.83% <ø> (-0.05%) ⬇️
platform-core_esbuild_instrumentations-misc 38.47% <ø> (-0.03%) ⬇️
platform-integration 62.23% <ø> (+0.04%) ⬆️
platform-shimmer_unit-guardrails_webpack 37.29% <ø> (-0.03%) ⬇️
plugins-azure-event-hubs_body-parser_bullmq ?
plugins-bucket-0 53.18% <ø> (-0.05%) ⬇️
plugins-bucket-1 55.08% <ø> (?)
plugins-bucket-11 55.60% <ø> (-1.17%) ⬇️
plugins-bucket-17 ?
plugins-bucket-18 57.07% <ø> (-0.50%) ⬇️
plugins-bucket-19 55.35% <ø> (-1.83%) ⬇️
plugins-bucket-20 57.44% <ø> (-1.96%) ⬇️
plugins-bucket-3 ?
plugins-bucket-4 53.85% <ø> (?)
plugins-bullmq_cassandra_cookie 57.36% <ø> (?)
plugins-cassandra_cookie_cookie-parser ?
plugins-cookie-parser_crypto_dd-trace-api 52.32% <ø> (?)
plugins-express-session_fastify_fetch ?
plugins-fetch_fs_generic-pool 54.54% <ø> (?)
plugins-fs_generic-pool_google-cloud-pubsub ?
plugins-google-cloud-pubsub_grpc_handlebars 59.86% <ø> (?)
plugins-grpc_handlebars_hapi ?
plugins-hapi_hono_ioredis 55.86% <ø> (?)
plugins-hono_ioredis_jest ?
plugins-jest_knex_langgraph 51.67% <ø> (?)
plugins-knex_langgraph_ldapjs ?
plugins-ldapjs_light-my-request_limitd-client 53.44% <ø> (?)
plugins-light-my-request_limitd-client_lodash ?
plugins-lodash_mariadb_memcached 54.21% <ø> (?)
plugins-mariadb_memcached_mercurius ?
plugins-moleculer_mongodb_mongodb-core 57.28% <ø> (?)
plugins-mongodb_mongodb-core_mongoose ?
plugins-mongoose_multer_mysql 54.71% <ø> (?)
plugins-multer_mysql_mysql2 ?
plugins-mysql2_nats_node-serialize 56.21% <ø> (?)
plugins-nats_node-serialize_opensearch ?
plugins-opensearch_passport-http_pino 55.05% <ø> (?)
plugins-passport-http_pino_postgres ?
plugins-postgres_process_pug 54.29% <ø> (?)
plugins-process_pug_redis ?
plugins-redis_router_sequelize 57.03% <ø> (?)
plugins-test-and-upstream-rhea_undici_url 57.03% <ø> (?)
plugins-undici_url_valkey ?
plugins-valkey_vm_winston 53.92% <ø> (?)
plugins-vm_winston_ws ?
plugins-ws 54.80% <ø> (?)
profiling 58.20% <ø> (-0.04%) ⬇️
serverless-aws-sdk-aws-sdk 50.67% <ø> (-0.04%) ⬇️
serverless-aws-sdk-bedrockruntime 50.69% <ø> (-0.05%) ⬇️
serverless-aws-sdk-client 51.97% <ø> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 51.75% <ø> (-0.05%) ⬇️
serverless-aws-sdk-eventbridge 46.26% <ø> (-0.05%) ⬇️
serverless-aws-sdk-kinesis 54.71% <ø> (-0.05%) ⬇️
serverless-aws-sdk-lambda 52.79% <ø> (-0.05%) ⬇️
serverless-aws-sdk-s3 51.54% <ø> (-0.05%) ⬇️
serverless-aws-sdk-serverless-peer-service 54.73% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sns 55.48% <ø> (-0.05%) ⬇️
serverless-aws-sdk-sqs 55.91% <ø> (-0.05%) ⬇️
serverless-aws-sdk-stepfunctions 51.25% <ø> (-0.05%) ⬇️
serverless-aws-sdk-util 48.48% <ø> (-0.05%) ⬇️
serverless-bucket-0 55.23% <ø> (ø)
serverless-bucket-1 56.01% <ø> (-0.05%) ⬇️
test-optimization-cucumber 72.94% <ø> (-0.02%) ⬇️
test-optimization-cypress 66.39% <ø> (+0.08%) ⬆️
test-optimization-jest 74.25% <ø> (-0.03%) ⬇️
test-optimization-mocha 74.70% <ø> (+0.06%) ⬆️
test-optimization-playwright-playwright-atr 61.57% <0.00%> (+0.02%) ⬆️
test-optimization-playwright-playwright-efd 61.76% <0.00%> (+0.09%) ⬆️
test-optimization-playwright-playwright-final-status 61.71% <0.00%> (-0.01%) ⬇️
test-optimization-playwright-playwright-impacted-tests 61.45% <100.00%> (+0.17%) ⬆️
test-optimization-playwright-playwright-reporting 61.34% <0.00%> (+0.02%) ⬆️
test-optimization-playwright-playwright-test-management 62.25% <0.00%> (-0.29%) ⬇️
test-optimization-playwright-playwright-test-span 61.48% <0.00%> (-0.06%) ⬇️
test-optimization-selenium 60.66% <ø> (-0.14%) ⬇️
test-optimization-testopt 59.15% <0.00%> (+0.08%) ⬆️
test-optimization-vitest 71.58% <ø> (+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.

@juan-fernandez
juan-fernandez merged commit 1dbe33d into master Jul 14, 2026
659 checks passed
@juan-fernandez
juan-fernandez deleted the juan-fernandez/fix-playwright-impacted-tests branch July 14, 2026 08:48
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jul 14, 2026
This was referenced Jul 14, 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