Improve coverage quick wins#3020
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
🎯 Code Coverage (details) 🔗 Commit SHA: f09c127 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 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".
| - "docs/**/*" # documentation and generated docs | ||
| - "config/**/*" # generated/deployment manifests | ||
| - "bundle/**/*" # generated OLM bundle manifests | ||
| - "api/datadoghq/**/*_types.go" # CRD schema type declarations |
There was a problem hiding this comment.
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 👍 / 👎.
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
Describe your test plan
go test ./pkg/controller/utils/comparison ./pkg/cilium/v1 ./cmd/yaml-mapper/utils ./pkg/condition -cover -timeout 90sChecklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel