build
build copied to clipboard
block PR with code coverage below threshold
Currently Covbot reports coverage change in PRs, without failing the job or blocking the PR from merging if the coverage falls below the threshold.
It's time to enforce the blocking feature now to block a PR from merging if any of the files is having a coverage below the threshold. Note that files can be excluded from this rule by having the git-attribute 'coverage-excluded'
Based on the post-submit data from https://testgrid.knative.dev/knative-build#coverage, 80% can be a useful coverage threshold for now.
I'd like to get a confirmation from repo owners before I enforce the blocking rule. If a different coverage threshold is needed, please also let me know.
/area test-and-release
/kind question /kind spec
This is a sub-issue of https://github.com/knative/test-infra/issues/220
Looking at https://testgrid.knative.dev/knative-build#coverage, there are 15 files (colored in red) that has coverage rate below 80%. We probably want to bring up the coverage for those files or exclude those files, before we enforce the threshold.
/assign mattmoor /assign ImJasonH /assign shashwathi
/lgtm /approve
implemented
@steuhs This is not fixed, as the coverage job is not a blocker. I strongly recommend getting explicit agreement about blocking, since -- as you mentioned above -- there are files still below the new 80% threshold.
@ImJasonH @shashwathi @mattmoor The job has been made to fail when the coverage falls below the threshold of 80%. Please make the job required so that PRs with low coverage can be blocked, when you feel comfortable doing so.