-
Notifications
You must be signed in to change notification settings - Fork 10
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 notifications with an empty HEAD report #816
Conversation
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 #816 +/- ##
=======================================
Coverage 98.01% 98.01%
=======================================
Files 446 446
Lines 36619 36649 +30
=======================================
+ Hits 35892 35923 +31
+ Misses 727 726 -1
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 #816 +/- ##
=======================================
Coverage 98.01% 98.01%
=======================================
Files 446 446
Lines 36619 36649 +30
=======================================
+ Hits 35892 35923 +31
+ Misses 727 726 -1
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 #816 +/- ##
=======================================
Coverage 98.01% 98.01%
=======================================
Files 446 446
Lines 36619 36649 +30
=======================================
+ Hits 35892 35923 +31
+ Misses 727 726 -1
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 #816 +/- ##
=======================================
Coverage 98.01% 98.01%
=======================================
Files 446 446
Lines 36619 36649 +30
=======================================
+ Hits 35892 35923 +31
+ Misses 727 726 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c68f8fc
to
d1d8d3a
Compare
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.
lgtm, but you may want a platform review as well - your call 🙂
There were a couple of errors spread around the notification code assuming that a `head.report` always exists, which is not necessarily the case. In particular that would be the case when using `empty-upload` or `manual_trigger`.
d1d8d3a
to
48ae32b
Compare
@@ -84,6 +84,7 @@ def build_payload(self, comparison: ComparisonProxy) -> dict: | |||
message = "unknown" | |||
notation = "" | |||
comparison_url = None | |||
head_report = comparison.head.report |
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.
Is comparison.head
typed as a FullCommit
in the code? Maybe it would be a good idea to update the type to account for that. I've seen examples where the commit
might also be None
and have a half-done PR to update it
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.
I’m unsure about that one. I had the problem that comparison
might be wrongly typed, as some tests were failing because it was actually a FilteredComparison
, though I’m not sure if that only happened because of tests, or if that can also happen in real world code. In other parts of the notification infra, I have updated the types to take that into account.
There were a couple of errors spread around the notification code assuming that a
head.report
always exists, which is not necessarily the case.In particular that would be the case when using
empty-upload
ormanual_trigger
.Fixes WORKER-P6A