Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deletions) Improve AlertRule deletions #28999

Merged
merged 1 commit into from
Sep 30, 2021
Merged

fix(deletions) Improve AlertRule deletions #28999

merged 1 commit into from
Sep 30, 2021

Conversation

markstory
Copy link
Member

While the previous fix solved for active alert rules I didn't notice that the default object manager for AlertRules excludes snapshot status records. These records are causing deletions to fail now as they hold references to Environment via SnubaQuery. When Django cascades deletes for Environment records it ends up in the post_delete signal and fails.

Fixes SENTRY-SAB

While the previous fix solved for active alert rules I didn't notice
that the default object manager for AlertRules excludes snapshot
status records. These records are causing deletions to fail now as they
hold references to Environment via SnubaQuery. When Django cascades
deletes for Environment records it ends up in the post_delete signal and
fails.

Fixes SENTRY-SAB
@markstory markstory requested a review from a team September 30, 2021 18:20
@markstory markstory merged commit a90c930 into master Sep 30, 2021
@markstory markstory deleted the fix-sab-v2 branch September 30, 2021 20:15
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants