chore(ACI): Delete broken sentry app actions#107383
Closed
Conversation
ceorourke
commented
Jan 31, 2026
|
|
||
| for action in RangeQuerySetWrapper( | ||
| Action.objects.filter( | ||
| type="sentry_app", config__sentry_app_identifier="sentry_app_installation_uuid" |
Member
Author
There was a problem hiding this comment.
We do not create Actions with a sentry_app_identifier of sentry_app_installation_uuid anymore - these rows are from older rules that were migrated.
ceorourke
commented
Jan 31, 2026
| type="sentry_app", config__sentry_app_identifier="sentry_app_installation_uuid" | ||
| ) | ||
| ): | ||
| action.delete() |
Member
Author
There was a problem hiding this comment.
I saw some other deletion migrations that use bulk_delete_objects but given we're only deleting 1295 rows it didn't seem like it constituted "bulk".
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL |
Member
Author
|
Closed in favor of #107532 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
After running the migration from #107208 we still had ~1300 unmigrated
Actioninstances that hit an edge case we'd discussed previously.There is a full writeup and investigation in https://www.notion.so/sentry/Invalid-Sentry-App-Actions-2f88b10e4b5d8046ac20faae3cfeb7c5 but the short version is that these actions relate to sentry apps that were either uninstalled or deleted and users cannot see them on their alerts, so it makes the most sense to simply delete these rows.
Draft for now so I can go over the linked doc with my team on Monday and make sure we're all on board.