You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: acceptance/bundle/migrate/default-python/output.txt
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,20 @@ Deployment complete!
22
22
23
23
>>> print_state.py
24
24
25
-
>>> [CLI] bundle deployment migrate
25
+
>>> musterr [CLI] bundle deployment migrate
26
+
Building python_artifact...
27
+
Migration should be done after a full deploy. Running plan now to verify that deployment was done:
28
+
Building python_artifact...
29
+
update jobs.sample_job
30
+
31
+
Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged
32
+
Error: 'databricks bundle plan' shows actions planned, aborting migration. Please run 'databricks bundle deploy' first to ensure your bundle is up to date, If actions persist after deploy, skip plan check with --noplancheck option
33
+
34
+
>>> [CLI] bundle deployment migrate --noplancheck
26
35
Building python_artifact...
27
36
Migrated 2 resources to direct engine state file: [TEST_TMP_DIR]/my_default_python/.databricks/bundle/dev/resources.json
28
37
29
-
Validate the migration by running "bundle plan", there should be no actions planned.
38
+
Validate the migration by running "databricks bundle plan", there should be no actions planned.
30
39
31
40
The state file is not synchronized to the workspace yet. To do that and finalize the migration, run "bundle deploy".
returnfmt.Errorf("bundle plan failed with %s, aborting migration. To proceed with migration anyway, re-run the command with --noplancheck option", msg)
66
+
}
67
+
68
+
if!strings.Contains(output, "Plan:") {
69
+
returnfmt.Errorf("cannot parse 'databricks bundle plan%s' output, aborting migration. Skip plan check with --noplancheck option", targetArgs)
70
+
}
71
+
72
+
if!strings.Contains(output, "Plan: 0 to add, 0 to change, 0 to delete") {
73
+
returnfmt.Errorf("'databricks bundle plan%s' shows actions planned, aborting migration. Please run 'databricks bundle deploy%s' first to ensure your bundle is up to date, If actions persist after deploy, skip plan check with --noplancheck option", targetArgs, targetArgs)
74
+
}
75
+
76
+
returnnil
77
+
}
78
+
22
79
funcnewMigrateCommand() *cobra.Command {
23
80
cmd:=&cobra.Command{
24
81
Use: "migrate",
@@ -36,7 +93,20 @@ WARNING: Both direct deployment engine and this command are experimental and not
36
93
Args: root.NoArgs,
37
94
}
38
95
96
+
varnoPlanCheckbool
97
+
cmd.Flags().BoolVar(&noPlanCheck, "noplancheck", false, "Skip running bundle plan before migration.")
0 commit comments