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: NEXT_CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@
7
7
### CLI
8
8
9
9
### Bundles
10
+
*`bundle deployment migrate` will now run a plan before migration to check if deployment was done ([#4088](https://github.com/databricks/cli/pull/4088))
11
+
* engine/direct: Increase "serial" in state file after every deployment ([#4115](https://github.com/databricks/cli/pull/4115))
Error: Required engine "terraform" does not match present state files. Clear "DATABRICKS_BUNDLE_ENGINE" env var to use engine appropriate for the state.
38
40
39
41
Available state files:
40
42
- terraform.tfstate: remote terraform state serial=4 lineage="[UUID]"
41
-
- [TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=5 lineage="[UUID]"
43
+
- [TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=6 lineage="[UUID]"
42
44
43
45
44
46
=== Should show that it's already migrated
45
47
>>> musterr [CLI] bundle deployment migrate
46
48
Error: already using direct engine
47
-
Details: [TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=5 lineage="[UUID]"
49
+
Details: [TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=6 lineage="[UUID]"
48
50
49
51
>>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan
50
52
update pipelines.test_pipeline
@@ -95,14 +97,14 @@ Deployment complete!
95
97
=== Should show that it's already migrated
96
98
>>> musterr [CLI] bundle deployment migrate
97
99
Error: already using direct engine
98
-
Details: [TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=5 lineage="[UUID]"
100
+
Details: [TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=7 lineage="[UUID]"
99
101
100
102
>>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle debug states
101
-
[TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=5 lineage="[UUID]"
103
+
[TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=7 lineage="[UUID]"
102
104
103
105
>>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle debug states --force-pull
104
-
resources.json: remote direct state serial=5 lineage="[UUID]"
105
-
[TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=5 lineage="[UUID]"
106
+
resources.json: remote direct state serial=7 lineage="[UUID]"
107
+
[TEST_TMP_DIR]/.databricks/bundle/dev/resources.json: local direct state serial=7 lineage="[UUID]"
Error: Required engine "terraform" does not match present state files. Clear "DATABRICKS_BUNDLE_ENGINE" env var to use engine appropriate for the state.
28
30
29
31
Available state files:
30
32
- terraform.tfstate: remote terraform state serial=1 lineage="[UUID]"
31
-
- [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=2 lineage="[UUID]"
33
+
- [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=3 lineage="[UUID]"
32
34
33
35
34
36
>>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan
@@ -52,11 +54,11 @@ Deployment complete!
52
54
=== Should show that it's already migrated
53
55
>>> musterr [CLI] bundle deployment migrate
54
56
Error: already using direct engine
55
-
Details: [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=2 lineage="[UUID]"
57
+
Details: [TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=4 lineage="[UUID]"
56
58
57
59
>>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle debug states
58
-
[TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=2 lineage="[UUID]"
60
+
[TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=4 lineage="[UUID]"
59
61
60
62
>>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle debug states --force-pull
61
-
resources.json: remote direct state serial=2 lineage="[UUID]"
62
-
[TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=2 lineage="[UUID]"
63
+
resources.json: remote direct state serial=4 lineage="[UUID]"
64
+
[TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=4 lineage="[UUID]"
Copy file name to clipboardExpand all lines: acceptance/bundle/migrate/default-python/output.txt
+20-2Lines changed: 20 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
+
Note: 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".
0 commit comments