docs/adr/004-migrating-coverage-gating-to-github-actions.md
Jaeger uses Codecov for two functions:
Coverage is collected across 11 CI jobs (unit tests + E2E), uploaded through .github/actions/upload-codecov/action.yml.
Codecov's PR status checks suffer from latency (results lag behind CI completion) and intermittent rate-limit failures that block PRs even when coverage is healthy. The gating logic should run entirely within GitHub Actions for faster, more reliable feedback.
Extend the existing CI Summary Report fan-in workflow to add coverage aggregation and gating alongside the existing metrics comparison. Codecov uploads are retained for long-term historical trending and per-flag breakdown views.
main baseline..codecov.yml (generated files, mocks, integration test infrastructure) so both tools report from a single source of truth.Coverage Gate check-run must always be posted to the PR — even when no coverage data is available — so it can be used as a required status check in branch protection.pull_request, merge_group, and push (to main) events triggered through the CI Orchestrator, as well as via manual workflow_dispatch.main-branch runs, the coverage baseline must be cached for future PR comparisons.Coverage Gate and Metrics Comparison check-runs appear on every PR and merge-queue run.Coverage Gate is added to required status checks.workflow_dispatch allow re-posting checks from any branch.Each CI job uploads its coverage profile as a coverage-<flag> artifact (7-day retention) via .github/actions/upload-codecov/action.yml, alongside the existing Codecov upload.
ci-summary-report.yml)The single summary-report job:
workflow_run event or workflow_dispatch input), validates it succeeded, and extracts PR metadata (number + head SHA) via the GitHub API.gh run download to fetch all artifacts from the source run.coverage-*/*.out profiles with gocovmerge, filters excluded paths, and applies the two coverage gates.Metrics Comparison and Coverage Gate check-runs on the PR. When no coverage data exists, Coverage Gate reports success with a "skipped" note to satisfy branch protection.main — caches the coverage percentage for future PR comparisons.| File | Role |
|---|---|
.github/workflows/ci-summary-report.yml | Fan-in workflow |
.github/actions/upload-codecov/action.yml | Coverage artifact upload |
.github/workflows/ci-orchestrator.yml | Triggers the fan-in |
scripts/e2e/filter_coverage.py | Applies .codecov.yml exclusions |
internal/tools/tools.go | gocovmerge tool dependency |
.codecov.yml | Single source of truth for ignore patterns |
Coverage Gate is always created, even when coverage is skipped.coverage-* artifacts add ~50–100 MB per CI run (7-day retention).github.com/wadey/gocovmerge in internal/tools/go.mod.