From 7a2964f0124269d614dd04be200da3ae1c821e32 Mon Sep 17 00:00:00 2001 From: Richard Ortenberg Date: Fri, 30 Jun 2023 14:48:09 -0400 Subject: [PATCH] ref(crons): Remove references to crons-issue-platform flag --- src/sentry/monitors/models.py | 2 +- tests/sentry/monitors/test_models.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sentry/monitors/models.py b/src/sentry/monitors/models.py index a747d6d283d985..396824036312a7 100644 --- a/src/sentry/monitors/models.py +++ b/src/sentry/monitors/models.py @@ -518,7 +518,7 @@ def mark_failed(self, last_checkin=None, reason=MonitorFailure.UNKNOWN): organization = Organization.objects.get(id=self.monitor.organization_id) use_issue_platform = features.has( "organizations:issue-platform", organization=organization - ) and features.has("organizations:crons-issue-platform", organization=organization) + ) except Organization.DoesNotExist: pass diff --git a/tests/sentry/monitors/test_models.py b/tests/sentry/monitors/test_models.py index a32f2088b38028..17901145fa25a5 100644 --- a/tests/sentry/monitors/test_models.py +++ b/tests/sentry/monitors/test_models.py @@ -159,7 +159,7 @@ def test_monitor_organization_limit(self): @region_silo_test(stable=True) class MonitorEnvironmentTestCase(TestCase): - @with_feature({"organizations:crons-issue-platform": False}) + @with_feature({"organizations:issue-platform": False}) @patch("sentry.coreapi.insert_data_to_database_legacy") def test_mark_failed_default_params_legacy(self, mock_insert_data_to_database_legacy): monitor = Monitor.objects.create( @@ -204,7 +204,7 @@ def test_mark_failed_default_params_legacy(self, mock_insert_data_to_database_le }, ) == dict(event) - @with_feature({"organizations:crons-issue-platform": False}) + @with_feature({"organizations:issue-platform": False}) @patch("sentry.coreapi.insert_data_to_database_legacy") def test_mark_failed_with_reason_legacy(self, mock_insert_data_to_database_legacy): monitor = Monitor.objects.create( @@ -249,7 +249,7 @@ def test_mark_failed_with_reason_legacy(self, mock_insert_data_to_database_legac }, ) == dict(event) - @with_feature({"organizations:crons-issue-platform": False}) + @with_feature({"organizations:issue-platform": False}) @patch("sentry.coreapi.insert_data_to_database_legacy") def test_mark_failed_with_missed_reason_legacy(self, mock_insert_data_to_database_legacy): monitor = Monitor.objects.create( @@ -298,7 +298,7 @@ def test_mark_failed_with_missed_reason_legacy(self, mock_insert_data_to_databas }, ) == dict(event) - @with_feature(["organizations:issue-platform", "organizations:crons-issue-platform"]) + @with_feature("organizations:issue-platform") @patch("sentry.issues.producer.produce_occurrence_to_kafka") def test_mark_failed_default_params_issue_platform(self, mock_produce_occurrence_to_kafka): monitor = Monitor.objects.create( @@ -376,7 +376,7 @@ def test_mark_failed_default_params_issue_platform(self, mock_produce_occurrence }, ) == dict(event) - @with_feature(["organizations:issue-platform", "organizations:crons-issue-platform"]) + @with_feature("organizations:issue-platform") @patch("sentry.issues.producer.produce_occurrence_to_kafka") def test_mark_failed_with_reason_issue_platform(self, mock_produce_occurrence_to_kafka): monitor = Monitor.objects.create( @@ -455,7 +455,7 @@ def test_mark_failed_with_reason_issue_platform(self, mock_produce_occurrence_to }, ) == dict(event) - @with_feature(["organizations:issue-platform", "organizations:crons-issue-platform"]) + @with_feature("organizations:issue-platform") @patch("sentry.issues.producer.produce_occurrence_to_kafka") def test_mark_failed_with_missed_reason_issue_platform(self, mock_produce_occurrence_to_kafka): monitor = Monitor.objects.create(