Skip to content

Conversation

cathteng
Copy link
Member

@cathteng cathteng commented Oct 2, 2025

This is needed for #100813 because we are now making a RPC call when deleting Sentry apps, and they are not allowed within transactions.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 2, 2025
@cathteng cathteng marked this pull request as ready for review October 3, 2025 17:26
@cathteng cathteng requested review from a team as code owners October 3, 2025 17:26
@cathteng
Copy link
Member Author

cathteng commented Oct 3, 2025

I don't believe we need any UI updates because I immediately mark the deletion as in progress right before scheduling it. From past experience the UI doesn't show Sentry Apps that have this status (+ they're currently not fully deleted because Sentry App inherits from ParanoidModel)

Copy link
Contributor

@Christinarlong Christinarlong left a comment

Choose a reason for hiding this comment

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

makes sense to me, but were you able to test this manually locally?

@cathteng
Copy link
Member Author

cathteng commented Oct 3, 2025

@Christinarlong you tested it locally and it removes the sentry app as expected

Comment on lines +238 to +239
sentry_app.update(status=SentryAppStatus.DELETION_IN_PROGRESS)
scheduled = ScheduledDeletion.schedule(sentry_app, days=0, actor=request.user)
Copy link
Member

Choose a reason for hiding this comment

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

If we find ourselves using this pattern in other contexts, let's consider moving this to a service class that manages sentry app deletions/updates for us. Encoding this behavior in endpoints has bit us in the past when implementations differ by mistake.

@cathteng cathteng merged commit f71bc7d into master Oct 3, 2025
65 checks passed
@cathteng cathteng deleted the cathy/eco/sentry-app-async-deletion branch October 3, 2025 20:40
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