-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: coverage_drop condition #529
Conversation
THe `coverage_drop` comment condition looks for the project status threshold, but the config might be a simple bool. This causes the notifier to fail with and exception. These changes fix that and add some more testing to cover this case (that should have been added earlier, I know. My bad)
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #529 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 418 418
Lines 34973 34984 +11
=======================================
+ Hits 34093 34104 +11
Misses 880 880
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #529 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 418 418
Lines 34973 34984 +11
=======================================
+ Hits 34093 34104 +11
Misses 880 880
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #529 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 418 418
Lines 34973 34984 +11
=======================================
+ Hits 34093 34104 +11
Misses 880 880
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
=======================================
Coverage 97.50% 97.50%
=======================================
Files 449 449
Lines 35696 35707 +11
=======================================
+ Hits 34806 34817 +11
Misses 890 890
Flags with carried forward coverage won't be shown. Click here to find out more.
This change has been scanned for critical changes. Learn more |
threshold = 0 | ||
if isinstance(project_status_config, dict): | ||
# Project status can also be a bool value, so check is needed | ||
threshold = Decimal(project_status_config.get("threshold", 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean for project to be a bool? If set to True, what value does it use as a threshold?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the project status is a bool it means "I want project status with the default configuration". The default threshold is 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, ty for clarifying
The
coverage_drop
comment condition looks for the project status threshold,but the config might be a simple bool. This causes the notifier to fail with
and exception.
These changes fix that and add some more testing to cover this case (that should
have been added earlier, I know. My bad)
related to: codecov/engineering-team#1966
closes: codecov/engineering-team#2003
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.