Skip to content

Add Datadog code coverage upload#268

Merged
khewonc merged 5 commits into
mainfrom
add-datadog-coverage
Apr 10, 2026
Merged

Add Datadog code coverage upload#268
khewonc merged 5 commits into
mainfrom
add-datadog-coverage

Conversation

@khewonc
Copy link
Copy Markdown
Contributor

@khewonc khewonc commented Mar 18, 2026

Copied from #267

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 validation.yml, running after the existing Codecov upload
  • Added code-coverage.datadog.yml with ignore paths (test/, **/zz_generated.*.go) and 80% patch coverage gate mirroring the Codecov config
  • Coverage format: Go Coverprofile (cover.out) with 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 — requires DD_API_KEY secret to be configured in this repo. Coverage comparison will be possible once the secret is added.

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. Remove codecov.yml
  3. 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.

ManuelPalenzuelaDD and others added 2 commits March 12, 2026 15:08
Add DataDog/coverage-upload-github-action to the build job in
validation.yml, running after the existing Codecov upload step.
Also add code-coverage.datadog.yml with matching ignore paths
and an 80% patch coverage gate mirroring the Codecov config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@khewonc khewonc requested a review from a team as a code owner March 18, 2026 12:02
@khewonc khewonc added tooling Issue linked to the repository tooling qa/skip-qa labels Mar 18, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.96%. Comparing base (37a6ec2) to head (8151a36).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #268   +/-   ##
=======================================
  Coverage   37.96%   37.96%           
=======================================
  Files          65       65           
  Lines        3856     3856           
=======================================
  Hits         1464     1464           
  Misses       2276     2276           
  Partials      116      116           
Flag Coverage Δ
unittests 37.96% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 37a6ec2...8151a36. Read the comment docs.

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

@ManuelPalenzuelaDD ManuelPalenzuelaDD requested a review from a team as a code owner April 7, 2026 15:29
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Apr 7, 2026

✅ Code Coverage

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

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

@khewonc khewonc merged commit b6860a0 into main Apr 10, 2026
35 checks passed
@khewonc khewonc deleted the add-datadog-coverage branch April 10, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa/skip-qa tooling Issue linked to the repository tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants