Skip to content

Conversation

@bojbrook
Copy link
Contributor

What does this PR do?

Fixes the mongoDB flaky test when DBM propagation is set to full. Example error.

 AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
    + actual - expected
    
    + "dddb='admin.%24cmd',dddbs='test-mongodb',dde='tester',ddh='127.0.0.1',ddps='test',ddpv='11.7.5',ddprs='admin',traceparent='00-693cf4dc00000000162f8b1eda59e22b-162f8b1eda59e22b-00'"
    - "dddb='test.4cd4a2caadc196e5',dddbs='test-mongodb',dde='tester',ddh='127.0.0.1',ddps='test',ddpv='11.7.5',ddprs='test',traceparent='00-693cf4dc0000000036365d6198aac05c-36365d6198aac05c-01'"

The value discrepancy was caused by MongoDB emitting isMaster commands, which were being traced but did not match the values included in the SQL comment. This PR updates the tests to assert against the values produced by injectDbmComment.

Motivation

Flakiness test report.

Plugin Checklist

Additional Notes

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7131   +/-   ##
=======================================
  Coverage   84.78%   84.78%           
=======================================
  Files         521      521           
  Lines       22155    22155           
=======================================
  Hits        18785    18785           
  Misses       3370     3370           

☔ 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

github-actions bot commented Dec 17, 2025

Overall package size

Self size: 4.35 MB
Deduped: 5.18 MB
No deduping: 5.18 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.0 | 68.46 kB | 797.03 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
Copy link

datadog-datadog-prod-us1 bot commented Dec 17, 2025

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

cypress@10.2.0 esm early flake detection does not run EFD if the known tests request fails from integration-tests/cypress/cypress.spec.js (Datadog) (Fix with Cursor)
Cannot read properties of undefined (reading 'content')

ℹ️ Info

🧪 All tests passed

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

@bojbrook bojbrook force-pushed the bojbrook/mongodb-flaky-tests branch from aa36185 to e41a49a Compare December 18, 2025 17:29
@pr-commenter
Copy link

pr-commenter bot commented Dec 18, 2025

Benchmarks

Benchmark execution time: 2025-12-18 17:41:24

Comparing candidate commit e41a49a in PR branch bojbrook/mongodb-flaky-tests with baseline commit d9a3a8e in branch master.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants