Skip to content

ref(quick-start): Remove 'METRIC_ALERT' from onboarding task #83487

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

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
4 changes: 2 additions & 2 deletions src/sentry/models/organizationonboardingtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from sentry.db.models.manager.base import BaseManager


# NOTE: There are gaps in the numberation because a
# few tasks were removed as they are no longer used in the quick start sidebar
class OnboardingTask:
FIRST_PROJECT = 1
FIRST_EVENT = 2
Expand All @@ -32,7 +34,6 @@ class OnboardingTask:
ISSUE_TRACKER = 9
ALERT_RULE = 10
FIRST_TRANSACTION = 11
METRIC_ALERT = 12
INTEGRATIONS = 13
SESSION_REPLAY = 14
REAL_TIME_NOTIFICATIONS = 15
Expand Down Expand Up @@ -134,7 +135,6 @@ class OrganizationOnboardingTask(AbstractOnboardingTask):
(OnboardingTask.ISSUE_TRACKER, "setup_issue_tracker"),
(OnboardingTask.ALERT_RULE, "setup_alert_rules"),
(OnboardingTask.FIRST_TRANSACTION, "setup_transactions"),
(OnboardingTask.METRIC_ALERT, "setup_metric_alert_rules"),
(OnboardingTask.INTEGRATIONS, "setup_integrations"),
(OnboardingTask.SESSION_REPLAY, "setup_session_replay"),
(OnboardingTask.REAL_TIME_NOTIFICATIONS, "setup_real_time_notifications"),
Expand Down
7 changes: 5 additions & 2 deletions src/sentry/receivers/onboarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,13 @@ def record_plugin_enabled(plugin, project, user, **kwargs):

@alert_rule_created.connect(weak=False)
def record_alert_rule_created(user, project: Project, rule_type: str, **kwargs):
task = OnboardingTask.METRIC_ALERT if rule_type == "metric" else OnboardingTask.ALERT_RULE
# The quick start now only has a task for issue alert rules.
# Please see https://github.com/getsentry/sentry/blob/c06a3aa5fb104406f2a44994d32983e99bc2a479/static/app/components/onboardingWizard/taskConfig.tsx#L351-L352
if rule_type == "metric":
return
rows_affected, created = OrganizationOnboardingTask.objects.create_or_update(
organization_id=project.organization_id,
task=task,
task=OnboardingTask.ALERT_RULE,
values={
"status": OnboardingTaskStatus.COMPLETE,
"user_id": user.id if user else None,
Expand Down
Loading