Skip to content

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

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

sentry-junior[bot] wants to merge 4 commits into
athenamoghaddam/iswf-3793-deprecate-release-threshold-statusfrom
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)

…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.

This branch was successfully deployed

1 active deployment
Preview — 4359b9c2 Deployed Nov 20, 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.

3 participants