Skip to content

Record deployment history for bundle deployment unbind - #8204

Draft
shreyas-goenka wants to merge 5 commits into
shreyas-goenka_data/shreyas-goenka/dms-history-helpersfrom
shreyas-goenka_data/shreyas-goenka/unbind-history-v2
Draft

shreyas-goenka wants to merge 5 commits into
shreyas-goenka_data/shreyas-goenka/dms-history-helpersfrom
shreyas-goenka_data/shreyas-goenka/unbind-history-v2

Conversation

@shreyas-goenka

Copy link
Copy Markdown
Contributor

Changes

Record bundle deployment unbind in deployment history: a version with one UPDATE operation per removed state entry (the resource plus its permissions/grants), each carrying no state, which is how the service drops the resource from the deployment. Recording is best effort and runs after the state commit, as bind's does: a failed history upload warns and fails the version, not the unbind. The workspace resources are untouched. An already-unbound resource records no version. A resource type the service does not know (such as feature_specs) unbinds as before and warns.

Why

Bind records history (#7817) but unbind did not, so a bind followed by an unbind left the service believing the resource was still managed. This completes the pair using the helpers from #8201.

Tests

  • dms/bind-unbind: unbind records a version whose operation carries no state, list-resources then shows the resource gone, and an already-unbound resource records nothing.
  • dms/bind-upload-failure: a failed history upload warns, fails the version, and the resource is still out of remote state.
  • dms_fault/*: each injected fault now also warns on the unbind step, and the unbind still succeeds.
  • Plain (non-DMS) unbind suites are unchanged.

This pull request and its description were written by Isaac.

shreyas-goenka and others added 3 commits November 30, 2026 13:29
Unbind now records a version with one UPDATE operation per removed state
entry (the resource and its permissions/grants), each carrying no state, which
is how the service learns the resource left the deployment. Recording is best
effort and runs after the state commit, as bind's does; a failed history
upload warns and fails the version, not the unbind. The workspace resources are
untouched, and an already-unbound resource records no version.

direct.Unbind returns the removed entries and the serial so the phase can
record them, mirroring Bind's DMSBindMetadata.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: d6839ea6b | Workflow run

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

19 tests: regression=9 unreleased=0 coverage=10 failing=0
test branch main (c137506) latest (v1.28.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/feature_spec/DMS=/OUTPUT_MODE=plain ✅ ✅ ✅
TestAccept/bundle/deployment/bind/feature_spec/DMS=true/OUTPUT_MODE=recorded ✅ ❌ ❌
TestAccept/bundle/deployment/bind/pipelines/recreate/DMS= ✅ ✅ ✅
TestAccept/bundle/deployment/bind/pipelines/recreate/DMS=true ✅ ✅ ✅
TestAccept/bundle/deployment/bind/pipelines/update/DMS= ✅ ✅ ✅
TestAccept/bundle/deployment/bind/pipelines/update/DMS=true ✅ ✅ ✅
TestAccept/bundle/dms/bind-immutable/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/bind-unbind/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/bind-upload-failure/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/suppress-transport-warnings/DMS=true ✅ ✅ ✅
TestAccept/bundle/dms_fault/complete_version/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/create_deployment/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/create_version/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/get_deployment/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms_fault/update_operation/DMS=true ✅ ❌ ❌
TestAccept/bundle/deployment/bind/feature_spec/DMS=true/OUTPUT_MODE=recorded: branch ✅ | main (c137506) ❌ | latest (v1.28.0) ❌

main (c137506):

acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle deployment bind spec1 main.fspec_[UNIQUE_NAME].boundspec --auto-approve\nWarn: Failed to record deployment history for bind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1\nSuccessfully bound feature_spec with an id 'main.fspec_[UNIQUE_NAME].boundspec'\nRun 'bundle deploy' to deploy changes to your workspace\n"
        	            	actual  : "\n>>> [CLI] bundle deployment bind spec1 main.fspec_[UNIQUE_NAME].boundspec --auto-approve\nSuccessfully bound feature_spec with an id 'main.fspec_[UNIQUE_NAME].boundspec'\nRun 'bundle deploy' to deploy changes to your workspace\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,2 @@
        	            	 >>> [CLI] bundle deployment bind spec1 main.fspec_[UNIQUE_NAME].boundspec --auto-approve
        	            	-Warn: Failed to record deployment history for bind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1
        	            	 Successfully bound feature_spec with an id 'main.fspec_[UNIQUE_NAME].boundspec'
        	Test:       	TestAccept/bundle/deployment/bind/feature_spec/DMS=true/OUTPUT_MODE=recorded
        	Messages:   	bundle/deployment/bind/feature_spec/out.bind.recorded.txt vs /tmp/TestAcceptbundledeploymentbindfeature_specDMS=trueOUTPUT_M2751561012/001/out.bind.recorded.txt
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle deployment unbind spec1\nWarn: Failed to record deployment history for unbind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1\n"
        	            	actual  : "\n>>> [CLI] bundle deployment unbind spec1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,2 @@
        	            	 >>> [CLI] bundle deployment unbind spec1
        	            	-Warn: Failed to record deployment history for unbind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1
        	            	 
        	Test:       	TestAccept/bundle/deployment/bind/feature_spec/DMS=true/OUTPUT_MODE=recorded
        	Messages:   	bundle/deployment/bind/feature_spec/out.unbind.recorded.txt vs /tmp/TestAcceptbundledeploymentbindfeature_specDMS=trueOUTPUT_M2751561012/001/out.unbind.recorded.txt
    acceptance_test.go:1180: 
        LOG.cleanup: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/test-bind-feature-spec-ooanwxgcgbbrloak5yr6bbp56i/default
        LOG.cleanup: 
        LOG.cleanup: Destroy: 0 deleted

latest (v1.28.0):

acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle deployment bind spec1 main.fspec_[UNIQUE_NAME].boundspec --auto-approve\nWarn: Failed to record deployment history for bind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1\nSuccessfully bound feature_spec with an id 'main.fspec_[UNIQUE_NAME].boundspec'\nRun 'bundle deploy' to deploy changes to your workspace\n"
        	            	actual  : "\n>>> [CLI] bundle deployment bind spec1 main.fspec_[UNIQUE_NAME].boundspec --auto-approve\nSuccessfully bound feature_spec with an id 'main.fspec_[UNIQUE_NAME].boundspec'\nRun 'bundle deploy' to deploy changes to your workspace\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,2 @@
        	            	 >>> [CLI] bundle deployment bind spec1 main.fspec_[UNIQUE_NAME].boundspec --auto-approve
        	            	-Warn: Failed to record deployment history for bind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1
        	            	 Successfully bound feature_spec with an id 'main.fspec_[UNIQUE_NAME].boundspec'
        	Test:       	TestAccept/bundle/deployment/bind/feature_spec/DMS=true/OUTPUT_MODE=recorded
        	Messages:   	bundle/deployment/bind/feature_spec/out.bind.recorded.txt vs /tmp/TestAcceptbundledeploymentbindfeature_specDMS=trueOUTPUT_M3291092825/001/out.bind.recorded.txt
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle deployment unbind spec1\nWarn: Failed to record deployment history for unbind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1\n"
        	            	actual  : "\n>>> [CLI] bundle deployment unbind spec1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,2 @@
        	            	 >>> [CLI] bundle deployment unbind spec1
        	            	-Warn: Failed to record deployment history for unbind: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): feature_specs.spec1
        	            	 
        	Test:       	TestAccept/bundle/deployment/bind/feature_spec/DMS=true/OUTPUT_MODE=recorded
        	Messages:   	bundle/deployment/bind/feature_spec/out.unbind.recorded.txt vs /tmp/TestAcceptbundledeploymentbindfeature_specDMS=trueOUTPUT_M3291092825/001/out.unbind.recorded.txt
    acceptance_test.go:1180: 
        LOG.cleanup: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/test-bind-feature-spec-ynjvzy4q4rcbtgzhsr4ncmqarm/default
        LOG.cleanup: 
        LOG.cleanup: Destroy: 0 deleted
TestAccept/bundle/dms/bind-immutable/DMS=true: branch ✅ | main (c137506) ❌ | latest (v1.28.0) ❌

main (c137506):

acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle deployment bind foo [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\n\n>>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json\n[\n  {\n    \"last_action_type\": \"OPERATION_ACTION_TYPE_UPDATE\",\n    \"resource_id\": \"[JOB_ID]\",\n    \"resource_key\": \"jobs.foo\"\n  }\n]\n\n=== Bind uploads no files, so the deployment records no file_path\n\n>>> MSYS_NO_PATHCONV=1 [CLI] api get /api/2.0/bundle/deployments/[DEPLOYMENT_ID]\n{\n  \"root_path\": \"/Workspace/Users/[USERNAME]/.bundle/dms-bind-immutable-[UNIQUE_NAME]/default\"\n}\n"
        	            	actual  : "\n>>> [CLI] bundle deployment bind foo [JOB_ID] --auto-approve\nSuccessfully bound job with an id '[JOB_ID]'\nRun 'bundle deploy' to deploy changes to your workspace\nError: Path (/Workspace/Users/[USERNAME]/.bundle/dms-bind-immutable-[UNIQUE_NAME]/default/state/resources.deployment.json) doesn't exist.\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,18 +4,5 @@
        	            	 Run 'bundle deploy' to deploy changes to your workspace
        	            	+Error: Path (/Workspace/Users/[USERNAME]/.bundle/dms-bind-immutable-[UNIQUE_NAME]/default/state/resources.deployment.json) doesn't exist.
        	            	 
        	            	->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        	            	-[
        	            	-  {
        	            	-    "last_action_type": "OPERATION_ACTION_TYPE_UPDATE",
        	            	-    "resource_id": "[JOB_ID]",
        	            	-    "resource_key": "jobs.foo"
        	            	-  }
        	            	-]
        	            	+Exit code: 1
        	            	 
        	            	-=== Bind uploads no files, so the deployment records no file_path
        	            	-
        	            	->>> MSYS_NO_PATHCONV=1 [CLI] api get /api/2.0/bundle/deployments/[DEPLOYMENT_ID]
        	            	-{
        	            	-  "root_path": "/Workspace/Users/[USERNAME]/.bundle/dms-bind-immutable-[UNIQUE_NAME]/default"
        	            	-}
        	            	-
        	Test:       	TestAccept/bundle/dms/bind-immutable/DMS=true
        	Messages:   	bundle/dms/bind-immutable/output.txt vs /tmp/TestAcceptbundledmsbind-immutableDMS=true581207248/002/output.txt

latest (v1.28.0): same output as main (c137506)

TestAccept/bundle/dms/bind-unbind/DMS=true: branch ✅ | main (c137506) ❌ | latest (v1.28.0) ❌

main (c137506):

acceptance_test.go:1402: Diff:
        --- bundle/dms/bind-unbind/output.txt
        +++ /tmp/TestAcceptbundledmsbind-unbindDMS=true1186315630/002/output.txt
        @@ -24,158 +24,17 @@
         >>> jq {serial, features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
         {
           "serial": 2,
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        +  "features": null,
           "resource_id": "[JOB_ID]"
         }
         
         >>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "2"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/2/operations/jobs.foo", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[JOB_ID]", "sequence_id": 0, "state": "{\"state\":{\"deployment\":{\"kind\":\"BUNDLE\",\"metadata_file_path\":\"/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/metadata.json\"},\"edit_mode\":\"UI_LOCKED\",\"format\":\"MULTI_TASK\",\"max_concurrent_runs\":1,\"name\":\"foo\",\"queue\":{\"enabled\":true}}}", "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/2/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
         
         >>> [CLI] jobs get [JOB_ID]
         {
           "job_id": [JOB_ID],
           "name": "bind-target-[UNIQUE_NAME]"
         }
        +Error: Path (/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/resources.deployment.json) doesn't exist.
         
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -[
        -  {
        -    "last_action_type": "OPERATION_ACTION_TYPE_UPDATE",
        -    "resource_id": "[JOB_ID]",
        -    "resource_key": "jobs.foo"
        -  }
        -]
        -
        -=== Deploy keeps the bound job ID with recorded history
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/files...
        -Updated jobs.foo
        -Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        -=== Unbind preserves the shadow history marker and leaves the job intact
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> jq {features, state} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "state": {}
        -}
        -
        ->>> [CLI] jobs get [JOB_ID]
        -{
        -  "job_id": [JOB_ID]
        -}
        -
        -=== Unbind records a version whose operation carries no state, so the service drops the resource
        -
        ->>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "4"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "previous_version_id": "3", "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/4/operations/jobs.foo", "q": {"update_mask": "state,error_message,status"}, "body": {"error_message": "", "sequence_id": 0, "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/4/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -[]
        -
        -=== Unbinding an already unbound resource records no version
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> print_requests.py --dms //versions
        -
        -=== Rebind preserves the existing shadow history marker without configuration
        -
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY= [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Successfully bound job with an id '[JOB_ID]'
        -Run 'bundle deploy' to deploy changes to your workspace
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        ->>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "7"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "previous_version_id": "4", "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/7/operations/jobs.foo", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[JOB_ID]", "sequence_id": 0, "state": "{\"state\":{\"deployment\":{\"kind\":\"BUNDLE\",\"metadata_file_path\":\"/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/metadata.json\"},\"edit_mode\":\"UI_LOCKED\",\"format\":\"MULTI_TASK\",\"max_concurrent_runs\":1,\"name\":\"foo\",\"queue\":{\"enabled\":true}}}", "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/7/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
        -
        -=== An explicit false drops the marker, so this bind records no history
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=false [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Successfully bound job with an id '[JOB_ID]'
        -Run 'bundle deploy' to deploy changes to your workspace
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": null,
        -  "resource_id": "[JOB_ID]"
        -}
        -
        ->>> print_requests.py --dms //versions
        -
        -=== An explicit true restores the marker
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Successfully bound job with an id '[JOB_ID]'
        -Run 'bundle deploy' to deploy changes to your workspace
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        ->>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "13"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "previous_version_id": "8", "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/13/operations/jobs.foo", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[JOB_ID]", "sequence_id": 0, "state": "{\"state\":{\"deployment\":{\"kind\":\"BUNDLE\",\"metadata_file_path\":\"/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/metadata.json\"},\"edit_mode\":\"UI_LOCKED\",\"format\":\"MULTI_TASK\",\"max_concurrent_runs\":1,\"name\":\"foo\",\"queue\":{\"enabled\":true}}}", "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/13/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
        -
        -=== A subsequent deploy continues managing the same job
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        -=== A rejected duplicate bind creates no history version
        -
        ->>> musterr [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Error: Resource already managed
        -
        -The bundle is already managing resource for resources.jobs.foo and it is bound to the requested ID [JOB_ID].
        -
        -
        ->>> print_requests.py --dms //versions
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.cleanup: The following resources will be deleted:
        LOG.cleanup:   delete resources.jobs.foo
        LOG.cleanup: 
        LOG.cleanup: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/dms-bind-unbind-k5sfrvjd25c4fai22zli5vproa/default
        LOG.cleanup: 
        LOG.cleanup: Destroy: 1 deleted

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/dms/bind-unbind/output.txt
        +++ /tmp/TestAcceptbundledmsbind-unbindDMS=true1161800414/002/output.txt
        @@ -24,158 +24,17 @@
         >>> jq {serial, features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
         {
           "serial": 2,
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        +  "features": null,
           "resource_id": "[JOB_ID]"
         }
         
         >>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "2"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/2/operations/jobs.foo", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[JOB_ID]", "sequence_id": 0, "state": "{\"state\":{\"deployment\":{\"kind\":\"BUNDLE\",\"metadata_file_path\":\"/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/metadata.json\"},\"edit_mode\":\"UI_LOCKED\",\"format\":\"MULTI_TASK\",\"max_concurrent_runs\":1,\"name\":\"foo\",\"queue\":{\"enabled\":true}}}", "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/2/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
         
         >>> [CLI] jobs get [JOB_ID]
         {
           "job_id": [JOB_ID],
           "name": "bind-target-[UNIQUE_NAME]"
         }
        +Error: Path (/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/resources.deployment.json) doesn't exist.
         
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -[
        -  {
        -    "last_action_type": "OPERATION_ACTION_TYPE_UPDATE",
        -    "resource_id": "[JOB_ID]",
        -    "resource_key": "jobs.foo"
        -  }
        -]
        -
        -=== Deploy keeps the bound job ID with recorded history
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/files...
        -Updated jobs.foo
        -Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        -=== Unbind preserves the shadow history marker and leaves the job intact
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> jq {features, state} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "state": {}
        -}
        -
        ->>> [CLI] jobs get [JOB_ID]
        -{
        -  "job_id": [JOB_ID]
        -}
        -
        -=== Unbind records a version whose operation carries no state, so the service drops the resource
        -
        ->>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "4"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "previous_version_id": "3", "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/4/operations/jobs.foo", "q": {"update_mask": "state,error_message,status"}, "body": {"error_message": "", "sequence_id": 0, "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/4/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -[]
        -
        -=== Unbinding an already unbound resource records no version
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> print_requests.py --dms //versions
        -
        -=== Rebind preserves the existing shadow history marker without configuration
        -
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY= [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Successfully bound job with an id '[JOB_ID]'
        -Run 'bundle deploy' to deploy changes to your workspace
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        ->>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "7"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "previous_version_id": "4", "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/7/operations/jobs.foo", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[JOB_ID]", "sequence_id": 0, "state": "{\"state\":{\"deployment\":{\"kind\":\"BUNDLE\",\"metadata_file_path\":\"/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/metadata.json\"},\"edit_mode\":\"UI_LOCKED\",\"format\":\"MULTI_TASK\",\"max_concurrent_runs\":1,\"name\":\"foo\",\"queue\":{\"enabled\":true}}}", "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/7/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
        -
        -=== An explicit false drops the marker, so this bind records no history
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=false [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Successfully bound job with an id '[JOB_ID]'
        -Run 'bundle deploy' to deploy changes to your workspace
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": null,
        -  "resource_id": "[JOB_ID]"
        -}
        -
        ->>> print_requests.py --dms //versions
        -
        -=== An explicit true restores the marker
        -
        ->>> [CLI] bundle deployment unbind foo
        -
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Successfully bound job with an id '[JOB_ID]'
        -Run 'bundle deploy' to deploy changes to your workspace
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        ->>> print_requests.py --dms //versions --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions", "q": {"version_id": "13"}, "body": {"cli_version": "[CLI_VERSION]", "operations": [{"action_type": "OPERATION_ACTION_TYPE_UPDATE", "resource_key": "jobs.foo"}], "previous_version_id": "8", "version_type": "VERSION_TYPE_DEPLOY"}}
        -{"method": "PATCH", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/13/operations/jobs.foo", "q": {"update_mask": "state,error_message,resource_id,status"}, "body": {"error_message": "", "resource_id": "[JOB_ID]", "sequence_id": 0, "state": "{\"state\":{\"deployment\":{\"kind\":\"BUNDLE\",\"metadata_file_path\":\"/Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/state/metadata.json\"},\"edit_mode\":\"UI_LOCKED\",\"format\":\"MULTI_TASK\",\"max_concurrent_runs\":1,\"name\":\"foo\",\"queue\":{\"enabled\":true}}}", "status": "OPERATION_STATUS_SUCCEEDED"}}
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/13/complete", "body": {"completion_reason": "VERSION_COMPLETE_SUCCESS"}}
        -
        -=== A subsequent deploy continues managing the same job
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-bind-unbind-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
        -
        ->>> jq {features, resource_id: .state["resources.jobs.foo"].__id__} .databricks/bundle/default/resources.json
        -{
        -  "features": {
        -    "deployment_history_shadow": {}
        -  },
        -  "resource_id": "[JOB_ID]"
        -}
        -
        -=== A rejected duplicate bind creates no history version
        -
        ->>> musterr [CLI] bundle deployment bind foo [JOB_ID] --auto-approve
        -Error: Resource already managed
        -
        -The bundle is already managing resource for resources.jobs.foo and it is bound to the requested ID [JOB_ID].
        -
        -
        ->>> print_requests.py --dms //versions
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.cleanup: The following resources will be deleted:
        LOG.cleanup:   delete resources.jobs.foo
        LOG.cleanup: 
        LOG.cleanup: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/dms-bind-unbind-362tpsunnjbejl6jvxylmgzpsu/default
        LOG.cleanup: 
        LOG.cleanup: Destroy: 1 deleted
TestAccept/bundle/dms/bind-upload-failure/DMS=true: branch ✅ | main (c137506) ❌ | latest (v1.28.0) ❌

main (c137506):

acceptance_test.go:1402: Diff:
        --- bundle/dms/bind-upload-failure/output.txt
        +++ /tmp/TestAcceptbundledmsbind-upload-failureDMS=true2837542686/002/output.txt
        @@ -13,7 +13,6 @@
         
         
         >>> print_requests.py --dms //complete --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/4/complete", "body": {"completion_reason": "VERSION_COMPLETE_FAILURE"}}
         
         === Remote state still contains only the successful bindings
         
        @@ -29,12 +28,10 @@
         >>> fault.py PATCH /api/2.0/bundle/deployments/*/versions/*/operations/* 500 0 1
         
         >>> [CLI] bundle deployment bind history_failed [JOB_ID] --auto-approve
        -Warn: Failed to record deployment history for bind: recording operation for resources.jobs.history_failed: Fault injected by test.
         Successfully bound job with an id '[JOB_ID]'
         Run 'bundle deploy' to deploy changes to your workspace
         
         >>> print_requests.py --dms //complete --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/5/complete", "body": {"completion_reason": "VERSION_COMPLETE_FAILURE"}}
         
         === Remote state contains the binding whose history upload failed
         
        @@ -50,10 +43,8 @@
         >>> fault.py PATCH /api/2.0/bundle/deployments/*/versions/*/operations/* 500 0 1
         
         >>> [CLI] bundle deployment unbind kept
        -Warn: Failed to record deployment history for unbind: recording operation for resources.jobs.kept: Fault injected by test.
         
         >>> print_requests.py --dms //complete --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/6/complete", "body": {"completion_reason": "VERSION_COMPLETE_FAILURE"}}
         
         === Remote state no longer contains the unbound resource
         
        
    acceptance_test.go:1180: 
        LOG.setup: Successfully bound job with an id '8796048729780470989'
        LOG.setup: Run 'bundle deploy' to deploy changes to your workspace

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/dms/bind-upload-failure/output.txt
        +++ /tmp/TestAcceptbundledmsbind-upload-failureDMS=true3544138872/002/output.txt
        @@ -13,7 +13,6 @@
         
         
         >>> print_requests.py --dms //complete --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/4/complete", "body": {"completion_reason": "VERSION_COMPLETE_FAILURE"}}
         
         === Remote state still contains only the successful bindings
         
        @@ -29,12 +28,10 @@
         >>> fault.py PATCH /api/2.0/bundle/deployments/*/versions/*/operations/* 500 0 1
         
         >>> [CLI] bundle deployment bind history_failed [JOB_ID] --auto-approve
        -Warn: Failed to record deployment history for bind: recording operation for resources.jobs.history_failed: Fault injected by test.
         Successfully bound job with an id '[JOB_ID]'
         Run 'bundle deploy' to deploy changes to your workspace
         
         >>> print_requests.py --dms //complete --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/5/complete", "body": {"completion_reason": "VERSION_COMPLETE_FAILURE"}}
         
         === Remote state contains the binding whose history upload failed
         
        @@ -50,10 +43,8 @@
         >>> fault.py PATCH /api/2.0/bundle/deployments/*/versions/*/operations/* 500 0 1
         
         >>> [CLI] bundle deployment unbind kept
        -Warn: Failed to record deployment history for unbind: recording operation for resources.jobs.kept: Fault injected by test.
         
         >>> print_requests.py --dms //complete --oneline
        -{"method": "POST", "path": "/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/6/complete", "body": {"completion_reason": "VERSION_COMPLETE_FAILURE"}}
         
         === Remote state no longer contains the unbound resource
         
        
    acceptance_test.go:1180: 
        LOG.setup: Successfully bound job with an id '8796048745507827957'
        LOG.setup: Run 'bundle deploy' to deploy changes to your workspace
TestAccept/bundle/dms_fault/complete_version/DMS=true: branch ✅ | main (c137506) ❌ | latest (v1.28.0) ❌

main (c137506):

acceptance_test.go:1402: Diff:
        --- bundle/dms_fault/complete_version/output.txt
        +++ /tmp/TestAcceptbundledms_faultcomplete_versionDMS=true4165236106/002/output.txt
        @@ -48,11 +48,9 @@
         
         
         >>> bundle deployment unbind foo
        -  Warn: Failed to complete deployment history version: Fault injected by test.
         
         >>> bundle generate job --existing-job-id [FOO_ID] --key foo --config-dir resources --source-dir src --force --bind
           Job configuration successfully saved to resources/foo.job.yml
        -  Warn: Failed to complete deployment history version: Fault injected by test.
           Successfully bound job with an id '[FOO_ID]'
         
         >>> bundle generate pipeline --existing-pipeline-id [BAR_ID] --key bar --config-dir exported --source-dir exported-src --force
        @@ -68,12 +63,10 @@
         
         
         >>> bundle deployment unbind bar
        -  Warn: Failed to complete deployment history version: Fault injected by test.
         
         >>> bundle generate pipeline --existing-pipeline-id [BAR_ID] --key bar --config-dir resources --source-dir src --force --bind
           File successfully saved to src/pipeline.sql
           Pipeline configuration successfully saved to resources/bar.pipeline.yml
        -  Warn: Failed to complete deployment history version: Fault injected by test.
           Successfully bound pipeline with an id '[BAR_ID]'
         
         >>> bundle validate
        
    acceptance_test.go:1180: 
        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-3nun52334vbhlabrjpyhru7agy/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:46243/deployments/4000000000000700?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-3nun52334vbhlabrjpyhru7agy/state/resources.deployment.json', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "object_id": 4000000000000700,
        LOG.commands:   "object_type": "BUNDLE_DEPLOYMENT",
        LOG.commands:   "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-3nun52334vbhlabrjpyhru7agy/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-3nun52334vbhlabrjpyhru7agy/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:46243/deployments/4000000000000700?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', '8796048739392169831', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "created_time": 1796048739392,
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "job_id": 8796048739392169831,
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "settings": {
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000700",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-3nun52334vbhlabrjpyhru7agy/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-3nun52334vbhlabrjpyhru7agy",
        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', '7a11d7b9-9a99-c031-7a11-d7b99a99c121', '-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": 1796048739394,
        LOG.commands:   "name": "updated-dms-fault-complete_version-commands-3nun52334vbhlabrjpyhru7agy",
        LOG.commands:   "pipeline_id": "7a11d7b9-9a99-c031-7a11-d7b99a99c121",
        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": "4000000000000700",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-3nun52334vbhlabrjpyhru7agy/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "edition": "ADVANCED",
        LOG.commands:     "id": "7a11d7b9-9a99-c031-7a11-d7b99a99c121",
        LOG.commands:     "libraries": [
        LOG.commands:       {
        LOG.commands:         "file": {
        LOG.commands:           "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-3nun52334vbhlabrjpyhru7agy/files/pipeline.sql"
        LOG.commands:         }
        LOG.commands:       }
        LOG.commands:     ],
        LOG.commands:     "name": "updated-dms-fault-complete_version-commands-3nun52334vbhlabrjpyhru7agy",
        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-3nun52334vbhlabrjpyhru7agy
        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-3nun52334vbhlabrjpyhru7agy
        LOG.commands: Resources:
        LOG.commands:   Jobs:
        LOG.commands:     foo:
        LOG.commands: ... (470 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
FAIL

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/dms_fault/complete_version/output.txt
        +++ /tmp/TestAcceptbundledms_faultcomplete_versionDMS=true3472964799/002/output.txt
        @@ -48,11 +48,9 @@
         
         
         >>> bundle deployment unbind foo
        -  Warn: Failed to complete deployment history version: Fault injected by test.
         
         >>> bundle generate job --existing-job-id [FOO_ID] --key foo --config-dir resources --source-dir src --force --bind
           Job configuration successfully saved to resources/foo.job.yml
        -  Warn: Failed to complete deployment history version: Fault injected by test.
           Successfully bound job with an id '[FOO_ID]'
         
         >>> bundle generate pipeline --existing-pipeline-id [BAR_ID] --key bar --config-dir exported --source-dir exported-src --force
        @@ -68,12 +63,10 @@
         
         
         >>> bundle deployment unbind bar
        -  Warn: Failed to complete deployment history version: Fault injected by test.
         
         >>> bundle generate pipeline --existing-pipeline-id [BAR_ID] --key bar --config-dir resources --source-dir src --force --bind
           File successfully saved to src/pipeline.sql
           Pipeline configuration successfully saved to resources/bar.pipeline.yml
        -  Warn: Failed to complete deployment history version: Fault injected by test.
           Successfully bound pipeline with an id '[BAR_ID]'
         
         >>> bundle validate
        
    acceptance_test.go:1180: 
        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-jjeptwzwzvbrjffbswo4e7bg6y/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:35391/deployments/4000000000000700?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-jjeptwzwzvbrjffbswo4e7bg6y/state/resources.deployment.json', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "object_id": 4000000000000700,
        LOG.commands:   "object_type": "BUNDLE_DEPLOYMENT",
        LOG.commands:   "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-jjeptwzwzvbrjffbswo4e7bg6y/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-jjeptwzwzvbrjffbswo4e7bg6y/files...
        LOG.commands: Current Deployment Version: http://127.0.0.1:35391/deployments/4000000000000700?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', '8796048757809994125', '-o', 'json')
        LOG.commands: exit=0
        LOG.commands: {
        LOG.commands:   "created_time": 1796048757810,
        LOG.commands:   "creator_user_name": "tester@databricks.com",
        LOG.commands:   "job_id": 8796048757809994125,
        LOG.commands:   "run_as_user_name": "tester@databricks.com",
        LOG.commands:   "settings": {
        LOG.commands:     "deployment": {
        LOG.commands:       "deployment_id": "4000000000000700",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-jjeptwzwzvbrjffbswo4e7bg6y/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-jjeptwzwzvbrjffbswo4e7bg6y",
        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', '7a11d7bd-e47a-9cbb-7a11-d7bde47a9dae', '-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": 1796048757813,
        LOG.commands:   "name": "updated-dms-fault-complete_version-commands-jjeptwzwzvbrjffbswo4e7bg6y",
        LOG.commands:   "pipeline_id": "7a11d7bd-e47a-9cbb-7a11-d7bde47a9dae",
        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": "4000000000000700",
        LOG.commands:       "kind": "BUNDLE",
        LOG.commands:       "metadata_file_path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-jjeptwzwzvbrjffbswo4e7bg6y/state/metadata.json",
        LOG.commands:       "version_id": "2"
        LOG.commands:     },
        LOG.commands:     "edition": "ADVANCED",
        LOG.commands:     "id": "7a11d7bd-e47a-9cbb-7a11-d7bde47a9dae",
        LOG.commands:     "libraries": [
        LOG.commands:       {
        LOG.commands:         "file": {
        LOG.commands:           "path": "/Workspace/Users/tester@databricks.com/.bundle/dms-fault-complete_version-commands-jjeptwzwzvbrjffbswo4e7bg6y/files/pipeline.sql"
        LOG.commands:         }
        LOG.commands:       }
        LOG.commands:     ],
        LOG.commands:     "name": "updated-dms-fault-complete_version-commands-jjeptwzwzvbrjffbswo4e7bg6y",
        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-jjeptwzwzvbrjffbswo4e7bg6y
        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-jjeptwzwzvbrjffbswo4e7bg6y
        LOG.commands: Resources:
        LOG.commands:   Jobs:
        LOG.commands:     foo:
        LOG.commands: ... (470 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
FAIL

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

Finalize is what bumps the serial, so reading it beforehand numbered the version one
below the serial the state file carries. Bind already reads it after its commit.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: d6839ea

Run: 46437353344

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 292 28 4:00
💚​ aws-windows-latest-4core-16gb 1 294 26 4:18
💚​ azure linux-2core-8gb 1 291 28 4:08
💚​ azure-windows-latest-4core-16gb 1 293 26 4:30
💚​ gcp linux-2core-8gb 1 292 28 4:14
💚​ gcp-windows-latest-4core-16gb 1 294 26 4:08
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 3 slowest tests (at least 2 minutes):
duration env testname
3:11 azure-windows-latest-4core-16gb TestAccept
3:04 aws-windows-latest-4core-16gb TestAccept
2:53 gcp-windows-latest-4core-16gb TestAccept

Co-authored-by: Isaac <no-reply@databricks.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants