Skip to content

ref(quick-start): Update backend enums names #83361

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
merged 5 commits into from
Jan 15, 2025
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
10 changes: 5 additions & 5 deletions src/sentry/models/organizationonboardingtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class AbstractOnboardingTask(Model):

# abstract
TASK_LOOKUP_BY_KEY: dict[str, int]
NEW_SKIPPABLE_TASKS: frozenset[int]
SKIPPABLE_TASKS: frozenset[int]

class Meta:
abstract = True
Expand Down Expand Up @@ -141,7 +141,7 @@ class OrganizationOnboardingTask(AbstractOnboardingTask):

# Tasks which should be completed for the onboarding to be considered
# complete.
NEW_REQUIRED_ONBOARDING_TASKS = frozenset(
REQUIRED_ONBOARDING_TASKS = frozenset(
[
OnboardingTask.FIRST_PROJECT,
OnboardingTask.FIRST_EVENT,
Expand All @@ -156,14 +156,14 @@ class OrganizationOnboardingTask(AbstractOnboardingTask):
]
)

NEW_REQUIRED_ONBOARDING_TASKS_WITH_SOURCE_MAPS = frozenset(
REQUIRED_ONBOARDING_TASKS_WITH_SOURCE_MAPS = frozenset(
[
*NEW_REQUIRED_ONBOARDING_TASKS,
*REQUIRED_ONBOARDING_TASKS,
OnboardingTask.SOURCEMAPS,
]
)

NEW_SKIPPABLE_TASKS = frozenset(
SKIPPABLE_TASKS = frozenset(
[
OnboardingTask.INVITE_MEMBER,
OnboardingTask.SECOND_PLATFORM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def try_mark_onboarding_complete(
# It's possible that the first project doesn't have source maps,
# but the second project (which users are guided to create in the "Add Sentry to other parts of the app" step) may have source maps.
required_tasks = (
OrganizationOnboardingTask.NEW_REQUIRED_ONBOARDING_TASKS_WITH_SOURCE_MAPS
OrganizationOnboardingTask.REQUIRED_ONBOARDING_TASKS_WITH_SOURCE_MAPS
if project_with_source_maps
else OrganizationOnboardingTask.NEW_REQUIRED_ONBOARDING_TASKS
else OrganizationOnboardingTask.REQUIRED_ONBOARDING_TASKS
)

if completed >= required_tasks:
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/onboarding_tasks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_status_lookup_by_key(self, key):
return self.Model.STATUS_LOOKUP_BY_KEY.get(key)

def get_skippable_tasks(self, organization: Organization, user: User | RpcUser | AnonymousUser):
return self.Model.NEW_SKIPPABLE_TASKS
return self.Model.SKIPPABLE_TASKS

def fetch_onboarding_tasks(self, organization, user):
raise NotImplementedError
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/api/endpoints/test_onboarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_skip_skippable_tasks(self):
"""
Test if the tasks marked as skippable in the new quick start are skipped
"""
skippable_tasks = OrganizationOnboardingTask.NEW_SKIPPABLE_TASKS
skippable_tasks = OrganizationOnboardingTask.SKIPPABLE_TASKS

def get_skipped_tasks():
return set(
Expand Down
Loading