Skip to content

chore(alerts): Remove incident serializer usages#115845

Merged
ceorourke merged 7 commits into
masterfrom
ceorourke/rm-incident-serializer
May 19, 2026
Merged

chore(alerts): Remove incident serializer usages#115845
ceorourke merged 7 commits into
masterfrom
ceorourke/rm-incident-serializer

Conversation

@ceorourke
Copy link
Copy Markdown
Member

@ceorourke ceorourke commented May 19, 2026

Remove all direct references to the IncidentSerializer and DetailedIncidentSerializer.

This includes removing the OrganizationIncidentDetailsEndpoint PUT method entirely, but it was never published, is not used by the front end, and hasn't received any API requests in at least 30 days.

This also includes removing the metric alert Slack unfurl code, but the URL it checks doesn't match the current metric issues details page so it would only apply to old links being shared.

The serializer cannot fully be removed until we are no longer using the AlertRuleSerializer because when latestIncident is passed to the expand params this serializer is still used.

@ceorourke ceorourke requested review from a team as code owners May 19, 2026 20:51
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 19, 2026
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 1 potential issue.

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 d0942c5. Configure here.

Comment thread tests/sentry/integrations/slack/test_unfurl.py
Comment thread src/sentry/incidents/endpoints/serializers/incident.py
Comment thread src/sentry/integrations/messaging/metrics.py
@ceorourke ceorourke marked this pull request as draft May 19, 2026 21:00
@ceorourke ceorourke changed the title chore(alerts): Remove incident serializer chore(alerts): Remove incident serializer usages May 19, 2026
@ceorourke
Copy link
Copy Markdown
Member Author

Will rebase on top of #115850

@ceorourke ceorourke force-pushed the ceorourke/rm-incident-serializer branch from 7127d2b to 44b39c8 Compare May 19, 2026 22:09
@ceorourke ceorourke marked this pull request as ready for review May 19, 2026 22:15
@ceorourke ceorourke requested a review from a team May 19, 2026 22:29
Copy link
Copy Markdown
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

🔥

@ceorourke ceorourke merged commit 66c8649 into master May 19, 2026
63 checks passed
@ceorourke ceorourke deleted the ceorourke/rm-incident-serializer branch May 19, 2026 22:45
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

🎉

kwargs["incident"] = gop
return args, kwargs

# PUT: update_incident_status operates on the legacy Incident model.
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.

is there anything from this method that should also be cleaned up as part of removing the PUT request?

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.

3 participants