sentry icon indicating copy to clipboard operation
sentry copied to clipboard

ref(integration): Introduce MessagingIntegrationSpec

Open RyanSkonnord opened this issue 1 year ago • 2 comments

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.

RyanSkonnord avatar Jul 23 '24 17:07 RyanSkonnord

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.

RyanSkonnord avatar Jul 23 '24 17:07 RyanSkonnord

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.

Files Patch % Lines
src/sentry/integrations/discord/spec.py 88.23% 4 Missing :warning:
src/sentry/integrations/messaging.py 97.18% 0 Missing and 2 partials :warning:
src/sentry/integrations/msteams/spec.py 94.11% 2 Missing :warning:
src/sentry/integrations/slack/spec.py 94.44% 2 Missing :warning:
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

... and 281 files with indirect coverage changes

codecov[bot] avatar Jul 23 '24 18:07 codecov[bot]