codecov / worker

Code for Background Workers of Codecov
Other
50 stars 10 forks source link

Fix notifications with an empty HEAD report #816

Closed Swatinem closed 4 days ago

Swatinem commented 4 days ago

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.


Fixes WORKER-P6A

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.01%. Comparing base (02c2e2b) to head (48ae32b). Report is 3 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/codecov/worker/pull/816/graphs/tree.svg?width=650&height=150&src=pr&token=BWTOrjBaE5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov)](https://app.codecov.io/gh/codecov/worker/pull/816?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) ```diff @@ Coverage Diff @@ ## main #816 +/- ## ======================================= Coverage 98.01% 98.01% ======================================= Files 446 446 Lines 36619 36649 +30 ======================================= + Hits 35892 35923 +31 + Misses 727 726 -1 ``` | [Flag](https://app.codecov.io/gh/codecov/worker/pull/816/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/codecov/worker/pull/816/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `98.01% <100.00%> (+<0.01%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/codecov/worker/pull/816/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `98.01% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/codecov/worker/pull/816/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | Coverage Δ | | |---|---|---| | [NonTestCode](https://app.codecov.io/gh/codecov/worker/pull/816/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `95.90% <100.00%> (+<0.01%)` | :arrow_up: | | [OutsideTasks](https://app.codecov.io/gh/codecov/worker/pull/816/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `98.00% <100.00%> (+<0.01%)` | :arrow_up: | | [Files with missing lines](https://app.codecov.io/gh/codecov/worker/pull/816?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | Coverage Δ | | |---|---|---| | [...rvices/notification/notifiers/codecov\_slack\_app.py](https://app.codecov.io/gh/codecov/worker/pull/816?src=pr&el=tree&filepath=services%2Fnotification%2Fnotifiers%2Fcodecov_slack_app.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#diff-c2VydmljZXMvbm90aWZpY2F0aW9uL25vdGlmaWVycy9jb2RlY292X3NsYWNrX2FwcC5weQ==) | `100.00% <100.00%> (ø)` | | | [services/notification/notifiers/mixins/status.py](https://app.codecov.io/gh/codecov/worker/pull/816?src=pr&el=tree&filepath=services%2Fnotification%2Fnotifiers%2Fmixins%2Fstatus.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#diff-c2VydmljZXMvbm90aWZpY2F0aW9uL25vdGlmaWVycy9taXhpbnMvc3RhdHVzLnB5) | `98.17% <100.00%> (-0.02%)` | :arrow_down: | | [tasks/notify.py](https://app.codecov.io/gh/codecov/worker/pull/816?src=pr&el=tree&filepath=tasks%2Fnotify.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#diff-dGFza3Mvbm90aWZ5LnB5) | `95.92% <100.00%> (ø)` | | | [tasks/tests/integration/test\_notify\_task.py](https://app.codecov.io/gh/codecov/worker/pull/816?src=pr&el=tree&filepath=tasks%2Ftests%2Fintegration%2Ftest_notify_task.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#diff-dGFza3MvdGVzdHMvaW50ZWdyYXRpb24vdGVzdF9ub3RpZnlfdGFzay5weQ==) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/codecov/worker/pull/816/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov)
codecov-staging[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:white_check_mark: All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #816   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         446      446           
  Lines       36619    36649   +30     
=======================================
+ Hits        35892    35923   +31     
+ Misses        727      726    -1     
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) :arrow_up:
unit 98.01% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) :arrow_up:
OutsideTasks 98.00% <100.00%> (+<0.01%) :arrow_up:
Files with missing lines Coverage Δ
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
services/notification/notifiers/mixins/status.py 98.17% <100.00%> (-0.02%) :arrow_down:
tasks/notify.py 95.92% <100.00%> (ø)
tasks/tests/integration/test_notify_task.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

codecov-qa[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.01%. Comparing base (02c2e2b) to head (48ae32b). Report is 3 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #816   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         446      446           
  Lines       36619    36649   +30     
=======================================
+ Hits        35892    35923   +31     
+ Misses        727      726    -1     
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) :arrow_up:
unit 98.01% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) :arrow_up:
OutsideTasks 98.00% <100.00%> (+<0.01%) :arrow_up:
Files with missing lines Coverage Δ
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
services/notification/notifiers/mixins/status.py 98.17% <100.00%> (-0.02%) :arrow_down:
tasks/notify.py 95.92% <100.00%> (ø)
tasks/tests/integration/test_notify_task.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

codecov-public-qa[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.01%. Comparing base (02c2e2b) to head (48ae32b).

:white_check_mark: All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #816   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         446      446           
  Lines       36619    36649   +30     
=======================================
+ Hits        35892    35923   +31     
+ Misses        727      726    -1     
Flag Coverage Δ
integration 98.01% <100.00%> (+<0.01%) :arrow_up:
unit 98.01% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) :arrow_up:
OutsideTasks 98.00% <100.00%> (+<0.01%) :arrow_up:
Files Coverage Δ
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
services/notification/notifiers/mixins/status.py 98.17% <100.00%> (-0.02%) :arrow_down:
tasks/notify.py 95.92% <100.00%> (ø)
tasks/tests/integration/test_notify_task.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes