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

ref(crons): Remove crons issue platform flag #51291

Merged
merged 1 commit into from
Jun 30, 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
2 changes: 0 additions & 2 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,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 @@ -517,7 +517,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