[test optimization] Gate dynamic name detection test behind contextNewVersions#7908
Merged
juan-fernandez merged 1 commit intomasterfrom Apr 1, 2026
Conversation
…xtNewVersions The "tags new tests with dynamic names and logs a warning" test relies on EFD/known tests features that require playwright >=1.38.0. For 1.18.0 the instrumentation never fetches known tests, so the warning is never emitted and the assertion fails. Wrap the test in contextNewVersions to skip it on older playwright versions. Made-with: Cursor
contextNewVersions
Contributor
Overall package sizeSelf size: 5.07 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7908 +/- ##
==========================================
- Coverage 74.33% 74.33% -0.01%
==========================================
Files 768 768
Lines 35863 35863
==========================================
- Hits 26660 26659 -1
- Misses 9203 9204 +1 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: a09cb15 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
gnufede
approved these changes
Apr 1, 2026
Merged
juan-fernandez
added a commit
that referenced
this pull request
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Wraps the "tags new tests with dynamic names and logs a warning" playwright integration test inside
contextNewVersionsso it is only run for playwright >=1.38.0 (andlatest).Root cause: The test asserts that
console.warnoutput contains a dynamic-name detection warning. That warning is produced bylogDynamicNamesWarningin the instrumentation layer, which depends on the known-tests/EFD code path. Inpackages/datadog-instrumentations/src/playwright.js, the known-tests fetch is gated behindsatisfies(playwrightVersion, '>=1.38.0'), so for playwright 1.18.0 tests are never marked_ddIsNew,newTestsWithDynamicNamesstays empty, and the warning is never emitted — causing the assertion to fail.Motivation
CI fails for
PLAYWRIGHT_VERSION=1.18.0(tested only on dd-trace v5) with:Additional Notes
Follows the existing
contextNewVersionspattern already used for all other EFD/known-tests/test-management dependent tests in this file.