chore: codecov reports to match go coverage reports #8696
Merged
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.
Description
Currently, Codecov coverage reports do not precisely match the coverage reports generated by Go Codecov coverage tends to be lower than Go coverage output due to Codecov's defaults to ignore LOC that are not directly within the body of a function as well as marking certain LOC as partially covered or uncovered for branches that evaluate to
false
.This PR overwrites those defaults to bring Codecov reports inline with Go coverage reports by
partial
tohit
(so that Codecov coverage percentages are calculated to mark the code in such lines as "covered")This PR also lowers the per-PR coverage target by 5% for Go code in the event that backend coverage status checks are required to pass before merging into main (to avoid too many blockers for PRs opened before this one).
Test Plan
NOTE: The test plan can be used on this commit.
test-go
status check.go-coverage
(CI run needs to be a success for all jobs in this workflow)go-coverage
job, select "Artifacts" -> "go-coverage/master-coverage.html"master/internal/api_experiments.go
, for example, is a good file to choose).codecov/patch/backend
status check to go to the Codecov UI.go-coverage
artifacts, navigate to the "File explorer" tab and then navigate into the same file that you observed metrics for above.Checklist
docs/release-notes/
.See Release Note for details.