fix(ci): wait for all 6 test shards before Codecov posts a patch status#6386
Merged
Conversation
Each of the 6 backend test shards (validate-tests matrix in ci.yml) uploads its own lcov.info to Codecov directly (flags: shard-N) -- additive by design, but with no after_n_builds setting Codecov re-evaluates and re-posts codecov/patch after EVERY individual upload instead of waiting for all six. That produced a wildly wrong intermediate verdict (patch coverage as low as ~20%) after only 1-2 shards had landed on PR #6321, before self-correcting once the rest arrived -- require_ci_to_pass only checks the upstream GH Actions run's own conclusion, not upload completeness. Sets codecov.notify.after_n_builds: 6 so Codecov withholds any status until all six coverage uploads for a commit are in. Validated the resulting config against Codecov's public validator (codecov.io/validate).
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validate-testsmatrix,ci.yml) uploads its ownlcov.infodirectly to Codecov (flags: shard-N) — additive by design, but with noafter_n_buildssetting Codecov re-evaluates and re-postscodecov/patchafter every individual upload, not just the last one.codecov/patchpostedFAILURE(~22% patch coverage) after only 2 of 6 shards had landed, before the remaining shards arrived.require_ci_to_passdoesn't prevent this — it only checks the upstream GH Actions run's own conclusion, not upload completeness.codecov.notify.after_n_builds: 6so Codecov withholds any status until all six coverage uploads for a commit are in.Validation
codecov.ymlagainst Codecov's own public config validator (curl --data-binary @codecov.yml https://codecov.io/validate) —Valid!,after_n_builds: 6parses undercodecov.notifyas expected (first attempt placed it directly undercoverage:, which the validator correctly rejected as an unknown field).src/diff.Safety
site/,CNAME,lovable/CHANGELOG.mdedit