ref(webhooks): remove legacy sentry_webhooks plugin#118077
Draft
Christinarlong wants to merge 3 commits into
Draft
ref(webhooks): remove legacy sentry_webhooks plugin#118077Christinarlong wants to merge 3 commits into
Christinarlong wants to merge 3 commits into
Conversation
The old `sentry_webhooks` plugin has been fully replaced by the `legacy_webhook` SentryApp service. This removes the dead plugin code and adds a lightweight stub in `get_notification_plugins_for_org()` so ACI discovery still finds "webhooks" via ProjectOption. - Delete `src/sentry/plugins/sentry_webhooks/` and its tests - Remove from INSTALLED_APPS, HIDDEN_PLUGINS, and mypy exclusions - Remove skip_webhooks feature flag logic from notify_event.py - Update test fixtures to use direct ProjectOption calls
Move webhook discovery out of get_notification_plugins_for_org() into a standalone get_legacy_webhook_service() function that checks ProjectOption directly. Both ACI call sites now add the webhook service independently of the plugin loop, making it easier to remove plugin discovery entirely in the future.
Add project__status=ObjectStatus.ACTIVE to the ProjectOption query so soft-deleted projects with stale webhooks:enabled options don't cause the webhook service to appear in ACI discovery.
Contributor
Backend Test FailuresFailures on
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sentry_webhooksplugin (src/sentry/plugins/sentry_webhooks/), which has been fully replaced by thelegacy_webhookSentryApp service_LegacyWebhookStubinget_notification_plugins_for_org()so ACI discovery still finds "webhooks" viaProjectOptioninstead of the old plugin registrationskip_webhooksfeature flag logic fromnotify_event.py(flag was already removed)ProjectOptioncalls instead ofWebHooksPluginTest plan
pytest tests/sentry/rules/actions/test_notify_event.pypassespytest tests/sentry/rules/actions/test_notify_event_service.pypassespytest tests/sentry/workflow_engine/endpoints/test_organization_available_action_index.pypassespytest tests/sentry/workflow_engine/endpoints/validators/actions/test_webhook.pypassesprek run -qpasses