Skip to content

Commit dcfa111

Browse files
ref(preprod): Remove graduated preprod-frontend-routes feature flag
The preprod-frontend-routes flag has been at 100% rollout and is fully graduated. Remove all gating code across backend endpoints, frontend components, and tests since all code paths are already executing in production.
1 parent 3fc672d commit dcfa111

32 files changed

+25
-342
lines changed

src/sentry/api/endpoints/organization_trace_item_attributes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ class OrganizationTraceItemAttributesEndpointBase(OrganizationEventsEndpointBase
129129
"organizations:ourlogs-enabled",
130130
"organizations:visibility-explore-view",
131131
"organizations:tracemetrics-enabled",
132-
"organizations:preprod-frontend-routes",
133132
]
134133

135134
def has_feature(self, organization: Organization, request: Request) -> bool:

src/sentry/features/temporary.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
233233
manager.add("organizations:performance-web-vitals-seer-suggestions", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
234234
# Enable the warning banner to inform users of pending deprecation of the transactions dataset
235235
manager.add("organizations:performance-transaction-deprecation-banner", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
236-
# Enable preprod frontend routes
237-
manager.add("organizations:preprod-frontend-routes", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
238236
# Enable preprod_artifact webhook subscription UI in Sentry App settings
239237
manager.add("organizations:preprod-artifact-webhooks", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
240238
# Enable preprod issue reporting

src/sentry/preprod/api/endpoints/builds.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from rest_framework.request import Request
55
from rest_framework.response import Response
66

7-
from sentry import features
87
from sentry.api.api_owners import ApiOwner
98
from sentry.api.api_publish_status import ApiPublishStatus
109
from sentry.api.base import cell_silo_endpoint
@@ -21,8 +20,6 @@
2120

2221
logger = logging.getLogger(__name__)
2322

24-
ERR_FEATURE_REQUIRED = "Feature {} is not enabled for the organization."
25-
2623

2724
@cell_silo_endpoint
2825
class BuildsEndpoint(OrganizationEndpoint):
@@ -32,14 +29,6 @@ class BuildsEndpoint(OrganizationEndpoint):
3229
}
3330

3431
def get(self, request: Request, organization: Organization) -> Response:
35-
if not features.has(
36-
"organizations:preprod-frontend-routes", organization, actor=request.user
37-
):
38-
return Response(
39-
{"detail": ERR_FEATURE_REQUIRED.format("organizations:preprod-frontend-routes")},
40-
status=403,
41-
)
42-
4332
def on_results(artifacts: list[PreprodArtifact]) -> list[dict[str, Any]]:
4433
results = []
4534
for artifact in artifacts:

src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
import jsonschema
66
import orjson
77
import sentry_sdk
8-
from django.conf import settings
98
from rest_framework.request import Request
109
from rest_framework.response import Response
1110

12-
from sentry import analytics, features
11+
from sentry import analytics
1312
from sentry.api.api_owners import ApiOwner
1413
from sentry.api.api_publish_status import ApiPublishStatus
1514
from sentry.api.base import cell_silo_endpoint
@@ -145,11 +144,6 @@ def post(self, request: Request, project: Project) -> Response:
145144
)
146145
)
147146

148-
if not settings.IS_DEV and not features.has(
149-
"organizations:preprod-frontend-routes", project.organization, actor=request.user
150-
):
151-
return Response({"error": "Feature not enabled"}, status=403)
152-
153147
with sentry_sdk.start_span(op="preprod_artifact.assemble"):
154148
data, error_message = validate_preprod_artifact_schema(request.body)
155149
if error_message:

src/sentry/preprod/api/endpoints/project_preprod_artifact_delete.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from rest_framework.request import Request
66
from rest_framework.response import Response
77

8-
from sentry import analytics, features
8+
from sentry import analytics
99
from sentry.api.api_owners import ApiOwner
1010
from sentry.api.api_publish_status import ApiPublishStatus
1111
from sentry.api.base import cell_silo_endpoint
@@ -34,11 +34,6 @@ def delete(
3434
) -> Response:
3535
"""Delete a preprod artifact and all associated data"""
3636

37-
if not features.has(
38-
"organizations:preprod-frontend-routes", project.organization, actor=request.user
39-
):
40-
return Response({"error": "Feature not enabled"}, status=403)
41-
4237
analytics.record(
4338
PreprodArtifactApiDeleteEvent(
4439
organization_id=project.organization_id,

src/sentry/preprod/api/endpoints/project_preprod_build_details.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from rest_framework.request import Request
66
from rest_framework.response import Response
77

8-
from sentry import analytics, features
8+
from sentry import analytics
99
from sentry.api.api_owners import ApiOwner
1010
from sentry.api.api_publish_status import ApiPublishStatus
1111
from sentry.api.base import cell_silo_endpoint
@@ -58,11 +58,6 @@ def get(
5858
)
5959
)
6060

61-
if not features.has(
62-
"organizations:preprod-frontend-routes", project.organization, actor=request.user
63-
):
64-
return Response({"error": "Feature not enabled"}, status=403)
65-
6661
cutoff = get_size_retention_cutoff(project.organization)
6762
if head_artifact.date_added < cutoff:
6863
return Response({"detail": "This build's size data has expired."}, status=404)

src/sentry/preprod/api/endpoints/public/organization_preprod_artifact_install_details.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from rest_framework.request import Request
55
from rest_framework.response import Response
66

7-
from sentry import features
87
from sentry.api.api_owners import ApiOwner
98
from sentry.api.api_publish_status import ApiPublishStatus
109
from sentry.api.base import cell_silo_endpoint
@@ -72,11 +71,6 @@ def get(
7271
and iOS-specific code signing information.
7372
"""
7473

75-
if not features.has(
76-
"organizations:preprod-frontend-routes", organization, actor=request.user
77-
):
78-
return Response({"detail": "Feature not enabled"}, status=403)
79-
8074
try:
8175
artifact = PreprodArtifact.objects.select_related(
8276
"mobile_app_info",

src/sentry/preprod/api/endpoints/public/organization_preprod_size_analysis.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from rest_framework.request import Request
99
from rest_framework.response import Response
1010

11-
from sentry import features
1211
from sentry.api.api_owners import ApiOwner
1312
from sentry.api.api_publish_status import ApiPublishStatus
1413
from sentry.api.base import cell_silo_endpoint
@@ -119,11 +118,6 @@ def get(
119118
- `COMPLETED`: Analysis finished successfully with full size data.
120119
"""
121120

122-
if not features.has(
123-
"organizations:preprod-frontend-routes", organization, actor=request.user
124-
):
125-
return Response({"detail": "Feature not enabled"}, status=403)
126-
127121
try:
128122
head_artifact = PreprodArtifact.objects.select_related(
129123
"mobile_app_info", "build_configuration", "commit_comparison"

src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from rest_framework.request import Request
88
from rest_framework.response import Response
99

10-
from sentry import analytics, features
10+
from sentry import analytics
1111
from sentry.api.api_owners import ApiOwner
1212
from sentry.api.api_publish_status import ApiPublishStatus
1313
from sentry.api.base import cell_silo_endpoint
@@ -113,11 +113,6 @@ def get(
113113
)
114114
)
115115

116-
if not features.has(
117-
"organizations:preprod-frontend-routes", project.organization, actor=request.user
118-
):
119-
return Response({"detail": "Feature not enabled"}, status=403)
120-
121116
cutoff = get_size_retention_cutoff(project.organization)
122117
if head_artifact.date_added < cutoff or base_artifact.date_added < cutoff:
123118
return Response({"detail": "This build's size data has expired."}, status=404)
@@ -279,11 +274,6 @@ def post(
279274
)
280275
)
281276

282-
if not features.has(
283-
"organizations:preprod-frontend-routes", project.organization, actor=request.user
284-
):
285-
return Response({"detail": "Feature not enabled"}, status=403)
286-
287277
cutoff = get_size_retention_cutoff(project.organization)
288278
if head_artifact.date_added < cutoff or base_artifact.date_added < cutoff:
289279
return Response({"detail": "This build's size data has expired."}, status=404)

src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare_download.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from rest_framework.request import Request
77
from rest_framework.response import Response
88

9-
from sentry import analytics, features
9+
from sentry import analytics
1010
from sentry.api.api_owners import ApiOwner
1111
from sentry.api.api_publish_status import ApiPublishStatus
1212
from sentry.api.base import cell_silo_endpoint
@@ -55,11 +55,6 @@ def get(
5555
)
5656
)
5757

58-
if not features.has(
59-
"organizations:preprod-frontend-routes", project.organization, actor=request.user
60-
):
61-
return Response({"detail": "Feature not enabled"}, status=403)
62-
6358
logger.info(
6459
"preprod.size_analysis.compare.api.download",
6560
extra={

0 commit comments

Comments
 (0)