Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Flexible Ratchets - customer request #496

Open
vlad-ko opened this issue Aug 29, 2024 · 1 comment
Open

More Flexible Ratchets - customer request #496

vlad-ko opened this issue Aug 29, 2024 · 1 comment
Labels
Feature Request Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months

Comments

@vlad-ko
Copy link

vlad-ko commented Aug 29, 2024

What product do you want to improve?
Codecov target setting logic for code coverage

Is your feature request related to a problem? Please describe.
Codecov allows users to configure expected coverage for their project using a target specification in codecov.yml – this field takes on either a percentage, or the keyword auto. If a percentage is specified, then the total coverage for the project should not drop below that percentage; if the keyword auto is specified, coverage should never decrease, but no specific threshold of required coverage is enforced.

Most users don’t mess with coverage settings: these are set once, when the project onboards to codecov (often from a template that users don’t normally edit); and are generally not changed after. As such, we’d like to offer teams a broadly applicable configuration that applies to repos in various stages of test maturity and continues to work reasonably well as they grow and mature. Individual orgs within the company may also have specific quality targets/metrics they’re trying to hit, and enforcing consistent coverage config is a tool they would like to use for this.

Describe the solution you'd like
Ideally, we’d have a single target setting that specifies both modes: target: auto,75% would be a setting that: a) if the base coverage was below 75%, requires that each PR increases project coverage; and b) if the base coverage is over 75%, requires that each PR maintain coverage at or above 75%.

Such a setting would be relatively stable over the lifetime of a project; individual orgs could raise or lower the numerical part of the threshold to meet org-level quality goals; the level of testing will tend to move in the right direction when movement is appropriate; and dev velocity is not adversely impacted by coverage checks getting in the way.

Additional context
As coverage measurement is rolled out across the company, we expect projects to be in various stages of test maturity. Some projects are almost entirely untested; others already have >90% test coverage.

For relatively untested projects, setting a numerical coverage target isn’t useful: too high, and we’re blocking useful PRs even if they add unit tests; too low, and they don’t help to raise the bar for quality. We would like to encourage more testing, and would prefer to use auto targets.

For more mature projects, with already-high test coverage, an auto target gets in the way: a useful PR that drops coverage by 1% would be rejected even if we’re already at 90%. The higher the actual coverage, the more work it is to write a new PR. For such projects, we’d prefer a more static target, allowing users to relax their coverage so long as it stays “high enough”. (That last requirement of “high enough” is why the threshold specification isn’t helpful.)

@vlad-ko vlad-ko added Feature Request Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months labels Aug 29, 2024
@rohan-at-sentry
Copy link

Converting to discussion and looking for feedback on whether other uses feel this way and would find this useful

@codecov codecov locked and limited conversation to collaborators Aug 30, 2024
@vlad-ko vlad-ko converted this issue into discussion #498 Aug 30, 2024
@vlad-ko vlad-ko reopened this Sep 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Feature Request Medium Medium Priority Issues (to be fixed or re-evaluated in 3 months
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

2 participants