Skip to content

Add Datadog code coverage upload#339

Merged
xlamorlette-datadog merged 4 commits intomasterfrom
add-datadog-coverage-v2
Mar 27, 2026
Merged

Add Datadog code coverage upload#339
xlamorlette-datadog merged 4 commits intomasterfrom
add-datadog-coverage-v2

Conversation

@ManuelPalenzuelaDD
Copy link
Copy Markdown
Collaborator

What does this PR do?

We're migrating Datadog repos from Codecov to Datadog Code Coverage for tracking test coverage. This PR adds a Datadog coverage upload alongside the existing Codecov upload so we can run both systems in parallel and verify parity before switching over.

Changes

  • Makefile: Added datadog-ci coverage upload after the existing Codecov upload in the coverage target. Uses apk add nodejs npm && npx @datadog/datadog-ci since the CI image is Alpine/musl-based (no glibc binary available).
  • .gitlab/build-and-test-fast.yml: Fetches DD_API_KEY from Vault (kv/k8s/gitlab-runner/nginx-datadog/datadoghq-api-key) and passes it to make coverage.

Why are we doing this?

As part of a company-wide effort, we're consolidating code coverage reporting into Datadog's own Code Coverage product. This gives us:

  • Coverage data integrated directly into Datadog CI Visibility
  • PR gates and coverage checks natively in Datadog
  • No dependency on a third-party service (Codecov) for coverage reporting

Notes

  • The existing Codecov upload is unchanged
  • The Datadog upload uses || true so it cannot fail the build
  • Requires kv/k8s/gitlab-runner/nginx-datadog/datadoghq-api-key in Vault (Paweł is adding this)

No action needed from reviewers beyond normal review

This is a low-risk, additive change.

- Adds datadog-ci coverage upload to Makefile coverage target (via apk+npx,
  required for Alpine/musl-based CI image)
- Fetches DD_API_KEY from Vault in GitLab CI coverage job

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.85%. Comparing base (a24070f) to head (1d97316).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #339   +/-   ##
=======================================
  Coverage   68.85%   68.85%           
=======================================
  Files          56       56           
  Lines        7471     7471           
  Branches     1058     1058           
=======================================
  Hits         5144     5144           
  Misses       1820     1820           
  Partials      507      507           
🚀 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.

xlamorlette-datadog and others added 2 commits March 27, 2026 16:51
Per review feedback: install nodejs/npm in the nginx_musl_toolchain image
instead of at runtime in CI. Simplifies the Makefile coverage target.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ManuelPalenzuelaDD ManuelPalenzuelaDD marked this pull request as ready for review March 27, 2026 16:16
@ManuelPalenzuelaDD ManuelPalenzuelaDD requested a review from a team as a code owner March 27, 2026 16:16
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 bot commented Mar 27, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 67.61%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1d97316 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@xlamorlette-datadog xlamorlette-datadog merged commit f2238ab into master Mar 27, 2026
160 checks passed
@xlamorlette-datadog xlamorlette-datadog deleted the add-datadog-coverage-v2 branch March 27, 2026 20:00
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.

3 participants