Skip to content

Commit

Permalink
ref(crons): Remove crons issue platform flag (#51291)
Browse files Browse the repository at this point in the history
Removes flag as feature is live in production
  • Loading branch information
rjo100 authored Jun 30, 2023
1 parent 765ee99 commit 6a91676
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,8 +1314,6 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
# Enable creating organizations within sentry (if SENTRY_SINGLE_ORGANIZATION
# is not enabled).
"organizations:create": True,
# Use issue platform for crons issues
"organizations:crons-issue-platform": False,
# Use new listing page for crons
"organizations:crons-timeline-listing-page": False,
# Enable usage of customer domains on the frontend
Expand Down
1 change: 0 additions & 1 deletion src/sentry/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
default_manager.add("organizations:auto-enable-codecov", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
default_manager.add("organizations:crash-rate-alerts", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
default_manager.add("organizations:mute-metric-alerts", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
default_manager.add("organizations:crons-issue-platform", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
default_manager.add("organizations:crons-timeline-listing-page", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
default_manager.add("organizations:customer-domains", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
default_manager.add("organizations:dashboards-mep", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/monitors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions tests/sentry/monitors/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 6a91676

Please sign in to comment.