Repository navigation
ref(releases): Remove release threshold status endpoint and model - #131982
sentry-junior[bot] wants to merge 8 commits into
Conversation
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>
0c1e0c8 to
692fea7
Compare
…f-3793-delete-unused-release-threshold # Conflicts: # migrations_lockfile.txt
…f-3793-delete-unused-release-threshold # Conflicts: # migrations_lockfile.txt
|
This PR has a migration; here is the generated SQL for for --
-- 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
|
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. |
|
@BYK, a question about @sentry/api before this can land. This PR removes
How do you want to handle it?
|
|
It's fine to cut a major.
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 |
markstory
left a comment
There was a problem hiding this comment.
Schema migrations look good.
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>
…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
|
Thanks @BYK. Here's the toolkit side: getsentry/toolkit@935859c4 doesn't reference |
…f-3793-delete-unused-release-threshold # Conflicts: # migrations_lockfile.txt
…f-3793-delete-unused-release-threshold # Conflicts: # migrations_lockfile.txt
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 testsReleaseThresholdmodel and its constants, the project-deletion reference, CODEOWNERS entries, and the generatedknownSentryApiUrlsentryBreaking change: the status endpoint is
PUBLIC_EXPERIMENTAL, so @sentry/api 2.16.0 exports it aslistOrganizationReleaseThresholdStatuses. 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_thresholddrops the FK constraints onprojectandenvironment, then runsSafeDeleteModel(..., MOVE_TO_PENDING).sentry_releasethresholdis added tohistorical_silo_assignmentsas aCELLtable. A later migration drops the table withDeletionAction.DELETEafter this one has deployed.Refs ISWF-3793
via @sentaur-athena.
--
View Session [Sentry]