Skip to content

ref(releases): Remove release threshold status endpoint and model - #131982

Open
sentry-junior[bot] wants to merge 8 commits into
masterfrom
athenamoghaddam/iswf-3793-delete-unused-release-threshold
Open

sentry-junior[bot] wants to merge 8 commits into
masterfrom
athenamoghaddam/iswf-3793-delete-unused-release-threshold

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #132067. Hold this PR until @sentry/api is ready for a major release.

#132067 removes the experimental release threshold endpoints and deprecates the status endpoint. This PR removes the rest:

  • ReleaseThresholdStatusIndexEndpoint (listOrganizationReleaseThresholdStatuses), its URL, the serializer, the apidocs examples, the health-check and utils helpers, and their tests
  • The ReleaseThreshold model and its constants, the project-deletion reference, CODEOWNERS entries, and the generated knownSentryApiUrls entry

Breaking change: the status endpoint is PUBLIC_EXPERIMENTAL, so @sentry/api 2.16.0 exports it as listOrganizationReleaseThresholdStatuses. Removing it removes that export, and the package README treats removing an export as a breaking change for a major release.

Migration (phase 1 of 2): 1269_remove_release_threshold drops the FK constraints on project and environment, then runs SafeDeleteModel(..., MOVE_TO_PENDING). sentry_releasethreshold is added to historical_silo_assignments as a CELL table. A later migration drops the table with DeletionAction.DELETE after this one has deployed.

Refs ISWF-3793

via @sentaur-athena.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot requested review from a team as code owners November 20, 2026 01:19
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 20, 2026 01:19
@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

ISWF-3793

@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 Nov 20, 2026
Release thresholds have no UI, and their endpoints are experimental. The last caller was the getsentry canary deploy check, which getsentry/getsentry#22979 removed. Remove the endpoints, serializer, health-check helpers, and tests, and move the ReleaseThreshold model to pending deletion. A follow-up migration drops the table after this deploys.

Refs ISWF-3793

Co-Authored-By: Athena Moghaddam <132939361+sentaur-athena@users.noreply.github.com>
@sentry-junior
sentry-junior Bot force-pushed the athenamoghaddam/iswf-3793-delete-unused-release-threshold branch from 0c1e0c8 to 692fea7 Compare November 20, 2026 03:23
…f-3793-delete-unused-release-threshold

# Conflicts:
#	migrations_lockfile.txt
…f-3793-delete-unused-release-threshold

# Conflicts:
#	migrations_lockfile.txt
@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/1269_remove_release_threshold.py

for 1269_remove_release_threshold in sentry

--
-- Alter field environment on releasethreshold
--
SET CONSTRAINTS "sentry_releasethresh_environment_id_6aa75405_fk_sentry_en" IMMEDIATE; ALTER TABLE "sentry_releasethreshold" DROP CONSTRAINT "sentry_releasethresh_environment_id_6aa75405_fk_sentry_en";
--
-- Alter field project on releasethreshold
--
SET CONSTRAINTS "sentry_releasethresh_project_id_d139592f_fk_sentry_pr" IMMEDIATE; ALTER TABLE "sentry_releasethreshold" DROP CONSTRAINT "sentry_releasethresh_project_id_d139592f_fk_sentry_pr";
--
-- Moved model ReleaseThreshold to pending deletion state
--
-- (no-op)

Remove the experimental release threshold create, list, update, and delete endpoints, which have no callers and no UI, and the unused /release-thresholds/ page route. Mark the public status endpoint deprecated. It is exported by @sentry/api, so removing it waits for that package's next major release.

Refs ISWF-3793

Co-Authored-By: Athena Moghaddam <132939361+sentaur-athena@users.noreply.github.com>
…tatus' into athenamoghaddam/iswf-3793-delete-unused-release-threshold

Co-Authored-By: Athena Moghaddam <132939361+sentaur-athena@users.noreply.github.com>

# Conflicts:
#	src/sentry/api/endpoints/release_thresholds/release_threshold_status_index.py
#	src/sentry/api/urls.py
#	src/sentry/models/release_threshold/constants.py
#	static/app/utils/api/knownSentryApiUrls.generated.ts
@sentry-junior sentry-junior Bot changed the title ref(releases): Remove unused release threshold code ref(releases): Remove release threshold status endpoint and model Nov 20, 2026
@sentry-junior
sentry-junior Bot changed the base branch from master to athenamoghaddam/iswf-3793-deprecate-release-threshold-status November 20, 2026 21:26
@sentaur-athena

Copy link
Copy Markdown
Member

The backend test fails because this is being a part of api client export, deleting it will break that package apparently. I made another PR to deprecate the API at least and then remove it from the next release before deleting it. Need to figure that piece out.

@sentry-junior

sentry-junior Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@BYK, a question about @sentry/api before this can land.

This PR removes ReleaseThresholdStatusIndexEndpoint. It's PUBLIC_EXPERIMENTAL, so @sentry/api 2.16.0 exports it as listOrganizationReleaseThresholdStatuses (along with its types and zod/valibot schemas). The feature has no UI, the endpoint's only real caller was the canary deploy check that getsentry/getsentry#22979 removed, and since then the only traffic on it has been failed requests. #132067 marks it deprecated=True in the meantime.

test/consumers/exports.mjs compares against @sentry/api@latest on npm, so the api client check fails on this PR until a release without the export is published. The README says removals wait for a major, but it doesn't say how a removal PR is supposed to merge before that major is cut, given that a release candidate goes to next and latest stays the same.

How do you want to handle it?

  1. Is a 3.0.0 planned that this could ride along with, or would you cut one for this?
  2. When it's time, should this PR merge with the api client check overridden right before the release, or is there another process for landing removals?

@BYK

BYK commented Nov 20, 2026

Copy link
Copy Markdown
Member

It's fine to cut a major.

When it's time, should this PR merge with the api client check overridden right before the release, or is there another process for landing removals?

This is also fine.

Once this PR merges, go to getsentry/toolkit repo and check if this endpoint was used there and then remove it appropriately while also bumping the @sentry/api version.

@markstory markstory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Schema migrations look good.

sentaur-athena added a commit that referenced this pull request Nov 23, 2026
Release thresholds have no UI. Their last real caller was the getsentry
canary deploy check, which getsentry/getsentry#22979 removed. This PR
removes the parts that can go now and deprecates the one endpoint that
has to stay until the next @sentry/api major release.

**Removed**
- `ReleaseThresholdIndexEndpoint`, `ReleaseThresholdEndpoint`, and
`ReleaseThresholdDetailsEndpoint` (all `EXPERIMENTAL`, so none of them
are in the public spec or @sentry/api), along with their URLs and tests
- The unused `/release-thresholds/` React page route. The frontend has
no route for it.
- The pagination allowlist entry, and the constants and `as_str_choices`
helpers that only those endpoints used
- Generated `knownSentryApiUrls` entries

**Deprecated**
- `ReleaseThresholdStatusIndexEndpoint`
(`listOrganizationReleaseThresholdStatuses`) is `PUBLIC_EXPERIMENTAL`
and is exported by @sentry/api 2.16.0. Removing an export waits for a
major release, so this PR adds `deprecated=True` instead. The client
then tags it `@deprecated`. The endpoint, the `ReleaseThreshold` model,
and the health-check helpers stay for now.

#131982 removes the rest, including the model migration,
once the major is ready.

Refs ISWF-3793

<!-- junior-request-attribution:start -->
via @sentaur-athena.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AD0BJR0J3N2U%3A1795135444.330509 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BJR0J3N2U%3A1795135444.330509)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BJR0J3N2U%3A1795135444.330509/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Athena Moghaddam <132939361+sentaur-athena@users.noreply.github.com>
Base automatically changed from athenamoghaddam/iswf-3793-deprecate-release-threshold-status to master November 23, 2026 20:41
…f-3793-delete-unused-release-threshold

# Conflicts:
#	src/sentry/api/endpoints/release_thresholds/release_threshold_status_index.py
#	src/sentry/api/urls.py
#	src/sentry/models/release_threshold/constants.py
#	static/app/utils/api/knownSentryApiUrls.generated.ts
@sentry-junior

sentry-junior Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @BYK. Here's the toolkit side: getsentry/toolkit@935859c4 doesn't reference listOrganizationReleaseThresholdStatuses or the release-threshold-statuses URL, so there's nothing to remove there. The bump to the new major is already handled by toolkit's rolling bump-sentry-api.yml PR, getsentry/toolkit#2447 (currently on 2.16.0), which moves to each newly published release.

@sentaur-athena
sentaur-athena enabled auto-merge (squash) November 23, 2026 20:51
…f-3793-delete-unused-release-threshold

# Conflicts:
#	migrations_lockfile.txt
…f-3793-delete-unused-release-threshold

# Conflicts:
#	migrations_lockfile.txt

This branch was successfully deployed

1 active deployment
Preview — 18751f6b Deployed Nov 26, 2026 by vercel[bot]
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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants