Skip to content

fix: Add ensure assignment when swapping seats from onboarding to auto created #93751

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

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

ajay-sentry
Copy link
Contributor

Currently when an uptime is converted from onboarding to auto created, we aren't actually creating a seat assignment. When we create this seat we should be "ensuring a seat gets assigned," which requires passing in the additional parameter.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@ajay-sentry ajay-sentry requested a review from a team June 17, 2025 20:38
@ajay-sentry ajay-sentry requested a review from a team as a code owner June 17, 2025 20:38
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 17, 2025
@ajay-sentry ajay-sentry merged commit f008b55 into master Jun 17, 2025
65 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/ensure-assignment-seat-add branch June 17, 2025 21:35
@@ -344,7 +344,7 @@ def update_project_uptime_subscription(
case ObjectStatus.DISABLED:
disable_uptime_detector(detector)
case ObjectStatus.ACTIVE:
enable_uptime_detector(detector)
enable_uptime_detector(detector, ensure_assignment=True)
Copy link
Member

Choose a reason for hiding this comment

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

Should we pass ensure_assignment as a parameter to update_project_uptime_subscription, so that we only set it when we're going from onboarding -> active?

Right now, we're going to be forcing assignment whenever we update an uptime monitor at all

ajay-sentry added a commit that referenced this pull request Jun 17, 2025
We don't want to assign seats everytime, namely for the following case:

- Monitor already enabled and has seat assigned
- Status "active" passed in to monitor endpoint
- Endpoint "ensures" seat assignment and creates a new seat

I'm unsure if the assignment logic is smart enough to not create this
new seat, so its probably better to be safe than sorry.

Amends #93751

<!--

  Sentry employees and contractors can delete or ignore the following.

-->

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
…o created (#93751)

Currently when an uptime is converted from onboarding to auto created,
we aren't actually creating a seat assignment. When we create this seat
we should be "ensuring a seat gets assigned," which requires passing in
the additional parameter.


<!--

  Sentry employees and contractors can delete or ignore the following.

-->

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
We don't want to assign seats everytime, namely for the following case:

- Monitor already enabled and has seat assigned
- Status "active" passed in to monitor endpoint
- Endpoint "ensures" seat assignment and creates a new seat

I'm unsure if the assignment logic is smart enough to not create this
new seat, so its probably better to be safe than sorry.

Amends #93751

<!--

  Sentry employees and contractors can delete or ignore the following.

-->

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2025
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.

3 participants