Repository navigation
Description
Problem to solve
Today, you can can configure the pr comment to only show when any changes occur (https://docs.codecov.com/docs/common-recipe-list#only-comment-on-coverage-changes), both negative or positive. However, there are some customer requests for the ability to see Codecov reports only when there's a decrease in coverage or negative changes. This contrasts to another common preferences to confirm / see the ✅ - consideration here is if there was a config to remove only for negative reporting, that it's opt-in and showing is default.
As related to bundle:
It would also be nice to set a threshold change to not trigger a comment. We use Vite for our builds and it seems there is often a 10-35kB variation between builds even without any substantive changes to the code or dependencies. Being able to only have the comment appear when the change matters would help to avoid people from learning to ignore it when it shows up every time.
Proposed Solutions
Areas to explore:
- YAML configuration update: introduce YAML options to display reports exclusively on coverage reduction.
- not a default setting, but opt-in configuration
- Leverage existing configurations: explore combining current YAML settings like threshold with a hypothetical require_changes: true to meet this need.
- How this could work too on bundle analysis
- Common issue is around email updating, are there any ways we can make the update less noisy?
- Considerations around re-run scenarios
- Do you still show a PR comment if coverage/bundle size had dropped on one commit and increased in a subsequent commit on the same PR
- Opposite scenario : do you show a PR comment if coverage/bundle size had not dropped on one commit and dropped in a subsequent commit on the same PR
- For bundle: only show is X threshold is changed
### Tasks
- [ ] https://github.com/codecov/engineering-team/issues/1966
- [ ] https://github.com/codecov/engineering-team/issues/2018
- [ ] https://github.com/codecov/engineering-team/issues/2003
- [ ] https://github.com/codecov/engineering-team/issues/2021
- [ ] https://github.com/codecov/engineering-team/issues/2023
- [x] Adjust documentation to address new options
Activity
dabrahams commentedon Mar 7, 2024
I don't mind seeing an increase in the coverage in the PR itself; in fact I think it's a nice affirmation. But I really don't want to get an email unless something has changed for the worse.
rohan-at-sentry commentedon Apr 3, 2024
philosophically related - #1485
[-]Only show comment when coverage is reduced[/-][+]Only show comment when coverage/bundle is reduced/increased (configurable)[/+][-]Only show comment when coverage/bundle is reduced/increased (configurable)[/-][+]Only show comment when coverage/bundle is negatively changed (configurable)[/+]rohan-at-sentry commentedon Apr 19, 2024
Related - codecov/feedback#340
giovanni-guidini commentedon May 16, 2024
UPDATE
I'm still working on this, but wanted to give a small update here.
There are other details (and more avenues of exploration we might consider) in this investigation: https://l.codecov.dev/1DKPDc (codecov-only)
The final thing I'd like to say is that customers can very easily create a filter in the email client that will silence the emails from Codecov. This might still be useful in the future if you find the emails annoying but doesn't have the "power" in your team to disable them completely.
I did a filter like in the image below. It auto-deletes emails from the Codecov comment if the patch is 100% covered. Otherwise I still see the email.
giovanni-guidini commentedon Jul 5, 2024
New configuration options have been released for both coverage and bundle analysis [beta] comments.
Check the updated documentation here: