Skip to content

Prepare bundle bindings in memory before approval - #7765

Open
shreyas-goenka wants to merge 1 commit into
mainfrom
shreyas-goenka_data/shreyas-goenka/bind-prepare-state
Open

shreyas-goenka wants to merge 1 commit into
mainfrom
shreyas-goenka_data/shreyas-goenka/bind-prepare-state

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Changes

bundle deployment bind currently writes temporary state twice before asking for approval. Prepare both planning passes in isolated memory, then persist the approved binding through one StateDB transaction.

This removes temporary binding files and changes the usual state serial increment from two to one. Resource previews, reference resolution, and approval behavior are preserved. This is the preparation layer beneath the deployment-history PRs.

Validation

  • Isolation test checks actual state/caches remain untouched during both planning passes.
  • Focused job, dashboard, pipeline, cancellation, immutable-folder, generate-and-bind, and existing DMS fault cases pass.
  • Golden changes assert the single serial increment and corresponding later deployment-version numbers.
  • Scoped lint and three review passes cover scope, correctness, and integration.

Stack: this PR → shared DMS helpers #7766 → bind history #7400 → unbind history #7401.

This PR was written by Codex.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 4307a20ac | Workflow run

Regression test report

Selected 14 changed tests (limit=20, 0 not selected)

19 tests: regression=17 unreleased=0 coverage=2 failing=0
test branch main (828e0b1) latest (v1.27.0)
TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/deployment/bind/job/job-abort-bind/DMS= ✅ ✅ ✅
TestAccept/bundle/deployment/bind/job/job-abort-bind/DMS=true ✅ ✅ ✅
TestAccept/bundle/deployment/bind/job/noop-job/DMS= ✅ ❌ ❌
TestAccept/bundle/deployment/bind/job/noop-job/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/complete_version/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/delete_deployment/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/get_operation/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/get_resource/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/get_version/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/heartbeat/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/list_deployments/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/list_operations/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/list_resources/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/list_versions/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/update_operation/DMS=true ✅ ❌ ❌
TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1141
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 1,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	actual  : "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 2,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,3 +4,3 @@
        	            	  "lineage": "[UUID]",
        	            	- "serial": 1,
        	            	+ "serial": 2,
        	            	  "state": {
        	Test:       	TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=
        	Messages:   	bundle/deployment/bind/dashboard/recreation/out.state_after_bind.json vs /tmp/TestAcceptbundledeploymentbinddashboardrecreationDMS=READ257622358/001/out.state_after_bind.json

latest (v1.27.0): same output as main (828e0b1)

TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1141
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 1,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	actual  : "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 2,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,3 +4,3 @@
        	            	  "lineage": "[UUID]",
        	            	- "serial": 1,
        	            	+ "serial": 2,
        	            	  "state": {
        	Test:       	TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1
        	Messages:   	bundle/deployment/bind/dashboard/recreation/out.state_after_bind.json vs /tmp/TestAcceptbundledeploymentbinddashboardrecreationDMS=READ3941301630/001/out.state_after_bind.json

latest (v1.27.0): same output as main (828e0b1)

TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1141
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 1,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	actual  : "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 2,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,3 +4,3 @@
        	            	  "lineage": "[UUID]",
        	            	- "serial": 1,
        	            	+ "serial": 2,
        	            	  "state": {
        	Test:       	TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=
        	Messages:   	bundle/deployment/bind/dashboard/recreation/out.state_after_bind.json vs /tmp/TestAcceptbundledeploymentbinddashboardrecreationDMS=true2503170593/001/out.state_after_bind.json

latest (v1.27.0): same output as main (828e0b1)

TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1141
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 1,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	actual  : "{\n \"state_version\": 3,\n \"cli_version\": \"[CLI_VERSION]\",\n \"lineage\": \"[UUID]\",\n \"serial\": 2,\n \"state\": {\n  \"resources.dashboards.dashboard1\": {\n   \"__id__\": \"[DASHBOARD_ID]\",\n   \"state\": {\n    \"display_name\": \"test dashboard [UNIQUE_NAME]\",\n    \"embed_credentials\": true,\n    \"etag\": [ETAG],\n    \"parent_path\": \"/Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/resources\",\n    \"published\": true,\n    \"serialized_dashboard\": \"{\\\"pages\\\":[{\\\"displayName\\\":\\\"Page One\\\",\\\"name\\\":\\\"02724bf2\\\"}]}\",\n    \"warehouse_id\": \"[TEST_DEFAULT_WAREHOUSE_ID]\"\n   }\n  }\n }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,3 +4,3 @@
        	            	  "lineage": "[UUID]",
        	            	- "serial": 1,
        	            	+ "serial": 2,
        	            	  "state": {
        	Test:       	TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1
        	Messages:   	bundle/deployment/bind/dashboard/recreation/out.state_after_bind.json vs /tmp/TestAcceptbundledeploymentbinddashboardrecreationDMS=true3574955053/001/out.state_after_bind.json

latest (v1.27.0): same output as main (828e0b1)

TestAccept/bundle/deployment/bind/job/noop-job/DMS=: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1129
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] jobs create --json {\"name\": \"My Job\"}\n\n>>> [CLI] bundle deployment bind job_1 [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> jq {serial, resource_id: .state[\"resources.jobs.job_1\"].__id__} .databricks/bundle/default/resources.json\n{\n  \"serial\": 1,\n  \"resource_id\": \"[JOB_ID]\"\n}\n\n>>> assert_not_exists.py .databricks/bundle/default/resources.json.wal .databricks/bundle/default/resources.json.temp-bind\n\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...\nUpdated jobs.job_1\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 1 changed, 0 deleted, 0 unchanged\n\n>>> [CLI] jobs get [JOB_ID] --output json\n"
        	            	actual  : "\n>>> [CLI] jobs create --json {\"name\": \"My Job\"}\n\n>>> [CLI] bundle deployment bind job_1 [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> jq {serial, resource_id: .state[\"resources.jobs.job_1\"].__id__} .databricks/bundle/default/resources.json\n{\n  \"serial\": 2,\n  \"resource_id\": \"[JOB_ID]\"\n}\n\n>>> assert_not_exists.py .databricks/bundle/default/resources.json.wal .databricks/bundle/default/resources.json.temp-bind\n\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...\nUpdated jobs.job_1\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 1 changed, 0 deleted, 0 unchanged\n\n>>> [CLI] jobs get [JOB_ID] --output json\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -9,3 +9,3 @@
        	            	 {
        	            	-  "serial": 1,
        	            	+  "serial": 2,
        	            	   "resource_id": "[JOB_ID]"
        	Test:       	TestAccept/bundle/deployment/bind/job/noop-job/DMS=
        	Messages:   	bundle/deployment/bind/job/noop-job/output.txt vs /tmp/TestAcceptbundledeploymentbindjobnoop-jobDMS=4157757153/002/output.txt

latest (v1.27.0): same output as main (828e0b1)

TestAccept/bundle/deployment/bind/job/noop-job/DMS=true: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1129
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] jobs create --json {\"name\": \"My Job\"}\n\n>>> [CLI] bundle deployment bind job_1 [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> jq {serial, resource_id: .state[\"resources.jobs.job_1\"].__id__} .databricks/bundle/default/resources.json\n{\n  \"serial\": 1,\n  \"resource_id\": \"[JOB_ID]\"\n}\n\n>>> assert_not_exists.py .databricks/bundle/default/resources.json.wal .databricks/bundle/default/resources.json.temp-bind\n\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...\nUpdated jobs.job_1\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 1 changed, 0 deleted, 0 unchanged\n\n>>> [CLI] jobs get [JOB_ID] --output json\n"
        	            	actual  : "\n>>> [CLI] jobs create --json {\"name\": \"My Job\"}\n\n>>> [CLI] bundle deployment bind job_1 [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> jq {serial, resource_id: .state[\"resources.jobs.job_1\"].__id__} .databricks/bundle/default/resources.json\n{\n  \"serial\": 2,\n  \"resource_id\": \"[JOB_ID]\"\n}\n\n>>> assert_not_exists.py .databricks/bundle/default/resources.json.wal .databricks/bundle/default/resources.json.temp-bind\n\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...\nUpdated jobs.job_1\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 1 changed, 0 deleted, 0 unchanged\n\n>>> [CLI] jobs get [JOB_ID] --output json\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -9,3 +9,3 @@
        	            	 {
        	            	-  "serial": 1,
        	            	+  "serial": 2,
        	            	   "resource_id": "[JOB_ID]"
        	Test:       	TestAccept/bundle/deployment/bind/job/noop-job/DMS=true
        	Messages:   	bundle/deployment/bind/job/noop-job/output.txt vs /tmp/TestAcceptbundledeploymentbindjobnoop-jobDMS=true1204357081/002/output.txt
FAIL

latest (v1.27.0):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1129
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] jobs create --json {\"name\": \"My Job\"}\n\n>>> [CLI] bundle deployment bind job_1 [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> jq {serial, resource_id: .state[\"resources.jobs.job_1\"].__id__} .databricks/bundle/default/resources.json\n{\n  \"serial\": 1,\n  \"resource_id\": \"[JOB_ID]\"\n}\n\n>>> assert_not_exists.py .databricks/bundle/default/resources.json.wal .databricks/bundle/default/resources.json.temp-bind\n\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...\nUpdated jobs.job_1\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 1 changed, 0 deleted, 0 unchanged\n\n>>> [CLI] jobs get [JOB_ID] --output json\n"
        	            	actual  : "\n>>> [CLI] jobs create --json {\"name\": \"My Job\"}\n\n>>> [CLI] bundle deployment bind job_1 [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> jq {serial, resource_id: .state[\"resources.jobs.job_1\"].__id__} .databricks/bundle/default/resources.json\n{\n  \"serial\": 2,\n  \"resource_id\": \"[JOB_ID]\"\n}\n\n>>> assert_not_exists.py .databricks/bundle/default/resources.json.wal .databricks/bundle/default/resources.json.temp-bind\n\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...\nUpdated jobs.job_1\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 1 changed, 0 deleted, 0 unchanged\n\n>>> [CLI] jobs get [JOB_ID] --output json\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -9,3 +9,3 @@
        	            	 {
        	            	-  "serial": 1,
        	            	+  "serial": 2,
        	            	   "resource_id": "[JOB_ID]"
        	Test:       	TestAccept/bundle/deployment/bind/job/noop-job/DMS=true
        	Messages:   	bundle/deployment/bind/job/noop-job/output.txt vs /tmp/TestAcceptbundledeploymentbindjobnoop-jobDMS=true3763291253/002/output.txt
TestAccept/bundle/dms_fault/complete_version/DMS=true: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: Diff:
        --- bundle/dms_fault/complete_version/output.txt
        +++ /tmp/TestAcceptbundledms_faultcomplete_versionDMS=true1362680843/002/output.txt
        @@ -83,7 +83,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-complete_version-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=7
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
           Updated pipelines.bar
           Files: 6 uploaded, 0 deleted
           Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
        @@ -102,7 +102,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-complete_version-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=11
           Updated jobs.foo
           Updated pipelines.bar
           Files: 2 uploaded, 0 deleted
        
    acceptance_test.go:1166: 
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:42117/deployments/4000000000000781?version=1
        LOG.commands: Created pipelines.bar
        LOG.commands: Created jobs.foo
        LOG.commands: Files: 4 uploaded, 0 deleted
        LOG.commands: Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
        LOG.commands: 
        LOG.commands: commands: ('workspace', 'get-status', '/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/state/resources.deployment.json', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "object_id": 4000000000000781,
        LOG.commands:   "object_type": "BUNDLE_DEPLOYMENT",
        LOG.commands:   "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/state/resources.deployment.json"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:42117/deployments/4000000000000781?version=2
        LOG.commands: Updated jobs.foo
        LOG.commands: Updated pipelines.bar
        LOG.commands: Files: 3 uploaded, 0 deleted
        LOG.commands: Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        LOG.commands: Warn: Failed to complete deployment history version: Fault injected by test.
        LOG.commands: 
        LOG.commands: commands: ('jobs', 'get', '8795103161540534036', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "created_time": 1795103161541,
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "job_id": 8795103161540534036,
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "settings": {
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000781",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "description": "history-true",
        LOG.commands:     "edit_mode": "UI_LOCKED",
        LOG.commands:     "email_notifications": {},
        LOG.commands:     "format": "MULTI_TASK",
        LOG.commands:     "max_concurrent_runs": 1,
        LOG.commands:     "name": "updated-dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24",
        LOG.commands:     "queue": {
        LOG.commands:       "enabled": true
        LOG.commands:     },
        LOG.commands:     "timeout_seconds": 0,
        LOG.commands:     "webhook_notifications": {}
        LOG.commands:   }
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('pipelines', 'get', '7a0e7bba-1a70-474f-7a0e-7bba1a70485b', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
        LOG.commands:   "last_modified": 1795103161538,
        LOG.commands:   "name": "updated-dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24",
        LOG.commands:   "pipeline_id": "7a0e7bba-1a70-474f-7a0e-7bba1a70485b",
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "spec": {
        LOG.commands:     "catalog": "main",
        LOG.commands:     "channel": "CURRENT",
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000781",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "edition": "ADVANCED",
        LOG.commands:     "id": "7a0e7bba-1a70-474f-7a0e-7bba1a70485b",
        LOG.commands:     "libraries": [
        LOG.commands:       {
        LOG.commands:         "file": {
        LOG.commands:           "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24/files/pipeline.sql"
        LOG.commands:         }
        LOG.commands:       }
        LOG.commands:     ],
        LOG.commands:     "name": "updated-dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24",
        LOG.commands:     "schema": "default",
        LOG.commands:     "serverless": true
        LOG.commands:   },
        LOG.commands:   "state": "IDLE"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'summary')
        LOG.commands: exit=0
        LOG.commands: Name: updated-dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24
        LOG.commands: Target: default
        LOG.commands: Workspace:
        LOG.commands:   User: tester@databricks.com
        LOG.commands:   Path: /Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-xv43qm5mbvfl5ilbgz4vmljq24
        LOG.commands: Resources:
        LOG.commands:   Jobs:
        LOG.commands:     foo:
        LOG.commands: ... (358 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- bundle/dms_fault/complete_version/output.txt
        +++ /tmp/TestAcceptbundledms_faultcomplete_versionDMS=true48242633/002/output.txt
        @@ -83,7 +83,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-complete_version-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=7
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
           Updated pipelines.bar
           Files: 6 uploaded, 0 deleted
           Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
        @@ -102,7 +102,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-complete_version-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=11
           Updated jobs.foo
           Updated pipelines.bar
           Files: 2 uploaded, 0 deleted
        
    acceptance_test.go:1166: 
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:34493/deployments/4000000000000722?version=1
        LOG.commands: Created jobs.foo
        LOG.commands: Created pipelines.bar
        LOG.commands: Files: 4 uploaded, 0 deleted
        LOG.commands: Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
        LOG.commands: 
        LOG.commands: commands: ('workspace', 'get-status', '/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/state/resources.deployment.json', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "object_id": 4000000000000722,
        LOG.commands:   "object_type": "BUNDLE_DEPLOYMENT",
        LOG.commands:   "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/state/resources.deployment.json"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:34493/deployments/4000000000000722?version=2
        LOG.commands: Updated pipelines.bar
        LOG.commands: Updated jobs.foo
        LOG.commands: Files: 3 uploaded, 0 deleted
        LOG.commands: Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        LOG.commands: Warn: Failed to complete deployment history version: Fault injected by test.
        LOG.commands: 
        LOG.commands: commands: ('jobs', 'get', '8795103182960961719', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "created_time": 1795103182961,
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "job_id": 8795103182960961719,
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "settings": {
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000722",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "description": "history-true",
        LOG.commands:     "edit_mode": "UI_LOCKED",
        LOG.commands:     "email_notifications": {},
        LOG.commands:     "format": "MULTI_TASK",
        LOG.commands:     "max_concurrent_runs": 1,
        LOG.commands:     "name": "updated-dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina",
        LOG.commands:     "queue": {
        LOG.commands:       "enabled": true
        LOG.commands:     },
        LOG.commands:     "timeout_seconds": 0,
        LOG.commands:     "webhook_notifications": {}
        LOG.commands:   }
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('pipelines', 'get', '7a0e7bbf-177a-1620-7a0e-7bbf177a1782', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
        LOG.commands:   "last_modified": 1795103182964,
        LOG.commands:   "name": "updated-dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina",
        LOG.commands:   "pipeline_id": "7a0e7bbf-177a-1620-7a0e-7bbf177a1782",
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "spec": {
        LOG.commands:     "catalog": "main",
        LOG.commands:     "channel": "CURRENT",
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000722",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "edition": "ADVANCED",
        LOG.commands:     "id": "7a0e7bbf-177a-1620-7a0e-7bbf177a1782",
        LOG.commands:     "libraries": [
        LOG.commands:       {
        LOG.commands:         "file": {
        LOG.commands:           "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina/files/pipeline.sql"
        LOG.commands:         }
        LOG.commands:       }
        LOG.commands:     ],
        LOG.commands:     "name": "updated-dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina",
        LOG.commands:     "schema": "default",
        LOG.commands:     "serverless": true
        LOG.commands:   },
        LOG.commands:   "state": "IDLE"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'summary')
        LOG.commands: exit=0
        LOG.commands: Name: updated-dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina
        LOG.commands: Target: default
        LOG.commands: Workspace:
        LOG.commands:   User: tester@databricks.com
        LOG.commands:   Path: /Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-slvsdtrj5javrfilsfhev4uina
        LOG.commands: Resources:
        LOG.commands:   Jobs:
        LOG.commands:     foo:
        LOG.commands: ... (358 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/bundle/dms_fault/delete_deployment/DMS=true: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: Diff:
        --- bundle/dms_fault/delete_deployment/output.txt
        +++ /tmp/TestAcceptbundledms_faultdelete_deploymentDMS=true361431352/002/output.txt
        @@ -82,7 +82,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-delete_deployment-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=7
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
           Updated pipelines.bar
           Files: 6 uploaded, 0 deleted
           Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
        @@ -100,7 +100,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-delete_deployment-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=11
           Updated jobs.foo
           Updated pipelines.bar
           Files: 2 uploaded, 0 deleted
        
    acceptance_test.go:1166: 
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:33911/deployments/4000000000000987?version=1
        LOG.commands: Created pipelines.bar
        LOG.commands: Created jobs.foo
        LOG.commands: Files: 4 uploaded, 0 deleted
        LOG.commands: Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
        LOG.commands: 
        LOG.commands: commands: ('workspace', 'get-status', '/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/state/resources.deployment.json', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "object_id": 4000000000000987,
        LOG.commands:   "object_type": "BUNDLE_DEPLOYMENT",
        LOG.commands:   "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/state/resources.deployment.json"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:33911/deployments/4000000000000987?version=2
        LOG.commands: Updated jobs.foo
        LOG.commands: Updated pipelines.bar
        LOG.commands: Files: 3 uploaded, 0 deleted
        LOG.commands: Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        LOG.commands: 
        LOG.commands: commands: ('jobs', 'get', '8795103164780093994', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "created_time": 1795103164780,
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "job_id": 8795103164780093994,
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "settings": {
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000987",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "description": "history-true",
        LOG.commands:     "edit_mode": "UI_LOCKED",
        LOG.commands:     "email_notifications": {},
        LOG.commands:     "format": "MULTI_TASK",
        LOG.commands:     "max_concurrent_runs": 1,
        LOG.commands:     "name": "updated-dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a",
        LOG.commands:     "queue": {
        LOG.commands:       "enabled": true
        LOG.commands:     },
        LOG.commands:     "timeout_seconds": 0,
        LOG.commands:     "webhook_notifications": {}
        LOG.commands:   }
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('pipelines', 'get', '7a0e7bba-db84-78cc-7a0e-7bbadb8479e2', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
        LOG.commands:   "last_modified": 1795103164778,
        LOG.commands:   "name": "updated-dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a",
        LOG.commands:   "pipeline_id": "7a0e7bba-db84-78cc-7a0e-7bbadb8479e2",
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "spec": {
        LOG.commands:     "catalog": "main",
        LOG.commands:     "channel": "CURRENT",
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000987",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "edition": "ADVANCED",
        LOG.commands:     "id": "7a0e7bba-db84-78cc-7a0e-7bbadb8479e2",
        LOG.commands:     "libraries": [
        LOG.commands:       {
        LOG.commands:         "file": {
        LOG.commands:           "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a/files/pipeline.sql"
        LOG.commands:         }
        LOG.commands:       }
        LOG.commands:     ],
        LOG.commands:     "name": "updated-dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a",
        LOG.commands:     "schema": "default",
        LOG.commands:     "serverless": true
        LOG.commands:   },
        LOG.commands:   "state": "IDLE"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'summary')
        LOG.commands: exit=0
        LOG.commands: Name: updated-dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a
        LOG.commands: Target: default
        LOG.commands: Workspace:
        LOG.commands:   User: tester@databricks.com
        LOG.commands:   Path: /Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a
        LOG.commands: Resources:
        LOG.commands:   Jobs:
        LOG.commands:     foo:
        LOG.commands:       Name: updated-dms-fault-delete_deployment-commands-dl5vwcgdyza2bbzdmep2unex5a
        LOG.commands: ... (357 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- bundle/dms_fault/delete_deployment/output.txt
        +++ /tmp/TestAcceptbundledms_faultdelete_deploymentDMS=true3667421913/002/output.txt
        @@ -82,7 +82,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-delete_deployment-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=7
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
           Updated pipelines.bar
           Files: 6 uploaded, 0 deleted
           Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
        @@ -100,7 +100,7 @@
         
         >>> bundle deploy --auto-approve
           Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-delete_deployment-commands-[UNIQUE_NAME]/files...
        -  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
        +  Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=11
           Updated jobs.foo
           Updated pipelines.bar
           Files: 2 uploaded, 0 deleted
        
    acceptance_test.go:1166: 
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:45263/deployments/4000000000001051?version=1
        LOG.commands: Created jobs.foo
        LOG.commands: Created pipelines.bar
        LOG.commands: Files: 4 uploaded, 0 deleted
        LOG.commands: Resources: 2 created, 0 changed, 0 deleted, 0 unchanged
        LOG.commands: 
        LOG.commands: commands: ('workspace', 'get-status', '/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/state/resources.deployment.json', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "object_id": 4000000000001051,
        LOG.commands:   "object_type": "BUNDLE_DEPLOYMENT",
        LOG.commands:   "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/state/resources.deployment.json"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'deploy', '--auto-approve')
        LOG.commands: exit=0
        LOG.commands: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:45263/deployments/4000000000001051?version=2
        LOG.commands: Updated jobs.foo
        LOG.commands: Updated pipelines.bar
        LOG.commands: Files: 3 uploaded, 0 deleted
        LOG.commands: Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        LOG.commands: 
        LOG.commands: commands: ('jobs', 'get', '8795103188058534886', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "created_time": 1795103188059,
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "job_id": 8795103188058534886,
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "settings": {
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000001051",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "description": "history-true",
        LOG.commands:     "edit_mode": "UI_LOCKED",
        LOG.commands:     "email_notifications": {},
        LOG.commands:     "format": "MULTI_TASK",
        LOG.commands:     "max_concurrent_runs": 1,
        LOG.commands:     "name": "updated-dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i",
        LOG.commands:     "queue": {
        LOG.commands:       "enabled": true
        LOG.commands:     },
        LOG.commands:     "timeout_seconds": 0,
        LOG.commands:     "webhook_notifications": {}
        LOG.commands:   }
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('pipelines', 'get', '7a0e7bc0-4748-0568-7a0e-7bc04748062f', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "effective_publishing_mode": "DEFAULT_PUBLISHING_MODE",
        LOG.commands:   "last_modified": 1795103188060,
        LOG.commands:   "name": "updated-dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i",
        LOG.commands:   "pipeline_id": "7a0e7bc0-4748-0568-7a0e-7bc04748062f",
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "spec": {
        LOG.commands:     "catalog": "main",
        LOG.commands:     "channel": "CURRENT",
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000001051",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "edition": "ADVANCED",
        LOG.commands:     "id": "7a0e7bc0-4748-0568-7a0e-7bc04748062f",
        LOG.commands:     "libraries": [
        LOG.commands:       {
        LOG.commands:         "file": {
        LOG.commands:           "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i/files/pipeline.sql"
        LOG.commands:         }
        LOG.commands:       }
        LOG.commands:     ],
        LOG.commands:     "name": "updated-dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i",
        LOG.commands:     "schema": "default",
        LOG.commands:     "serverless": true
        LOG.commands:   },
        LOG.commands:   "state": "IDLE"
        LOG.commands: }
        LOG.commands: 
        LOG.commands: commands: ('bundle', 'summary')
        LOG.commands: exit=0
        LOG.commands: Name: updated-dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i
        LOG.commands: Target: default
        LOG.commands: Workspace:
        LOG.commands:   User: tester@databricks.com
        LOG.commands:   Path: /Workspace/Users/tester@databricks.com/.bundle/dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i
        LOG.commands: Resources:
        LOG.commands:   Jobs:
        LOG.commands:     foo:
        LOG.commands:       Name: updated-dms-fault-delete_deployment-commands-muhcljgy75foxolfvcp2t4274i
        LOG.commands: ... (357 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
FAIL

9 more failure details omitted, see the full report in the run.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 4307a20

Run: 44557007800

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 280 31 20:59
💚​ aws-windows-latest-4core-16gb 1 282 29 16:28
💚​ azure linux-2core-8gb 1 279 31 20:47
💚​ azure-windows-latest-4core-16gb 1 281 29 14:48
💚​ gcp linux-2core-8gb 1 280 31 17:53
💚​ gcp-windows-latest-4core-16gb 1 282 29 12:31
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 50 slowest tests (at least 2 minutes):
duration env testname
7:36 azure linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1
7:34 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
6:52 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
6:23 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
6:14 gcp-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1
5:43 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
5:19 gcp-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=
5:12 azure-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
5:08 aws-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1
5:07 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat
4:58 aws-windows-latest-4core-16gb TestImportDir
4:55 aws-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=
4:51 azure linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=
4:47 gcp-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1
4:43 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
4:31 azure-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=
4:28 aws linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1
4:28 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
4:27 aws linux-2core-8gb TestFilerReadDir/workspace_files_extensions
4:19 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
4:18 azure-windows-latest-4core-16gb TestSyncIncrementalFileSync
4:08 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
4:06 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
4:05 gcp linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=
4:03 aws-windows-latest-4core-16gb TestFilerWorkspaceNotebook/sqlJupyterNotebook.ipynb
3:51 azure-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=
3:51 gcp linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=true/READPLAN=1
3:47 aws-windows-latest-4core-16gb TestAccept
3:47 azure linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=
3:45 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
3:44 gcp-windows-latest-4core-16gb TestAccept
3:43 azure-windows-latest-4core-16gb TestAccept
3:42 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files
3:40 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
3:37 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
3:36 azure-windows-latest-4core-16gb TestAccept/bundle/deployment/bind/job/job-abort-bind/DMS=
3:29 aws linux-2core-8gb TestSyncIncrementalFileSync
3:26 gcp linux-2core-8gb TestImportDirWithOverwriteFlag
3:21 azure linux-2core-8gb TestImportDirDoesNotOverwrite
3:19 aws linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=
3:16 aws-windows-latest-4core-16gb TestSyncIncrementalFileSync
3:12 gcp-windows-latest-4core-16gb TestSyncFullFileSync
3:11 aws-windows-latest-4core-16gb TestFilerReadWrite/workspace_files
3:07 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files
3:07 aws-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
3:01 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsStat
3:01 azure linux-2core-8gb TestAccept/bundle/deployment/bind/dashboard/recreation/DMS=/READPLAN=1
3:01 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:58 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:56 gcp-windows-latest-4core-16gb TestImportDirDoesNotOverwrite

@shreyas-goenka
shreyas-goenka force-pushed the shreyas-goenka_data/shreyas-goenka/bind-prepare-state branch 3 times, most recently from 758f928 to 8254700 Compare November 18, 2026 14:35
"cli_version": "[CLI_VERSION]",
"lineage": "[UUID]",
"serial": 2,
"serial": 1,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bundle deployment bind increments serial by 2. This PR fixes that - now the increment is 1. That's why the serial goes down here.

>>> bundle deploy --auto-approve
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-fault-complete_version-commands-[UNIQUE_NAME]/files...
Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=9
Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=7

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We bind a job and a pipeline in these tests. Because now the serial is only +1 then, the final version goes down by 2 (since 2 binds happened, +4 -> +2)

Comment thread bundle/phases/bind.go
return
}
resource := result.Resource
if err := db.SaveState(ctx, resourceKey, resource.ID, resource.State, resource.DependsOn); err != nil {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the crux and the setup for DMS. This SaveState call will also record the bind operation in DMS in a followup.

Without this refactor, we would need to keep StateDB as is here, and record the bind operation completely separately in an independent code path, once the bind was approved.

Comment thread bundle/phases/bind.go
logdiag.LogError(ctx, err)
return
}
if _, err := db.Finalize(ctx); err != nil {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now the +1 serial associated with bind.

Comment thread bundle/direct/bind.go
}

// Save state with ID and empty state (like migrate does)
err = b.StateDB.SaveState(ctx, resourceKey, resourceID, struct{}{}, nil)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first serial +1 previously. This just persists the resource ID into state. To set the stage to compute a plan and then use the state from the plan to persist into state.

Comment thread bundle/direct/bind.go
return nil, err
}

err = b.StateDB.SaveState(ctx, resourceKey, resourceID, compacted, dependsOn)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second serial +1, adding the computed state from plan into resources.json

@shreyas-goenka
shreyas-goenka marked this pull request as ready for review November 19, 2026 11:45
@shreyas-goenka
shreyas-goenka requested review from a team as code owners November 19, 2026 11:45
@shreyas-goenka
shreyas-goenka force-pushed the shreyas-goenka_data/shreyas-goenka/bind-prepare-state branch from 8254700 to 7e80982 Compare November 19, 2026 11:46
@andrewnester
andrewnester self-requested a review November 19, 2026 11:46
@shreyas-goenka
shreyas-goenka force-pushed the shreyas-goenka_data/shreyas-goenka/bind-prepare-state branch from 7e80982 to 83ec890 Compare November 19, 2026 11:55

@andrewnester andrewnester left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking findings from a full pass; I'll take a manual look at the direct, phases changes before approving.

@shreyas-goenka
shreyas-goenka force-pushed the shreyas-goenka_data/shreyas-goenka/bind-prepare-state branch from 83ec890 to 4307a20 Compare November 19, 2026 15:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants