Skip to content

chore(alerts): Remove AlertRuleSerializer#116052

Open
ceorourke wants to merge 4 commits into
masterfrom
ceorourke/rm-alert-rule-serializer
Open

chore(alerts): Remove AlertRuleSerializer#116052
ceorourke wants to merge 4 commits into
masterfrom
ceorourke/rm-alert-rule-serializer

Conversation

@ceorourke
Copy link
Copy Markdown
Member

@ceorourke ceorourke commented May 21, 2026

Remove the AlertRuleSerializer and IncidentSerializer (the actual serializer serializers, as opposed to the validator serializers) as they are no longer in use - only places they were "used" is for API responses (they're unpublished) and a debug email view. A follow up will clean up the responses e.g. AlertRuleSerializerResponse as there are many imports and this PR is already large.

@ceorourke ceorourke requested review from a team as code owners May 21, 2026 20:53
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 21, 2026
re_path(
r"^debug/mail/sso-unlinked/no-password/$", DebugSsoUnlinkedNoPasswordEmailView.as_view()
),
re_path(r"^debug/mail/incident-trigger/$", DebugIncidentTriggerEmailView.as_view()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale dropdown option references removed debug email route

Low Severity

The debug mail preview template still has an <option value="mail/incident-trigger">Metric Alert Trigger</option> entry, but the corresponding URL route (debug/mail/incident-trigger/) was removed from debug_urls.py and the view DebugIncidentTriggerEmailView was deleted. Selecting "Metric Alert Trigger" from the dropdown will navigate to a nonexistent URL and result in a 404.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2577ce7. Configure here.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e1f20a2. Configure here.

Comment thread src/sentry/incidents/endpoints/serializers/alert_rule.py
Comment thread tests/sentry/incidents/test_charts.py
@ceorourke
Copy link
Copy Markdown
Member Author

Removing getsentry usage in https://github.com/getsentry/getsentry/pull/20391

@ceorourke ceorourke force-pushed the ceorourke/rm-alert-rule-serializer branch from 26a051e to a8f75d6 Compare May 21, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant