Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class ReleaseThresholdStatusIndexEndpoint(OrganizationReleasesBaseEndpoint):
@extend_schema(
operation_id="listOrganizationReleaseThresholdStatuses",
summary="Retrieve Statuses of Release Thresholds (Alpha)",
deprecated=True,
parameters=[GlobalParams.ORG_ID_OR_SLUG, ReleaseThresholdStatusIndexSerializer],
request=None,
responses={
Expand Down
22 changes: 0 additions & 22 deletions src/sentry/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@
)
from sentry.api.endpoints.project_overview import ProjectOverviewEndpoint
from sentry.api.endpoints.project_statistical_detectors import ProjectStatisticalDetectors
from sentry.api.endpoints.release_thresholds.release_threshold import ReleaseThresholdEndpoint
from sentry.api.endpoints.release_thresholds.release_threshold_details import (
ReleaseThresholdDetailsEndpoint,
)
from sentry.api.endpoints.release_thresholds.release_threshold_index import (
ReleaseThresholdIndexEndpoint,
)
from sentry.api.endpoints.release_thresholds.release_threshold_status_index import (
ReleaseThresholdStatusIndexEndpoint,
)
Expand Down Expand Up @@ -2345,11 +2338,6 @@ def create_group_urls(
OrganizationReleasesEndpoint.as_view(),
name="sentry-api-0-organization-releases",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/release-thresholds/$",
ReleaseThresholdIndexEndpoint.as_view(),
name="sentry-api-0-organization-release-thresholds",
),
# TODO: also integrate release threshold status into the releases response?
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/release-threshold-statuses/$",
Expand Down Expand Up @@ -3219,16 +3207,6 @@ def create_group_urls(
ProjectReleasesEndpoint.as_view(),
name="sentry-api-0-project-releases",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/(?P<project_id_or_slug>[^/]+)/release-thresholds/$",
ReleaseThresholdEndpoint.as_view(),
name="sentry-api-0-project-release-thresholds",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/(?P<project_id_or_slug>[^/]+)/release-thresholds/(?P<release_threshold>[^/]+)/$",
ReleaseThresholdDetailsEndpoint.as_view(),
name="sentry-api-0-project-release-thresholds-details",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/(?P<project_id_or_slug>[^/]+)/commits/$",
ProjectCommitsEndpoint.as_view(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"ProjectSymbolSourcesEndpoint",
"ProjectTagsEndpoint",
"ProjectUsersEndpoint",
"ReleaseThresholdEndpoint",
"SentryAppInstallationServiceHookProjectsEndpoint",
"SentryAppRequestsEndpoint",
"SentryAppWebhookRequestsEndpoint",
Expand Down
34 changes: 0 additions & 34 deletions src/sentry/models/release_threshold/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ def as_choices(cls) -> tuple[tuple[str, int], ...]:
(cls.CRASH_FREE_USER_RATE_STR, cls.CRASH_FREE_USER_RATE),
)

@classmethod
def as_str_choices(cls) -> tuple[tuple[str, str], ...]:
return (
(cls.TOTAL_ERROR_COUNT_STR, cls.TOTAL_ERROR_COUNT_STR),
(cls.NEW_ISSUE_COUNT_STR, cls.NEW_ISSUE_COUNT_STR),
(cls.UNHANDLED_ISSUE_COUNT_STR, cls.UNHANDLED_ISSUE_COUNT_STR),
(cls.REGRESSED_ISSUE_COUNT_STR, cls.REGRESSED_ISSUE_COUNT_STR),
(cls.FAILURE_RATE_STR, cls.FAILURE_RATE_STR),
(cls.CRASH_FREE_SESSION_RATE_STR, cls.CRASH_FREE_SESSION_RATE_STR),
(cls.CRASH_FREE_USER_RATE_STR, cls.CRASH_FREE_USER_RATE_STR),
)


class TriggerType:
OVER = 0
Expand All @@ -69,13 +57,6 @@ def as_choices(cls) -> tuple[tuple[str, int], ...]: # choices for model column
(cls.UNDER_STR, cls.UNDER),
)

@classmethod
def as_str_choices(cls) -> tuple[tuple[str, str], ...]: # choices for serializer
return (
(cls.OVER_STR, cls.OVER_STR),
(cls.UNDER_STR, cls.UNDER_STR),
)


THRESHOLD_TYPE_INT_TO_STR: dict[int, ThresholdTypeName] = {
ReleaseThresholdType.TOTAL_ERROR_COUNT: ReleaseThresholdType.TOTAL_ERROR_COUNT_STR,
Expand All @@ -87,22 +68,7 @@ def as_str_choices(cls) -> tuple[tuple[str, str], ...]: # choices for serialize
ReleaseThresholdType.CRASH_FREE_USER_RATE: ReleaseThresholdType.CRASH_FREE_USER_RATE_STR,
}

THRESHOLD_TYPE_STR_TO_INT = {
ReleaseThresholdType.TOTAL_ERROR_COUNT_STR: ReleaseThresholdType.TOTAL_ERROR_COUNT,
ReleaseThresholdType.NEW_ISSUE_COUNT_STR: ReleaseThresholdType.NEW_ISSUE_COUNT,
ReleaseThresholdType.UNHANDLED_ISSUE_COUNT_STR: ReleaseThresholdType.UNHANDLED_ISSUE_COUNT,
ReleaseThresholdType.REGRESSED_ISSUE_COUNT_STR: ReleaseThresholdType.REGRESSED_ISSUE_COUNT,
ReleaseThresholdType.FAILURE_RATE_STR: ReleaseThresholdType.FAILURE_RATE,
ReleaseThresholdType.CRASH_FREE_SESSION_RATE_STR: ReleaseThresholdType.CRASH_FREE_SESSION_RATE,
ReleaseThresholdType.CRASH_FREE_USER_RATE_STR: ReleaseThresholdType.CRASH_FREE_USER_RATE,
}

TRIGGER_TYPE_INT_TO_STR: dict[int, TriggerTypeName] = {
TriggerType.OVER: TriggerType.OVER_STR,
TriggerType.UNDER: TriggerType.UNDER_STR,
}

TRIGGER_TYPE_STRING_TO_INT = {
TriggerType.OVER_STR: TriggerType.OVER,
TriggerType.UNDER_STR: TriggerType.UNDER,
}
5 changes: 0 additions & 5 deletions src/sentry/web/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,11 +991,6 @@
react_page_view,
name="releases",
),
re_path(
r"^release-thresholds/",
react_page_view,
name="release-thresholds",
),
# User Feedback
re_path(
r"^user-feedback/",
Expand Down
Loading
Loading