Skip to content

chore(ACI): Delete broken sentry app actions#107383

Closed
ceorourke wants to merge 1 commit intomasterfrom
ceorourke/delete-broken-sentry-app-actions
Closed

chore(ACI): Delete broken sentry app actions#107383
ceorourke wants to merge 1 commit intomasterfrom
ceorourke/delete-broken-sentry-app-actions

Conversation

@ceorourke
Copy link
Copy Markdown
Member

After running the migration from #107208 we still had ~1300 unmigrated Action instances 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.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 31, 2026

for action in RangeQuerySetWrapper(
Action.objects.filter(
type="sentry_app", config__sentry_app_identifier="sentry_app_installation_uuid"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

type="sentry_app", config__sentry_app_identifier="sentry_app_installation_uuid"
)
):
action.delete()
Copy link
Copy Markdown
Member Author

@ceorourke ceorourke Jan 31, 2026

Choose a reason for hiding this comment

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

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".

@github-actions
Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/workflow_engine/migrations/0107_delete_broken_sentry_app_actions.py

for 0107_delete_broken_sentry_app_actions in workflow_engine

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

@ceorourke
Copy link
Copy Markdown
Member Author

Closed in favor of #107532

@ceorourke ceorourke closed this Feb 6, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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