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(uptime): Make sure we unassign seats when an uptime monitor fails auto onboarding #88866

Merged
merged 2 commits into from
Apr 5, 2025

Conversation

wedamija
Copy link
Member

@wedamija wedamija commented Apr 4, 2025

We assign a seat to uptime monitors when we auto create them. But if they fail the onboarding process, they call an older function that isn't aware of disabling seats.

This pr removes that function and calls our standard deletion function. The logic that the old function implemented only mattered when we used to share UptimeSubscription rows between multiple ProjectUptimeSubscription rows. But now that things are 1-1, we can just call delete directly.

… auto onboarding

We assign a seat to uptime monitors when we auto create them. But if they fail the onboarding process, they call an older function that isn't aware of disabling seats.

This pr removes that function and calls our standard deletion function. The logic that the old function implemented only mattered when we used to share `UptimeSubscription` rows between multiple `ProjectUptimeSubscription` rows. But now that things are 1-1, we can just call delete directly.
@wedamija wedamija requested a review from a team as a code owner April 4, 2025 23:30
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 4, 2025
ProjectUptimeSubscriptionMode.AUTO_DETECTED_ACTIVE,
],
)
delete_project_uptime_subscription(monitored_subscription)
Copy link
Member Author

Choose a reason for hiding this comment

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

Right now, this code is never called because we only ever detect a single url for a project. But this is the correct behaviour if we ever change that.

@wedamija wedamija enabled auto-merge (squash) April 5, 2025 00:08
@wedamija wedamija merged commit 69daf78 into master Apr 5, 2025
48 checks passed
@wedamija wedamija deleted the danf/uptime-fix-unassign-seats branch April 5, 2025 00:17
andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
… auto onboarding (#88866)

We assign a seat to uptime monitors when we auto create them. But if
they fail the onboarding process, they call an older function that isn't
aware of disabling seats.

This pr removes that function and calls our standard deletion function.
The logic that the old function implemented only mattered when we used
to share `UptimeSubscription` rows between multiple
`ProjectUptimeSubscription` rows. But now that things are 1-1, we can
just call delete directly.
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.

2 participants