Skip to content

[pull] master from getsentry:master#2013

Merged
pull[bot] merged 11 commits into
KingDEV95:masterfrom
getsentry:master
May 30, 2026
Merged

[pull] master from getsentry:master#2013
pull[bot] merged 11 commits into
KingDEV95:masterfrom
getsentry:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 30, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mrduncan and others added 11 commits May 29, 2026 15:03
Replace the local timer context manager in `sentry.utils.snuba` with
`metrics.timer` from `sentry.utils.metrics` so timing in this file
matches the rest of the codebase. Metric names are preserved as
`snuba.client.<name>`; each timing now also carries the standard
`result=success|failure` tag emitted by `metrics.timer`.
#116514)

Remove deprecated fields from this endpoint from
#115107. This makes publishing
it a little cleaner: #116445.
Frontend already only uses the non-deprecated versions.

Co-authored-by: Claude <noreply@anthropic.com>
Replaces the `owner=1` → 400 stub in
`OrganizationIndexEndpoint._get_from_control` with a real implementation
that queries `OrganizationMemberMapping` for the user's owner-role orgs
and computes `singleOwner` from an aggregated count of active co-owners.
Returns the same `[{organization, singleOwner}]` shape as the cell-side
path, so existing frontend callers (account close + security enrolment)
can migrate to this endpoint without major frontend changes.

Also fixes an N+1 query in the existing cell-side path. The cell version
runs `has_single_owner()` and a full feature-flag evaluation
(`features.batch_has`
+ per-feature `features.has` + onboarding/option queries) per org.
Control issues the same queries regardless of org count and skips
feature evaluation entirely since org features are no longer returned
from control.
Co-Authored-By: untitaker <837573+untitaker@users.noreply.github.com>

Co-authored-by: getsentry-bot <10587625+getsentry-bot@users.noreply.github.com>
Co-authored-by: untitaker <837573+untitaker@users.noreply.github.com>
Endpoint is private with zero external usage and no live frontend or
backend callers — superseded by the events-trace and EAP trace
endpoints. Remove the endpoint, its URL route, and its test class.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
…6523)

Follow-up to #116515. Remove
references to deprecated endpoint.

Co-authored-by: Claude <noreply@anthropic.com>
…low deletion (#116537)

It's broken for project deletion to result in org-scoped workflow
deletion, and for teams with legacy alerting models, this is a real
risk. It's not too troubling if the project was the only user of the
workflow, and arguably expected, but removing org-scoped data when no
longer used anywhere is a choice we haven't yet made, so best to default
to the safest path.

The legacy Rule endpoint still will delete the Workflow associated,
which is troublesome in sharing cases, but will be addressed elsewhere.


This is spun off of #116532.
…ectors (#116532)

For reasons valid and otherwise, it's possible to have multiple legacy
models (Rule, AlertRule) mapped to the same Workflow or Detector.
For read purposes, this can be convenient for preserving the old
interface, but mutations in this case are confusing at best.
Moreover, our deletion code had assumed no sharing, which meant that
deleting a Rule can result in a workflow used by many other projects
being deleted, which is almost certainly not the intended behavior.

To address this, here we:
1. Remove the ability for Rules to delete Workflows. They only delete
their link to them. Rules are vestigial; they should be removable
without impacting Workflows.
2. Serve a 400 when a user attempts to modify a Rule/AlertRule backed by
a shared Workflow or Detector, providing an error that indicates that
the new API should be used. This is less convenient, as some operations
may be totally fine, but allowing changing one Rule to update another
Rule with a different id via shared backend is wrong. At this point
they're all aliases I think (at least, for Rules) but there's no way via
the legacy API to know that. Thus, we ask them to use the new API in
this case.

The second part in particular may prove annoying, but we can fix it by
un-merging (in some cases) or they can use new APIs.
…lows/Detectors (#116532)"

This reverts commit f05b40a.

Co-authored-by: kcons <6990351+kcons@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators May 30, 2026
@pull pull Bot added the ⤵️ pull label May 30, 2026
@pull pull Bot merged commit aa8dbc0 into KingDEV95:master May 30, 2026
@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels May 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants