Skip to content

Commit b5dfe3f

Browse files
htahir1claude
andauthored
Add pipeline deployment to onboarding (#4231)
* Add snapshot creation and deployment tracking to onboarding This adds backend support for tracking two new onboarding steps related to pipeline snapshots: snapshot creation and deployment. These steps help guide users through the workflow of creating and deploying pipeline snapshots. Changes: - Add SNAPSHOT_CREATED and SNAPSHOT_DEPLOYED enum values to OnboardingStep - Track SNAPSHOT_CREATED in create_snapshot method when users create a snapshot - Track SNAPSHOT_DEPLOYED in create_deployment method when users deploy a snapshot This implements backend support for zenml-io/zenml-dashboard#913 * Only track SNAPSHOT_CREATED for user-created named snapshots Modified the SNAPSHOT_CREATED onboarding tracking to only fire for user-created snapshots with names, not for internal system-generated snapshots created during pipeline runs. This prevents false positives in the onboarding flow. When run_snapshot is called internally, it creates unnamed snapshots that shouldn't count toward user onboarding progress. * Update src/zenml/zen_stores/sql_zen_store.py * Remove SNAPSHOT_CREATED tracking from onboarding Based on product feedback, removed SNAPSHOT_CREATED enum and tracking since snapshot creation and deployment happen in the same onboarding step (collapsible section). Only SNAPSHOT_DEPLOYED tracking remains to mark when users deploy their pipeline. This aligns with the simplified onboarding flow where users will directly deploy pipelines via `zenml pipeline deploy` command. * Clean up merge conflict markers - remove SNAPSHOT_CREATED tracking * Rename to PIPELINE_DEPLOYED and gate onboarding completion Changes: - Renamed SNAPSHOT_DEPLOYED to PIPELINE_DEPLOYED to align with new terminology - Moved OSS_ONBOARDING_COMPLETED and PRO_ONBOARDING_COMPLETED to trigger only when PIPELINE_DEPLOYED event fires (when user deploys a pipeline) - Removed automatic onboarding completion from pipeline run logic This ensures users must complete the full onboarding flow including deployment before onboarding is marked as complete. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 678a5a3 commit b5dfe3f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/zenml/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ class OnboardingStep(StrEnum):
507507
PIPELINE_RUN_WITH_REMOTE_ARTIFACT_STORE = (
508508
"pipeline_run_with_remote_artifact_store"
509509
)
510+
PIPELINE_DEPLOYED = "pipeline_deployed"
510511
OSS_ONBOARDING_COMPLETED = "oss_onboarding_completed"
511512
PRO_ONBOARDING_COMPLETED = "pro_onboarding_completed"
512513

src/zenml/zen_stores/sql_zen_store.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5298,6 +5298,17 @@ def create_deployment(
52985298
)
52995299

53005300
session.refresh(deployment_schema)
5301+
5302+
# Track deployment and mark onboarding as completed
5303+
self._update_onboarding_state(
5304+
completed_steps={
5305+
OnboardingStep.PIPELINE_DEPLOYED,
5306+
OnboardingStep.OSS_ONBOARDING_COMPLETED,
5307+
OnboardingStep.PRO_ONBOARDING_COMPLETED,
5308+
},
5309+
session=session,
5310+
)
5311+
53015312
return deployment_schema.to_model(
53025313
include_metadata=True, include_resources=True
53035314
)
@@ -10767,7 +10778,6 @@ def _update_pipeline_run_status(
1076710778

1076810779
completed_onboarding_steps: Set[str] = {
1076910780
OnboardingStep.PIPELINE_RUN,
10770-
OnboardingStep.OSS_ONBOARDING_COMPLETED,
1077110781
}
1077210782
if stack_metadata["orchestrator"] not in {
1077310783
"local",
@@ -10782,7 +10792,6 @@ def _update_pipeline_run_status(
1078210792
completed_onboarding_steps.update(
1078310793
{
1078410794
OnboardingStep.PIPELINE_RUN_WITH_REMOTE_ARTIFACT_STORE,
10785-
OnboardingStep.PRO_ONBOARDING_COMPLETED,
1078610795
}
1078710796
)
1078810797

0 commit comments

Comments
 (0)