Skip to content

ci: fix coverage reports and prevent detecting fixture files#7391

Merged
BridgeAR merged 22 commits intomasterfrom
BridgeAR/2026-01-30-fix-coverage-upload
Feb 1, 2026
Merged

ci: fix coverage reports and prevent detecting fixture files#7391
BridgeAR merged 22 commits intomasterfrom
BridgeAR/2026-01-30-fix-coverage-upload

Conversation

@BridgeAR
Copy link
Copy Markdown
Member

@BridgeAR BridgeAR commented Jan 30, 2026

Our test optimization product is using fixture files that are automatically picked up by CodeCov. Instead of having to declare our coverage files in all CI scripts, this just renames these fixture files, since they are just imported to read their content.

To prevent future issues, a small lint job is added that prevents names that might be detected as coverage.

The scripts are now way simpler due to the fix and a dynamic config is used for nyc.

While this officially 'decreases' our coverage, the opposite is actually the case.

We now track 9000 more lines and 200 files of which we cover 6000 lines. That is why our overall coverage drops while we actually properly handle the coverage now.

@@            Coverage Diff             @@
##           master    https://github.com/DataDog/dd-trace-js/issues/7391      +/-   ##
==========================================
- Coverage   86.16%   80.58%   -5.58%     
==========================================
  Files         515      731     +216     
  Lines       22249    31234    +8985     
==========================================
+ Hits        19171    25171    +6000     
- Misses       3078     6063    +2985

All our uploaded files are now correct and none create errors:

image

This PR makes our coverage way more solid and is a first step towards also tracking the coverage of integration tests.

Coverage is now tracked in individual folders per Node.js version and plugin name. That way CodeCov is merging the coverage instead of nyc and we never replace existing coverage.

Our test optimization product is using fixture files that are
automatically picked up by CodeCov. Instead of having to declare
our coverage files in all CI scripts, this just renames these
fixture files, since they are just imported to read their content.

To prevent future issues, a small lint job is added that prevents
names that might be detected as coverage.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 30, 2026

Overall package size

Self size: 4.49 MB
Deduped: 5.33 MB
No deduping: 5.33 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.3 | 76.87 kB | 808.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

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

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.58%. Comparing base (4a8a494) to head (5e99b70).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7391      +/-   ##
==========================================
- Coverage   85.86%   80.58%   -5.29%     
==========================================
  Files         518      731     +213     
  Lines       22375    31234    +8859     
==========================================
+ Hits        19212    25169    +5957     
- Misses       3163     6065    +2902     
Flag Coverage Δ
aiguard-macos 39.09% <0.00%> (-60.01%) ⬇️
aiguard-ubuntu 39.13% <0.00%> (-59.96%) ⬇️
aiguard-windows 38.98% <0.00%> (-60.12%) ⬇️
apm-capabilities-tracing-macos 48.92% <50.00%> (-8.75%) ⬇️
apm-capabilities-tracing-ubuntu 48.92% <50.00%> (-8.74%) ⬇️
apm-capabilities-tracing-windows 48.64% <50.00%> (-8.63%) ⬇️
apm-integrations-child-process 38.59% <0.00%> (-60.60%) ⬇️
apm-integrations-couchbase-18 37.31% <0.00%> (-62.69%) ⬇️
apm-integrations-couchbase-eol 37.80% <0.00%> (-62.20%) ⬇️
apm-integrations-oracledb 37.99% <0.00%> (?)
appsec-express 55.45% <50.00%> (-7.09%) ⬇️
appsec-fastify 52.05% <50.00%> (-6.50%) ⬇️
appsec-graphql 52.38% <50.00%> (-1.02%) ⬇️
appsec-kafka 44.67% <0.00%> (+0.68%) ⬆️
appsec-ldapjs 44.34% <0.00%> (-1.71%) ⬇️
appsec-lodash 44.02% <0.00%> (-3.28%) ⬇️
appsec-macos 58.51% <0.00%> (-35.26%) ⬇️
appsec-mongodb-core 49.14% <50.00%> (-2.69%) ⬇️
appsec-mongoose 49.95% <50.00%> (-0.79%) ⬇️
appsec-mysql 51.32% <50.00%> (-2.84%) ⬇️
appsec-node-serialize 43.53% <0.00%> (-0.39%) ⬇️
appsec-passport 48.14% <50.00%> (+0.07%) ⬆️
appsec-postgres 51.11% <50.00%> (-3.41%) ⬇️
appsec-sourcing 42.87% <0.00%> (+9.07%) ⬆️
appsec-template 43.70% <0.00%> (-0.22%) ⬇️
appsec-ubuntu 58.54% <0.00%> (-35.23%) ⬇️
appsec-windows 58.39% <0.00%> (-35.37%) ⬇️
instrumentations-instrumentation-bluebird 32.26% <0.00%> (?)
instrumentations-instrumentation-body-parser 40.74% <50.00%> (?)
instrumentations-instrumentation-child_process 37.89% <0.00%> (?)
instrumentations-instrumentation-cookie-parser 34.50% <50.00%> (?)
instrumentations-instrumentation-express 34.85% <50.00%> (?)
instrumentations-instrumentation-express-mongo-sanitize 34.64% <50.00%> (?)
instrumentations-instrumentation-express-session 40.42% <50.00%> (?)
instrumentations-instrumentation-fs 31.86% <0.00%> (?)
instrumentations-instrumentation-generic-pool 29.77% <ø> (?)
instrumentations-instrumentation-http 39.62% <0.00%> (?)
instrumentations-instrumentation-knex 32.02% <0.00%> (?)
instrumentations-instrumentation-mongoose 33.59% <0.00%> (?)
instrumentations-instrumentation-multer 40.47% <50.00%> (?)
instrumentations-instrumentation-mysql2 38.28% <0.00%> (?)
instrumentations-instrumentation-passport 40.78% <50.00%> (?)
instrumentations-instrumentation-passport-http 40.75% <50.00%> (?)
instrumentations-instrumentation-passport-local 40.75% <50.00%> (?)
instrumentations-instrumentation-pg 37.80% <0.00%> (?)
instrumentations-instrumentation-promise 32.19% <0.00%> (?)
instrumentations-instrumentation-promise-js 32.19% <0.00%> (?)
instrumentations-instrumentation-q 32.24% <0.00%> (?)
instrumentations-instrumentation-url 32.16% <0.00%> (?)
instrumentations-instrumentation-when 32.21% <0.00%> (?)
llmobs-ai 41.39% <0.00%> (-10.70%) ⬇️
llmobs-anthropic 40.61% <0.00%> (-2.13%) ⬇️
llmobs-bedrock 39.49% <0.00%> (-0.58%) ⬇️
llmobs-google-genai 40.09% <0.00%> (-5.80%) ⬇️
llmobs-langchain 39.64% <0.00%> (-10.52%) ⬇️
llmobs-openai 44.45% <0.00%> (-11.18%) ⬇️
llmobs-vertex-ai 40.32% <0.00%> (-4.16%) ⬇️
platform-core 28.09% <ø> (-59.15%) ⬇️
platform-esbuild 31.49% <ø> (?)
platform-instrumentations-misc 39.62% <ø> (-49.55%) ⬇️
platform-shimmer 34.83% <ø> (-63.98%) ⬇️
platform-unit-guardrails 30.37% <ø> (-59.10%) ⬇️
plugins-azure-event-hubs 22.64% <ø> (?)
plugins-azure-service-bus 22.08% <ø> (?)
plugins-bullmq 43.60% <0.00%> (?)
plugins-cassandra 38.03% <0.00%> (?)
plugins-cookie 23.69% <ø> (?)
plugins-cookie-parser 23.50% <ø> (?)
plugins-crypto 22.88% <ø> (?)
plugins-dd-trace-api 38.40% <0.00%> (?)
plugins-express-mongo-sanitize 23.67% <ø> (?)
plugins-express-session 23.46% <ø> (?)
plugins-fastify 42.55% <50.00%> (?)
plugins-fetch 38.60% <0.00%> (?)
plugins-fs 38.67% <0.00%> (?)
plugins-generic-pool 22.68% <ø> (?)
plugins-google-cloud-pubsub 45.76% <0.00%> (?)
plugins-grpc 41.31% <0.00%> (?)
plugins-handlebars 23.71% <ø> (?)
plugins-hapi 40.44% <0.00%> (?)
plugins-hono 40.63% <0.00%> (?)
plugins-ioredis 38.47% <0.00%> (?)
plugins-knex 23.51% <ø> (?)
plugins-ldapjs 21.28% <ø> (?)
plugins-limitd-client 32.56% <0.00%> (?)
plugins-lodash 22.74% <ø> (?)
plugins-mariadb 39.53% <0.00%> (?)
plugins-memcached 38.20% <0.00%> (?)
plugins-microgateway-core 39.44% <0.00%> (?)
plugins-moleculer 40.85% <0.00%> (?)
plugins-mongodb 39.55% <0.00%> (?)
plugins-mongodb-core 39.12% <0.00%> (?)
plugins-mongoose 40.42% <0.00%> (?)
plugins-multer 23.46% <ø> (?)
plugins-mysql 39.26% <0.00%> (?)
plugins-mysql2 39.30% <0.00%> (?)
plugins-node-serialize 23.73% <ø> (?)
plugins-opensearch 37.87% <0.00%> (?)
plugins-postgres 35.69% <0.00%> (?)
plugins-process 22.88% <ø> (?)
plugins-pug 23.69% <ø> (?)
plugins-redis 38.78% <0.00%> (?)
plugins-router 43.26% <0.00%> (?)
plugins-sequelize 22.27% <ø> (?)
plugins-test-and-upstream-amqp10 38.53% <0.00%> (?)
plugins-test-and-upstream-amqplib 43.92% <0.00%> (?)
plugins-test-and-upstream-apollo 39.32% <50.00%> (?)
plugins-test-and-upstream-avsc 38.82% <0.00%> (?)
plugins-test-and-upstream-bunyan 33.85% <0.00%> (?)
plugins-test-and-upstream-connect 41.05% <0.00%> (?)
plugins-test-and-upstream-graphql 40.24% <0.00%> (?)
plugins-test-and-upstream-koa 40.69% <0.00%> (?)
plugins-test-and-upstream-protobufjs 39.05% <0.00%> (?)
plugins-test-and-upstream-rhea 44.17% <0.00%> (?)
plugins-undici 39.40% <0.00%> (?)
plugins-url 22.88% <ø> (?)
plugins-valkey 38.12% <0.00%> (?)
plugins-vm 22.88% <ø> (?)
plugins-winston 34.35% <0.00%> (?)
plugins-ws 40.77% <0.00%> (?)
profiling-macos 40.06% <0.00%> (-30.69%) ⬇️
profiling-ubuntu 40.11% <0.00%> (-30.64%) ⬇️
profiling-windows 41.47% <0.00%> (-32.76%) ⬇️
serverless-azure-functions-client 22.88% <ø> (?)
serverless-azure-functions-eventhubs 22.88% <ø> (?)
serverless-azure-functions-servicebus 22.88% <ø> (?)

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.

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 bot commented Jan 30, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

tests.debugger.test_debugger_inproduct_enablement.Test_Debugger_InProduct_Enablement_Code_Origin.test_inproduct_enablement_code_origin[express5] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Expected code origin enabled by default
assert False
 +  where False = <tests.debugger.test_debugger_inproduct_enablement.Test_Debugger_InProduct_Enablement_Code_Origin object at 0x7f0b28cf3170>.co_initial_state

self = <tests.debugger.test_debugger_inproduct_enablement.Test_Debugger_InProduct_Enablement_Code_Origin object at 0x7f0b28cf3170>

    def test_inproduct_enablement_code_origin(self):
        self.assert_rc_state_not_error()
        self.assert_all_weblog_responses_ok()
    
...

ℹ️ Info

🧪 All tests passed

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Jan 30, 2026

Benchmarks

Benchmark execution time: 2026-02-01 16:13:09

Comparing candidate commit 5e99b70 in PR branch BridgeAR/2026-01-30-fix-coverage-upload with baseline commit 4a8a494 in branch master.

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

@BridgeAR BridgeAR marked this pull request as ready for review February 1, 2026 01:48
@BridgeAR BridgeAR requested review from a team as code owners February 1, 2026 01:48
@BridgeAR BridgeAR requested review from a team as code owners February 1, 2026 01:48
@BridgeAR BridgeAR requested review from khanayan123 and removed request for a team February 1, 2026 01:48
@BridgeAR BridgeAR changed the title ci: fix coverage report detecting fixture files ci: fix coverage reports and prevent detecting fixture files Feb 1, 2026
Copy link
Copy Markdown
Collaborator

@watson watson left a comment

Choose a reason for hiding this comment

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

LGTM in general, just one small thing which I think is a mistake, and two non-blocking nits.

watson
watson previously approved these changes Feb 1, 2026
watson
watson previously approved these changes Feb 1, 2026
@BridgeAR BridgeAR merged commit 657b4f9 into master Feb 1, 2026
1060 of 1062 checks passed
@BridgeAR BridgeAR deleted the BridgeAR/2026-01-30-fix-coverage-upload branch February 1, 2026 18:37
dd-octo-sts bot pushed a commit that referenced this pull request Feb 2, 2026
Our test optimization product is using fixture files that are automatically picked up by CodeCov. Instead of having to declare our coverage files in all CI scripts, this just renames these fixture files, since they are just imported to read their content.

To prevent future issues, a small lint job is added that prevents names that might be detected as coverage.

The scripts are now way simpler due to the fix and a dynamic config is used for nyc.

While this officially 'decreases' our coverage, the opposite is actually the case.

We now track 9000 more lines and 200 files of which we cover 6000 lines. That is why our overall coverage drops while we actually properly handle the coverage now.

All our CodeCov uploaded files are now correct and none create errors.

This PR makes our coverage way more solid and is a first step towards also tracking the coverage of integration tests.

Coverage is now tracked in individual folders per Node.js version and plugin name. That way CodeCov is merging the coverage instead of nyc and we never replace existing coverage.
@dd-octo-sts dd-octo-sts bot mentioned this pull request Feb 2, 2026
BridgeAR added a commit that referenced this pull request Feb 5, 2026
Our test optimization product is using fixture files that are automatically picked up by CodeCov. Instead of having to declare our coverage files in all CI scripts, this just renames these fixture files, since they are just imported to read their content.

To prevent future issues, a small lint job is added that prevents names that might be detected as coverage.

The scripts are now way simpler due to the fix and a dynamic config is used for nyc.

While this officially 'decreases' our coverage, the opposite is actually the case.

We now track 9000 more lines and 200 files of which we cover 6000 lines. That is why our overall coverage drops while we actually properly handle the coverage now.

All our CodeCov uploaded files are now correct and none create errors.

This PR makes our coverage way more solid and is a first step towards also tracking the coverage of integration tests.

Coverage is now tracked in individual folders per Node.js version and plugin name. That way CodeCov is merging the coverage instead of nyc and we never replace existing coverage.
bm1549 pushed a commit that referenced this pull request Feb 10, 2026
Our test optimization product is using fixture files that are automatically picked up by CodeCov. Instead of having to declare our coverage files in all CI scripts, this just renames these fixture files, since they are just imported to read their content.

To prevent future issues, a small lint job is added that prevents names that might be detected as coverage.

The scripts are now way simpler due to the fix and a dynamic config is used for nyc.

While this officially 'decreases' our coverage, the opposite is actually the case.

We now track 9000 more lines and 200 files of which we cover 6000 lines. That is why our overall coverage drops while we actually properly handle the coverage now.

All our CodeCov uploaded files are now correct and none create errors.

This PR makes our coverage way more solid and is a first step towards also tracking the coverage of integration tests.

Coverage is now tracked in individual folders per Node.js version and plugin name. That way CodeCov is merging the coverage instead of nyc and we never replace existing coverage.
BridgeAR added a commit that referenced this pull request Feb 22, 2026
Our test optimization product is using fixture files that are automatically picked up by CodeCov. Instead of having to declare our coverage files in all CI scripts, this just renames these fixture files, since they are just imported to read their content.

To prevent future issues, a small lint job is added that prevents names that might be detected as coverage.

The scripts are now way simpler due to the fix and a dynamic config is used for nyc.

While this officially 'decreases' our coverage, the opposite is actually the case.

We now track 9000 more lines and 200 files of which we cover 6000 lines. That is why our overall coverage drops while we actually properly handle the coverage now.

All our CodeCov uploaded files are now correct and none create errors.

This PR makes our coverage way more solid and is a first step towards also tracking the coverage of integration tests.

Coverage is now tracked in individual folders per Node.js version and plugin name. That way CodeCov is merging the coverage instead of nyc and we never replace existing coverage.
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