Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(issue-platform): Remove project level option for creating issues via platform #48911

Merged
merged 1 commit into from
May 12, 2023
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
8 changes: 0 additions & 8 deletions src/sentry/api/endpoints/project_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,6 @@ def put(self, request: Request, project) -> Response:
changed_proj_settings["sentry:performance_issue_send_to_issues_platform"] = result[
"performanceIssueSendToPlatform"
]
if "performanceIssueCreationThroughPlatform" in result:
if project.update_option(
"sentry:performance_issue_create_issue_through_platform",
result["performanceIssueCreationThroughPlatform"],
):
changed_proj_settings[
"sentry:performance_issue_create_issue_through_platform"
] = result["performanceIssueCreationThroughPlatform"]
# TODO(dcramer): rewrite options to use standard API config
if has_project_write:
options = request.data.get("options", {})
Expand Down
2 changes: 0 additions & 2 deletions src/sentry/issues/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def issue_category_can_create_group(category: GroupCategory, project: Project) -
category == GroupCategory.PERFORMANCE
# system-wide option
and options.get("performance.issues.create_issues_through_platform", False)
# more-granular per-project option
and project.get_option("sentry:performance_issue_create_issue_through_platform", True)
)
)

Expand Down
4 changes: 0 additions & 4 deletions src/sentry/projectoptions/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@
# Can be used to turn off writing occurrences for users if there is a project-specific issue.
register(key="sentry:performance_issue_send_to_issues_platform", default=True)

# Rate at which performance issues are created through issues platform per project. Defaults to False, system flags and options will determine if an organization creates issues through platform.
# Can be used to turn off issue creation for users if there is a project-specific issue.
register(key="sentry:performance_issue_create_issue_through_platform", default=False)

DEFAULT_PROJECT_PERFORMANCE_DETECTION_SETTINGS = {
"n_plus_one_db_detection_rate": 1.0,
"n_plus_one_api_calls_detection_rate": 1.0,
Expand Down
4 changes: 1 addition & 3 deletions src/sentry/web/frontend/debug/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ def make_performance_event(project, sample_name: str):
timestamp = datetime(2017, 9, 6, 0, 0)
start_timestamp = timestamp - timedelta(seconds=3)

if options.get(
"performance.issues.create_issues_through_platform", True
) and project.get_option("sentry:performance_issue_create_issue_through_platform", True):
if options.get("performance.issues.create_issues_through_platform", True):
event_id = "44f1419e73884cd2b45c79918f4b6dc4"
occurrence_data = SAMPLE_TO_OCCURRENCE_MAP[sample_name].to_dict()
occurrence_data["event_id"] = event_id
Expand Down
1 change: 0 additions & 1 deletion tests/sentry/mail/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ def test_simple_notification_perf_issue_platform(self):
)
perf_event_manager = EventManager(event_data)
perf_event_manager.normalize()
self.project.update_option("sentry:performance_issue_create_issue_through_platform", True)

with override_options(
{
Expand Down
2 changes: 0 additions & 2 deletions tests/snuba/rules/conditions/test_event_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ def add_event(self, data, project_id, timestamp):
return event.for_group(event.groups[0])

def assertPasses(self, rule, event=None, **kwargs):
self.project.update_option("sentry:performance_issue_create_issue_through_platform", True)
with self.options({"performance.issues.create_issues_through_platform": True}):
super().assertPasses(rule, event=event, **kwargs)
self.project.update_option("sentry:performance_issue_create_issue_through_platform", False)


class StandardIntervalMixin:
Expand Down
1 change: 0 additions & 1 deletion tests/snuba/search/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,6 @@ def test_generic_query(self):
def test_generic_query_perf(self):
event_id = uuid.uuid4().hex
group_type = PerformanceNPlusOneGroupType
self.project.update_option("sentry:performance_issue_create_issue_through_platform", True)

with self.options(
{"performance.issues.create_issues_through_platform": True}
Expand Down