Skip to content

Commit 3b2015a

Browse files
authored
chore(feature): Clean up released features that use OptionBackedRolloutFeatureHandler in getsentry (#69168)
I want to consolidate code between `OptionBackedRolloutFeatureHandler` and `AutoRegisterOptionBackedRolloutFeatureHandler`. These features handlers all use `OptionBackedRolloutFeatureHandler`, but have been released for months (https://redash.getsentry.net/queries/6524/source). Just removing the flags.
1 parent 5b5390f commit 3b2015a

File tree

13 files changed

+11
-88
lines changed

13 files changed

+11
-88
lines changed

src/sentry/conf/server.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,8 +1711,6 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
17111711
"organizations:performance-change-explorer": False,
17121712
# Enable interpolation of null data points in charts instead of zerofilling in performance
17131713
"organizations:performance-chart-interpolation": False,
1714-
# Enable consecutive db performance issue type
1715-
"organizations:performance-consecutive-db-issue": False,
17161714
# Enable consecutive http performance issue type
17171715
"organizations:performance-consecutive-http-detector": False,
17181716
# Enable database view powered by span metrics
@@ -1725,14 +1723,8 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
17251723
"organizations:performance-discover-widget-split-override-save": False,
17261724
# Enables updated all events tab in a performance issue
17271725
"organizations:performance-issues-all-events-tab": False,
1728-
# Enable compressed assets performance issue type
1729-
"organizations:performance-issues-compressed-assets-detector": False,
17301726
# Enable performance issues dev options, includes changing parts of issues that we're using for development.
17311727
"organizations:performance-issues-dev": False,
1732-
# Enable MN+1 DB performance issue type
1733-
"organizations:performance-issues-m-n-plus-one-db-detector": False,
1734-
# Enable render blocking assets performance issue type
1735-
"organizations:performance-issues-render-blocking-assets-detector": False,
17361728
# Temporary flag to test search performance that's running slow in S4S
17371729
"organizations:performance-issues-search": True,
17381730
# Enables a longer stats period for the performance landing page
@@ -1747,8 +1739,6 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
17471739
"organizations:performance-metrics-backed-transaction-summary": False,
17481740
# Enable the UI for displaying mobile performance score
17491741
"organizations:performance-mobile-perf-score-ui": False,
1750-
# Enable N+1 API Calls performance issue type
1751-
"organizations:performance-n-plus-one-api-calls-detector": False,
17521742
# Enable new trends
17531743
"organizations:performance-new-trends": False,
17541744
# Enable updated landing page widget designs
@@ -1765,8 +1755,6 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
17651755
"organizations:performance-http-view": False,
17661756
# Enable column that shows ttid ttfd contributing spans
17671757
"organizations:mobile-ttid-ttfd-contribution": False,
1768-
# Enable slow DB performance issue type
1769-
"organizations:performance-slow-db-issue": False,
17701758
# Enable histogram view in span details
17711759
"organizations:performance-span-histogram-view": False,
17721760
# Enable trace details page with embedded spans

src/sentry/features/temporary.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def register_temporary_features(manager: FeatureManager):
135135
manager.add("organizations:performance-calculate-mobile-perf-score-relay", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
136136
manager.add("organizations:performance-change-explorer", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
137137
manager.add("organizations:performance-chart-interpolation", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
138-
manager.add("organizations:performance-consecutive-db-issue", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
139138
manager.add("organizations:performance-consecutive-http-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
140139
manager.add("organizations:performance-database-view", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
141140
manager.add("organizations:performance-database-view-percentiles", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
@@ -145,26 +144,20 @@ def register_temporary_features(manager: FeatureManager):
145144
manager.add("organizations:performance-file-io-main-thread-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
146145
manager.add("organizations:performance-http-view", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
147146
manager.add("organizations:performance-issues-all-events-tab", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
148-
manager.add("organizations:performance-issues-compressed-assets-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
149147
manager.add("organizations:performance-issues-dev", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
150-
manager.add("organizations:performance-issues-http-overhead-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
151-
manager.add("organizations:performance-issues-m-n-plus-one-db-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
152-
manager.add("organizations:performance-issues-render-blocking-assets-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
153148
manager.add("organizations:performance-issues-search", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
154149
manager.add("organizations:performance-landing-page-stats-period", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
155150
manager.add("organizations:performance-large-http-payload-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
156151
manager.add("organizations:performance-mep-bannerless-ui", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
157152
manager.add("organizations:performance-mep-reintroduce-histograms", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
158153
manager.add("organizations:performance-metrics-backed-transaction-summary", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
159154
manager.add("organizations:performance-mobile-perf-score-ui", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
160-
manager.add("organizations:performance-n-plus-one-api-calls-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
161155
manager.add("organizations:performance-new-trends", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
162156
manager.add("organizations:performance-new-widget-designs", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
163157
manager.add("organizations:performance-onboarding-checklist", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
164158
manager.add("organizations:performance-remove-metrics-compatibility-fallback", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
165159
manager.add("organizations:performance-screens-platform-selector", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
166160
manager.add("organizations:performance-screens-view", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
167-
manager.add("organizations:performance-slow-db-issue", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
168161
manager.add("organizations:performance-span-histogram-view", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
169162
manager.add("organizations:performance-trace-details", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
170163
manager.add("organizations:performance-trace-explorer", OrganizationFeature, FeatureHandlerStrategy.REMOTE)

src/sentry/utils/performance_issues/detectors/consecutive_db_detector.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from django.utils.translation import gettext_lazy as _
99

10-
from sentry import features
1110
from sentry.issues.grouptype import PerformanceConsecutiveDBQueriesGroupType
1211
from sentry.issues.issue_occurrence import IssueEvidence
1312
from sentry.models.organization import Organization
@@ -256,9 +255,7 @@ def on_complete(self) -> None:
256255
self._validate_and_store_performance_problem()
257256

258257
def is_creation_allowed_for_organization(self, organization: Organization) -> bool:
259-
return features.has(
260-
"organizations:performance-consecutive-db-issue", organization, actor=None
261-
)
258+
return True
262259

263260
def is_creation_allowed_for_project(self, project: Project) -> bool:
264261
return self.settings["detection_enabled"]

src/sentry/utils/performance_issues/detectors/http_overhead_detector.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from dataclasses import dataclass
66
from typing import Any
77

8-
from sentry import features
98
from sentry.issues.grouptype import PerformanceHTTPOverheadGroupType
109
from sentry.issues.issue_occurrence import IssueEvidence
1110
from sentry.models.organization import Organization
@@ -180,11 +179,7 @@ def on_complete(self) -> None:
180179
self._store_performance_problem(location)
181180

182181
def is_creation_allowed_for_organization(self, organization: Organization | None) -> bool:
183-
return features.has(
184-
"organizations:performance-issues-http-overhead-detector",
185-
organization,
186-
actor=None,
187-
)
182+
return True
188183

189184
def is_creation_allowed_for_project(self, project: Project) -> bool:
190185
return self.settings["detection_enabled"]

src/sentry/utils/performance_issues/detectors/mn_plus_one_db_span_detector.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from collections.abc import Sequence
77
from typing import Any
88

9-
from sentry import features
109
from sentry.eventstore.models import Event
1110
from sentry.issues.grouptype import (
1211
PerformanceMNPlusOneDBQueriesGroupType,
@@ -267,11 +266,7 @@ def __init__(self, settings: dict[DetectorType, Any], event: dict[str, Any]) ->
267266
self.state = SearchingForMNPlusOne(self.settings, self.event())
268267

269268
def is_creation_allowed_for_organization(self, organization: Organization | None) -> bool:
270-
return features.has(
271-
"organizations:performance-issues-m-n-plus-one-db-detector",
272-
organization,
273-
actor=None,
274-
)
269+
return True
275270

276271
def is_creation_allowed_for_project(self, project: Project) -> bool:
277272
return self.settings["detection_enabled"]

src/sentry/utils/performance_issues/detectors/n_plus_one_api_calls_detector.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from django.utils.encoding import force_bytes
1212

13-
from sentry import features
1413
from sentry.issues.grouptype import PerformanceNPlusOneAPICallsGroupType
1514
from sentry.issues.issue_occurrence import IssueEvidence
1615
from sentry.models.organization import Organization
@@ -80,9 +79,7 @@ def visit_span(self, span: Span) -> None:
8079
self.spans = [span]
8180

8281
def is_creation_allowed_for_organization(self, organization: Organization) -> bool:
83-
return features.has(
84-
"organizations:performance-n-plus-one-api-calls-detector", organization, actor=None
85-
)
82+
return True
8683

8784
def is_creation_allowed_for_project(self, project: Project) -> bool:
8885
return self.settings["detection_enabled"]

src/sentry/utils/performance_issues/detectors/render_blocking_asset_span_detector.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from datetime import timedelta
55
from typing import Any
66

7-
from sentry import features
87
from sentry.issues.grouptype import PerformanceRenderBlockingAssetSpanGroupType
98
from sentry.issues.issue_occurrence import IssueEvidence
109
from sentry.models.organization import Organization
@@ -56,11 +55,7 @@ def __init__(self, settings: dict[DetectorType, Any], event: dict[str, Any]) ->
5655
self.fcp_value = fcp_value
5756

5857
def is_creation_allowed_for_organization(self, organization: Organization | None) -> bool:
59-
return features.has(
60-
"organizations:performance-issues-render-blocking-assets-detector",
61-
organization,
62-
actor=None,
63-
)
58+
return True
6459

6560
def is_creation_allowed_for_project(self, project: Project) -> bool:
6661
return self.settings["detection_enabled"]

src/sentry/utils/performance_issues/detectors/slow_db_query_detector.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from datetime import timedelta
55
from typing import Any
66

7-
from sentry import features
87
from sentry.issues.grouptype import PerformanceSlowDBQueryGroupType
98
from sentry.issues.issue_occurrence import IssueEvidence
109
from sentry.models.organization import Organization
@@ -103,7 +102,7 @@ def visit_span(self, span: Span):
103102
)
104103

105104
def is_creation_allowed_for_organization(self, organization: Organization | None) -> bool:
106-
return features.has("organizations:performance-slow-db-issue", organization, actor=None)
105+
return True
107106

108107
def is_creation_allowed_for_project(self, project: Project | None) -> bool:
109108
return self.settings[0]["detection_enabled"]

src/sentry/utils/performance_issues/detectors/uncompressed_asset_detector.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import re
44
from typing import Any
55

6-
from sentry import features
76
from sentry.issues.grouptype import PerformanceUncompressedAssetsGroupType
87
from sentry.issues.issue_occurrence import IssueEvidence
98
from sentry.models.organization import Organization
@@ -133,9 +132,7 @@ def _fingerprint(self, span) -> str:
133132
return f"1-{PerformanceUncompressedAssetsGroupType.type_id}-{resource_span}"
134133

135134
def is_creation_allowed_for_organization(self, organization: Organization) -> bool:
136-
return features.has(
137-
"organizations:performance-issues-compressed-assets-detector", organization, actor=None
138-
)
135+
return True
139136

140137
def is_creation_allowed_for_project(self, project: Project) -> bool:
141138
return self.settings["detection_enabled"]

tests/acceptance/test_performance_issues.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
from sentry.testutils.silo import no_silo_test
1919
from sentry.utils import json
2020

21-
FEATURES = {
22-
"organizations:performance-n-plus-one-api-calls-detector": True,
23-
}
24-
2521

2622
@no_silo_test
2723
class PerformanceIssuesTest(AcceptanceTestCase, SnubaTestCase, PerformanceIssueTestCase):
@@ -72,7 +68,7 @@ def test_with_one_performance_issue(self, mock_now):
7268
"n-plus-one-in-django-new-view", mock_now.return_value.timestamp()
7369
)
7470

75-
with self.feature(FEATURES), mock.patch(
71+
with mock.patch(
7672
"sentry.issues.ingest.send_issue_occurrence_to_eventstream",
7773
side_effect=send_issue_occurrence_to_eventstream,
7874
) as mock_eventstream, mock.patch.object(
@@ -108,7 +104,7 @@ def test_n_one_api_call_performance_issue(self, mock_now):
108104

109105
event_data["contexts"]["trace"]["op"] = "navigation"
110106

111-
with self.feature(FEATURES), mock.patch(
107+
with mock.patch(
112108
"sentry.issues.ingest.send_issue_occurrence_to_eventstream",
113109
side_effect=send_issue_occurrence_to_eventstream,
114110
) as mock_eventstream, mock.patch.object(

0 commit comments

Comments
 (0)