Skip to content

[test optimization] Fix test.has_failed_all_retries tag with Auto Test Retries#7727

Merged
juan-fernandez merged 3 commits intomasterfrom
juan-fernandez/fix-atr-has-failed-all-retries-tag
Mar 11, 2026
Merged

[test optimization] Fix test.has_failed_all_retries tag with Auto Test Retries#7727
juan-fernandez merged 3 commits intomasterfrom
juan-fernandez/fix-atr-has-failed-all-retries-tag

Conversation

@juan-fernandez
Copy link
Copy Markdown
Collaborator

What does this PR do?

Add test.has_failed_all_retries when Auto Test Retries is running.

Motivation

test.has_failed_all_retries was missing.

Fixes #7651

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.70%. Comparing base (49c1975) to head (05ab7cf).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...ckages/datadog-instrumentations/src/mocha/utils.js 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7727      +/-   ##
==========================================
- Coverage   80.47%   78.70%   -1.77%     
==========================================
  Files         740      739       -1     
  Lines       32023    32016       -7     
==========================================
- Hits        25770    25199     -571     
- Misses       6253     6817     +564     
Flag Coverage Δ
aiguard-macos 38.88% <ø> (-0.10%) ⬇️
aiguard-ubuntu 39.00% <ø> (-0.10%) ⬇️
aiguard-windows 38.72% <ø> (-0.10%) ⬇️
apm-capabilities-tracing-macos 48.89% <ø> (ø)
apm-capabilities-tracing-ubuntu 48.93% <ø> (ø)
apm-capabilities-tracing-windows 48.66% <ø> (ø)
apm-integrations-child-process 38.44% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-18 37.35% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-eol 37.85% <ø> (+0.07%) ⬆️
apm-integrations-oracledb 37.66% <ø> (-0.10%) ⬇️
appsec-express 55.15% <ø> (-0.07%) ⬇️
appsec-fastify 51.50% <ø> (-0.07%) ⬇️
appsec-graphql 51.68% <ø> (-0.07%) ⬇️
appsec-kafka 44.21% <ø> (-0.16%) ⬇️
appsec-ldapjs 43.90% <ø> (-0.08%) ⬇️
appsec-lodash 43.56% <ø> (-0.08%) ⬇️
appsec-macos 58.14% <0.00%> (-0.08%) ⬇️
appsec-mongodb-core 48.69% <ø> (-0.07%) ⬇️
appsec-mongoose 49.36% <ø> (-0.08%) ⬇️
appsec-mysql 50.74% <ø> (-0.07%) ⬇️
appsec-node-serialize 43.08% <ø> (-0.08%) ⬇️
appsec-passport 47.48% <ø> (-0.09%) ⬇️
appsec-postgres 50.48% <ø> (-0.07%) ⬇️
appsec-sourcing 42.49% <ø> (-0.08%) ⬇️
appsec-template 43.25% <ø> (-0.08%) ⬇️
appsec-ubuntu 58.22% <0.00%> (-0.08%) ⬇️
appsec-windows 58.00% <0.00%> (-0.07%) ⬇️
instrumentations-instrumentation-bluebird ?
instrumentations-instrumentation-body-parser 40.38% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-child_process 37.75% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 34.27% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express 34.59% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.40% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 40.01% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-fs 31.91% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 29.89% <0.00%> (-0.03%) ⬇️
instrumentations-instrumentation-http 39.73% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-knex 32.30% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-mongoose 33.42% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-multer 40.13% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mysql2 38.21% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-passport 43.88% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-http 43.56% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-local 44.09% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-pg 37.65% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise 32.22% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 32.23% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 32.27% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 32.20% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-when 32.24% <ø> (-0.10%) ⬇️
llmobs-ai 42.21% <ø> (-0.10%) ⬇️
llmobs-anthropic 40.19% <ø> (-0.09%) ⬇️
llmobs-bedrock 39.17% <ø> (-0.08%) ⬇️
llmobs-google-genai 39.86% <ø> (+0.04%) ⬆️
llmobs-langchain 39.97% <ø> (-0.08%) ⬇️
llmobs-openai ?
llmobs-vertex-ai 39.98% <ø> (-0.09%) ⬇️
platform-core 31.53% <ø> (ø)
platform-esbuild 34.48% <ø> (ø)
platform-instrumentations-misc 48.40% <ø> (ø)
platform-shimmer 37.63% <ø> (ø)
platform-unit-guardrails 32.95% <ø> (ø)
plugins-azure-event-hubs 25.83% <ø> (ø)
plugins-bullmq 44.08% <ø> (-0.22%) ⬇️
plugins-cassandra 37.84% <ø> (+0.04%) ⬆️
plugins-cookie 26.89% <ø> (ø)
plugins-cookie-parser 26.67% <ø> (ø)
plugins-crypto 26.79% <ø> (ø)
plugins-dd-trace-api 38.27% <ø> (-0.10%) ⬇️
plugins-express-mongo-sanitize 26.82% <ø> (ø)
plugins-express-session 26.63% <ø> (ø)
plugins-fastify 42.10% <ø> (-0.09%) ⬇️
plugins-fetch 38.26% <ø> (-0.10%) ⬇️
plugins-fs 38.54% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.87% <ø> (ø)
plugins-google-cloud-pubsub 45.31% <ø> (-0.09%) ⬇️
plugins-grpc 40.82% <ø> (-0.09%) ⬇️
plugins-handlebars 26.86% <ø> (ø)
plugins-hapi 40.01% <ø> (-0.10%) ⬇️
plugins-hono 40.41% <ø> (+0.04%) ⬆️
plugins-ioredis 38.35% <ø> (-0.10%) ⬇️
plugins-knex 26.50% <ø> (ø)
plugins-ldapjs 24.36% <ø> (ø)
plugins-light-my-request 26.23% <ø> (ø)
plugins-limitd-client 32.57% <ø> (-0.10%) ⬇️
plugins-lodash 25.96% <ø> (ø)
plugins-mariadb 39.45% <ø> (-0.05%) ⬇️
plugins-memcached 38.07% <ø> (-0.10%) ⬇️
plugins-microgateway-core 39.08% <ø> (-0.08%) ⬇️
plugins-moleculer 40.41% <ø> (-0.10%) ⬇️
plugins-mongodb 39.09% <ø> (-0.10%) ⬇️
plugins-mongodb-core 38.92% <ø> (-0.10%) ⬇️
plugins-mongoose 38.78% <ø> (-0.10%) ⬇️
plugins-multer 26.63% <ø> (ø)
plugins-mysql 39.09% <ø> (-0.25%) ⬇️
plugins-mysql2 39.18% <ø> (-0.10%) ⬇️
plugins-node-serialize 26.93% <ø> (ø)
plugins-opensearch 37.53% <ø> (-0.10%) ⬇️
plugins-passport-http 26.68% <ø> (ø)
plugins-postgres 35.65% <0.00%> (-0.10%) ⬇️
plugins-process 26.79% <ø> (ø)
plugins-pug 26.89% <ø> (ø)
plugins-redis 38.81% <ø> (-0.10%) ⬇️
plugins-router 42.82% <ø> (-0.10%) ⬇️
plugins-sequelize 25.47% <ø> (ø)
plugins-test-and-upstream-amqp10 38.43% <ø> (+0.04%) ⬆️
plugins-test-and-upstream-amqplib 43.77% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-apollo 38.93% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-avsc 38.60% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-bunyan 33.83% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 40.66% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-graphql 40.04% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-koa 40.25% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-protobufjs 38.82% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-rhea 43.96% <ø> (-0.07%) ⬇️
plugins-undici 39.04% <ø> (-0.09%) ⬇️
plugins-url 26.79% <ø> (ø)
plugins-valkey 38.02% <ø> (-0.10%) ⬇️
plugins-vm 26.79% <ø> (ø)
plugins-winston 34.03% <ø> (-0.10%) ⬇️
plugins-ws 41.77% <ø> (-0.10%) ⬇️
profiling-macos 39.85% <ø> (-0.10%) ⬇️
profiling-ubuntu 39.97% <ø> (-0.10%) ⬇️
profiling-windows 41.16% <ø> (-0.49%) ⬇️
serverless-azure-functions-client 25.54% <ø> (ø)
serverless-azure-functions-eventhubs 25.54% <ø> (ø)
serverless-azure-functions-servicebus 25.54% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2026

Overall package size

Self size: 4.95 MB
Deduped: 5.8 MB
No deduping: 5.8 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

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

@datadog-datadog-prod-us1-2

This comment has been minimized.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 10, 2026

Benchmarks

Benchmark execution time: 2026-03-10 14:38:06

Comparing candidate commit 05ab7cf in PR branch juan-fernandez/fix-atr-has-failed-all-retries-tag with baseline commit 49c1975 in branch master.

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

@juan-fernandez
Copy link
Copy Markdown
Collaborator Author

E2E Test Report: SUCCESS ✅

Tested by: Shepherd Agent (autonomous QA for Datadog Test Optimization)

Test Environment

  • Method: Local testing with decap-cms playground (Jest 27.5.1, Node 24)
  • Revision tested: juan-fernandez/fix-atr-has-failed-all-retries-tag

Results

Check Status
Bug reproduced on master (no test.has_failed_all_retries on ATR retries)
PR fix: test.has_failed_all_retries: "true" set on last ATR retry span
5 ATR retry spans with test.retry_reason: auto_test_retry
test.final_status: fail set on session

Test Methodology

  1. Created an always-failing Jest test in the decap-cms playground
  2. Ran it twice — once against master, once against the PR branch — using the auto-test-retries mockdog scenario (flaky_test_retries_enabled: true)
  3. Inspected spans captured by mockdog for the test.has_failed_all_retries tag

Baseline (master): 6 test spans (1 original + 5 ATR retries), all test.status: fail, no test.has_failed_all_retries tag — bug confirmed.

PR branch: Same 6 spans, last retry span has test.has_failed_all_retries: "true" — fix confirmed.


This E2E test was performed by Shepherd — autonomous QA agent for Datadog Test Optimization

@juan-fernandez juan-fernandez marked this pull request as ready for review March 10, 2026 14:08
@juan-fernandez juan-fernandez requested a review from a team as a code owner March 10, 2026 14:08
@juan-fernandez juan-fernandez merged commit 45651f5 into master Mar 11, 2026
1041 of 1061 checks passed
@juan-fernandez juan-fernandez deleted the juan-fernandez/fix-atr-has-failed-all-retries-tag branch March 11, 2026 08:31
dd-octo-sts bot pushed a commit that referenced this pull request Mar 12, 2026
@dd-octo-sts dd-octo-sts bot mentioned this pull request Mar 12, 2026
CarlesDD pushed a commit that referenced this pull request Mar 16, 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.

test.has_failed_all_retries tag not set for Auto Test Retries

2 participants