Skip to content

Improve coverage quick wins#3020

Open
tbavelier wants to merge 3 commits into
mainfrom
tbavelier/improve-coverage-quick-wins
Open

Improve coverage quick wins#3020
tbavelier wants to merge 3 commits into
mainfrom
tbavelier/improve-coverage-quick-wins

Conversation

@tbavelier
Copy link
Copy Markdown
Member

What does this PR do?

Adds focused unit tests for low-risk helper packages and excludes non-product/generated paths from uploaded coverage.

Motivation

Improve useful coverage while avoiding noise from CRD schema files, generated manifests, docs, examples, and release tooling.

Additional Notes

No production code changes.

Minimum Agent Versions

  • Agent: N/A
  • Cluster Agent: N/A

Describe your test plan

go test ./pkg/controller/utils/comparison ./pkg/cilium/v1 ./cmd/yaml-mapper/utils ./pkg/condition -cover -timeout 90s

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@tbavelier tbavelier added qa/skip-qa dependencies Pull requests that update a dependency file labels May 15, 2026 — with ChatGPT Codex Connector
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.72%. Comparing base (20ecb9e) to head (f09c127).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3020      +/-   ##
==========================================
+ Coverage   41.50%   47.72%   +6.22%     
==========================================
  Files         335      331       -4     
  Lines       28714    28322     -392     
==========================================
+ Hits        11919    13518    +1599     
+ Misses      16001    13976    -2025     
- Partials      794      828      +34     
Flag Coverage Δ
unittests 47.72% <ø> (+6.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 25 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 20ecb9e...f09c127. Read the comment docs.

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

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

datadog-datadog-prod-us1 Bot commented May 15, 2026

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 48.29% (+6.47%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f09c127 | Docs | Datadog PR Page | Give us feedback!

@tbavelier tbavelier marked this pull request as ready for review May 15, 2026 13:46
@tbavelier tbavelier requested a review from a team May 15, 2026 13:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f09c127386

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/codecov.yml
- "docs/**/*" # documentation and generated docs
- "config/**/*" # generated/deployment manifests
- "bundle/**/*" # generated OLM bundle manifests
- "api/datadoghq/**/*_types.go" # CRD schema type declarations
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Narrow the API types ignore

When hand-written helpers live in API type files, this new ignore removes real product logic from the coverage gates, not just schema declarations. For example, api/datadoghq/v1alpha1/datadogslo_types.go contains the executable DatadogSLOType.IsValid() helper, and the same broad api/datadoghq/**/*_types.go pattern was also added to the Datadog coverage config, so changes in these helpers can be reported as fully covered/ignored by both systems. Consider excluding only generated schema files or moving such helpers out of ignored files.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file qa/skip-qa team/container-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants