Skip to content
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

Add tracing and improve typing of NotificationService #770

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Oct 8, 2024

Adds tracing to the various notify implementations, and improves their typing. In particular, it fixes mismatches between the base and derived classes, and fixes up type annotations to match their usage.

@Swatinem Swatinem requested a review from a team October 8, 2024 12:27
@Swatinem Swatinem self-assigned this Oct 8, 2024
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (e1ed10a) to head (c46c41c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #770   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         438      438           
  Lines       36451    36460    +9     
=======================================
+ Hits        35733    35742    +9     
  Misses        718      718           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.00% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
helpers/notifier.py 98.18% <100.00%> (ø)
services/comparison/changes.py 100.00% <100.00%> (ø)
services/notification/__init__.py 100.00% <100.00%> (ø)
services/notification/notifiers/base.py 92.59% <100.00%> (ø)
services/notification/notifiers/checks/base.py 97.54% <100.00%> (+0.03%) ⬆️
services/notification/notifiers/checks/changes.py 100.00% <100.00%> (ø)
...ification/notifiers/checks/checks_with_fallback.py 87.80% <100.00%> (+0.30%) ⬆️
services/notification/notifiers/checks/patch.py 100.00% <100.00%> (ø)
services/notification/notifiers/checks/project.py 100.00% <100.00%> (ø)
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
... and 13 more

@codecov-staging
Copy link

codecov-staging bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #770   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         438      438           
  Lines       36451    36460    +9     
=======================================
+ Hits        35733    35742    +9     
  Misses        718      718           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.00% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
helpers/notifier.py 98.18% <100.00%> (ø)
services/comparison/changes.py 100.00% <100.00%> (ø)
services/notification/__init__.py 100.00% <100.00%> (ø)
services/notification/notifiers/base.py 92.59% <100.00%> (ø)
services/notification/notifiers/checks/base.py 97.54% <100.00%> (+0.03%) ⬆️
services/notification/notifiers/checks/changes.py 100.00% <100.00%> (ø)
...ification/notifiers/checks/checks_with_fallback.py 87.80% <100.00%> (+0.30%) ⬆️
services/notification/notifiers/checks/patch.py 100.00% <100.00%> (ø)
services/notification/notifiers/checks/project.py 100.00% <100.00%> (ø)
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
... and 13 more

@codecov-qa
Copy link

codecov-qa bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (e1ed10a) to head (c46c41c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #770   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         438      438           
  Lines       36451    36460    +9     
=======================================
+ Hits        35733    35742    +9     
  Misses        718      718           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.00% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
helpers/notifier.py 98.18% <100.00%> (ø)
services/comparison/changes.py 100.00% <100.00%> (ø)
services/notification/__init__.py 100.00% <100.00%> (ø)
services/notification/notifiers/base.py 92.59% <100.00%> (ø)
services/notification/notifiers/checks/base.py 97.54% <100.00%> (+0.03%) ⬆️
services/notification/notifiers/checks/changes.py 100.00% <100.00%> (ø)
...ification/notifiers/checks/checks_with_fallback.py 87.80% <100.00%> (+0.30%) ⬆️
services/notification/notifiers/checks/patch.py 100.00% <100.00%> (ø)
services/notification/notifiers/checks/project.py 100.00% <100.00%> (ø)
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
... and 13 more

Copy link

codecov-public-qa bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (e1ed10a) to head (c46c41c).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #770   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         438      438           
  Lines       36451    36460    +9     
=======================================
+ Hits        35733    35742    +9     
  Misses        718      718           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.90% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.00% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
helpers/notifier.py 98.18% <100.00%> (ø)
services/comparison/changes.py 100.00% <100.00%> (ø)
services/notification/__init__.py 100.00% <100.00%> (ø)
services/notification/notifiers/base.py 92.59% <100.00%> (ø)
services/notification/notifiers/checks/base.py 97.54% <100.00%> (+0.03%) ⬆️
services/notification/notifiers/checks/changes.py 100.00% <100.00%> (ø)
...ification/notifiers/checks/checks_with_fallback.py 87.80% <100.00%> (+0.30%) ⬆️
services/notification/notifiers/checks/patch.py 100.00% <100.00%> (ø)
services/notification/notifiers/checks/project.py 100.00% <100.00%> (ø)
...rvices/notification/notifiers/codecov_slack_app.py 100.00% <100.00%> (ø)
... and 13 more

Adds tracing to the various `notify` implementations, and improves their typing.
In particular, it fixes mismatches between the base and derived classes, and fixes up type annotations to match their usage.
@Swatinem Swatinem force-pushed the swatinem/trace-type-notifiers branch from d83aff2 to 37e2323 Compare October 8, 2024 13:30
@Swatinem Swatinem added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit cbdd097 Oct 8, 2024
25 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/trace-type-notifiers branch October 8, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants