Skip to content

chore: wait for both coverage uploads before posting a Codecov status - #99

Merged
jravani merged 1 commit into
mainfrom
chore/codecov-wait-for-both-uploads
Jul 23, 2026
Merged

chore: wait for both coverage uploads before posting a Codecov status#99
jravani merged 1 commit into
mainfrom
chore/codecov-wait-for-both-uploads

Conversation

@jravani

@jravani jravani commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

Observed on #98: PRs briefly show a failing `codecov/patch` check that flips to passing a couple minutes later. Root cause: `go.yml` uploads coverage twice per commit under separate flags (`unit`, `integration`), and without `after_n_builds` configured, Codecov posts a status as soon as either upload lands. The `unit` job finishes first and barely touches DB-dependent code (most of `internal/db`/`internal/importer`/`internal/process` is only exercised by `-tags integration` tests), so its partial view of the diff often reads as a coverage drop until the `integration` job's upload arrives and the combined report is complete.

Adds a minimal `codecov.yml` with `notify.after_n_builds: 2` so Codecov waits for both uploads before posting a final status — no more transient false-fail.

Test plan

  • `python3 -c "import yaml; yaml.safe_load(...)"` — valid YAML, correct `codecov:` structure
  • Confirm on this PR's own CI run that only one (correct, final) `codecov/patch` status appears instead of a fail-then-pass flap

go.yml uploads coverage twice per commit under separate flags (unit,
integration). Without after_n_builds, Codecov posts a status as soon
as either upload lands - the unit job usually finishes first and
barely touches DB-dependent code, so PRs touching internal/db or
internal/importer briefly showed a failing patch-coverage check that
flipped to passing a couple minutes later once the integration job's
upload arrived (observed on #98).
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jravani
jravani merged commit 63b5f0f into main Jul 23, 2026
5 checks passed
@jravani
jravani deleted the chore/codecov-wait-for-both-uploads branch July 23, 2026 23:04
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.

1 participant