Skip to content

Add Datadog code coverage upload#2750

Closed
ManuelPalenzuelaDD wants to merge 2 commits into
DataDog:mainfrom
ManuelPalenzuelaDD:add-datadog-coverage
Closed

Add Datadog code coverage upload#2750
ManuelPalenzuelaDD wants to merge 2 commits into
DataDog:mainfrom
ManuelPalenzuelaDD:add-datadog-coverage

Conversation

@ManuelPalenzuelaDD

@ManuelPalenzuelaDD ManuelPalenzuelaDD commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

We're migrating Datadog repositories from Codecov to Datadog Code Coverage for tracking test coverage. This PR is the first step: it 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

  • Added DataDog/coverage-upload-github-action@v1 step to the build job in main.yml, running after the existing Codecov upload
  • Uploads both cover.out and cover_integration.out with the unittests flag (mirroring Codecov)
  • The existing Codecov uploads are unchanged — nothing is removed or modified
  • The upload uses if: always() and continue-on-error: true so it cannot block CI

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

Validation

Pending — the Datadog upload requires DD_API_KEY which is not available to fork PRs. Coverage comparison will be possible after merge or when CI runs from the base repo.

Next steps (not in this PR)

Once this PR is merged and we've confirmed Datadog coverage is stable over several commits:

  1. Remove the Codecov upload steps and CODECOV_TOKEN secret
  2. Optionally configure PR gates in code-coverage.datadog.yml

No action needed from reviewers beyond normal review

This is a low-risk, additive change. The new upload step runs independently of the existing CI pipeline and cannot cause test failures.

Side-by-side coverage reporting: adds Datadog coverage upload alongside
existing Codecov upload using DataDog/coverage-upload-github-action.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Pin DataDog/coverage-upload-github-action@v1 to commit SHA
d2cf302a39c05e0ad22063360a2bf6ce0cc4906c for supply chain security.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@codecov-commenter

codecov-commenter commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.42%. Comparing base (4239d45) to head (4d332e0).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2750      +/-   ##
==========================================
- Coverage   38.80%   38.42%   -0.38%     
==========================================
  Files         309      309              
  Lines       26750    27307     +557     
==========================================
+ Hits        10379    10494     +115     
- Misses      15592    16035     +443     
+ Partials      779      778       -1     
Flag Coverage Δ
unittests 38.42% <ø> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4239d45...4d332e0. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khewonc

khewonc commented Mar 18, 2026

Copy link
Copy Markdown
Collaborator

Closing in favor of #2773

@khewonc khewonc closed this Mar 18, 2026
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