ref(integration): Introduce MessagingIntegrationSpec
Begin unifying the three messaging-related integrations (Slack, MS Teams, and Discord) with an abstract base class. The base class is a prototype that extracts duplicated code in the short term, and in the long term may serve as a comprehensive "feature inventory" of all Sentry's features related to messaging integrations.
Previously spiked on and discussed at https://github.com/getsentry/sentry/pull/74070
My goal with this PR is to get a minimal but stable version of the "spec" class into master, for us to build off of.
One major order of business: are we happy with MessagingIntegrationSpec and all other naming choices? I struggled a bit to come up with a metaphor for this new base class; "spec" reflects its purpose as a "feature inventory" and as a framework for scoping unimplemented features, but ideally it would also hold as much of the business logic as we can put there.
Codecov Report
Attention: Patch coverage is 94.65241% with 10 lines in your changes missing coverage. Please review.
Project coverage is 78.27%. Comparing base (
668079e) to head (e7beb0e). Report is 86 commits behind head on master.
:white_check_mark: All tests successful. No failed tests found.
Additional details and impacted files
@@ Coverage Diff @@
## master #74743 +/- ##
==========================================
+ Coverage 78.24% 78.27% +0.02%
==========================================
Files 6819 6818 -1
Lines 303711 303658 -53
Branches 52239 52231 -8
==========================================
+ Hits 237651 237685 +34
+ Misses 59669 59584 -85
+ Partials 6391 6389 -2
| Files | Coverage Δ | |
|---|---|---|
| src/sentry/incidents/action_handlers.py | 89.38% <ø> (+1.34%) |
:arrow_up: |
| src/sentry/integrations/discord/__init__.py | 100.00% <100.00%> (ø) |
|
| src/sentry/integrations/discord/analytics.py | 100.00% <ø> (ø) |
|
| src/sentry/integrations/discord/urls.py | 100.00% <100.00%> (ø) |
|
| src/sentry/integrations/msteams/__init__.py | 100.00% <100.00%> (ø) |
|
| src/sentry/integrations/msteams/urls.py | 100.00% <100.00%> (ø) |
|
| src/sentry/integrations/slack/__init__.py | 100.00% <100.00%> (ø) |
|
| src/sentry/integrations/slack/analytics.py | 100.00% <ø> (ø) |
|
| src/sentry/integrations/slack/urls.py | 100.00% <100.00%> (ø) |
|
| src/sentry/integrations/messaging.py | 97.18% <97.18%> (ø) |
|
| ... and 3 more |