Skip to content

Distinguish resources removed from state in bundle summaries - #7496

Open
janniklasrose wants to merge 4 commits into
janniklasrose/print-summary-despite-destroy-errorfrom
janniklasrose/report-removed-from-state
Open

janniklasrose wants to merge 4 commits into
janniklasrose/print-summary-despite-destroy-errorfrom
janniklasrose/report-removed-from-state

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Changes

Report ignored resource-delete errors as N removed from state in bundle deploy/destroy summaries, with a matching per-resource deploy message. Warn with the resource and error when deletion is ignored without deployment history. This builds on #7006.

Why

The engine can intentionally drop a resource from bundle state after a permission error or another ignored delete error. Reporting it as deleted incorrectly suggests the backend resource is gone. Parent-managed delete rejections also count as state removal: the parent can be retained or fail to delete, even though a successful parent deletion may later cascade-remove the resource.

Tests

Acceptance tests cover permission-denied deletes during deploy and destroy, and ignored deletes without deployment history. Follow-up API reads confirm the resources still exist. Unit coverage includes state removal followed by a wait failure.

Local formatting, repository checks, full lint, generators, and changed acceptance tests under Go 1.27.3 pass. Reviewed locally with .agents/skills/pr-review and addressed the findings. The final local full suite passed all unit tests and all acceptance cases after retries except the unchanged completion test, which exits with SIGPIPE. CI results are pending for the latest review corrections.

This PR was written with Codex.

@github-actions github-actions Bot added the DABs DABs related issues label Nov 11, 2026
@janniklasrose
janniklasrose marked this pull request as ready for review November 11, 2026 17:53
@janniklasrose
janniklasrose requested review from a team as code owners November 11, 2026 17:53
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 3d1b46ac1 | Workflow run

Regression test report

Selected 20 changed tests (limit=20, 52 not selected)

33 tests: regression=33 unreleased=0 coverage=0 failing=0
test branch main (1d88015) latest (v1.28.0)
TestAccept/bundle/deploy/empty-resource-id/create/DMS= ✅ ❌ ❌
TestAccept/bundle/deploy/empty-resource-id/create/DMS=true ✅ ❌ ❌
TestAccept/bundle/deploy/empty-resource-id/update/DMS= ✅ ❌ ❌
TestAccept/bundle/deploy/empty-resource-id/update/DMS=true ✅ ❌ ❌
TestAccept/bundle/deploy/summary-on-error/DMS= ✅ ❌ ❌
TestAccept/bundle/deploy/summary-on-error/DMS=true ✅ ❌ ❌
TestAccept/bundle/deployment/bind/postgres_data_api/DMS= ✅ ❌ ❌
TestAccept/bundle/destroy/summary-on-error/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/failed-delete/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/failed-recreate/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/failed-update-permissions/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/record-failure/DMS=true ✅ ❌ ❌
TestAccept/bundle/migrate/auto/apply-failure/DMS= ✅ ❌ ❌
TestAccept/bundle/resource_deps/create_error/DMS= ✅ ❌ ❌
TestAccept/bundle/resource_deps/create_error/DMS=true ✅ ❌ ❌
TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS= ✅ ❌ ❌
TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=true ✅ ❌ ❌
TestAccept/bundle/resource_deps/missing_map_key/DMS= ✅ ❌ ❌
TestAccept/bundle/resource_deps/missing_map_key/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/apps/create_already_exists/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/apps/create_already_exists/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/apps/missing-service-principal/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/apps/missing-service-principal/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/apps/thumbnail-upload-fails/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/apps/thumbnail-upload-fails/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/empty-name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/empty-name/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/cluster_policies/definition_and_family_conflict/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/cluster_policies/definition_and_family_conflict/DMS=true ✅ ❌ ❌
TestAccept/bundle/deploy/empty-resource-id/create/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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=== A successful create response without an ID fails the deployment\n\n>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.volumes.volume1: create returned an empty resource id\n\nFiles: 0 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n\n=== The failed create does not save resource state\n\n>>> print_state.py\n{}\n\n=== The next plan still creates the resource\n\n>>> [CLI] bundle plan\ncreate volumes.volume1\n\nPlan: 1 to add, 0 to change, 0 to delete, 0 unchanged\n"
        	            	actual  : "\n=== A successful create response without an ID fails the deployment\n\n>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.volumes.volume1: create returned an empty resource id\n\nFiles: 0 uploaded, 0 deleted\n\n=== The failed create does not save resource state\n\n>>> print_state.py\n{}\n\n=== The next plan still creates the resource\n\n>>> [CLI] bundle plan\ncreate volumes.volume1\n\nPlan: 1 to add, 0 to change, 0 to delete, 0 unchanged\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -8,3 +8,2 @@
        	            	 Files: 0 uploaded, 0 deleted
        	            	-Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/deploy/empty-resource-id/create/DMS=
        	Messages:   	bundle/deploy/empty-resource-id/create/output.txt vs /tmp/TestAcceptbundledeployempty-resource-idcreateDMS=2641292064/002/output.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/deploy/empty-resource-id/create/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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=== A successful create response without an ID fails the deployment\n\n>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.volumes.volume1: create returned an empty resource id\n\nFiles: 0 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n\n=== The failed create does not save resource state\n\n>>> print_state.py\n{}\n\n=== The next plan still creates the resource\n\n>>> [CLI] bundle plan\ncreate volumes.volume1\n\nPlan: 1 to add, 0 to change, 0 to delete, 0 unchanged\n"
        	            	actual  : "\n=== A successful create response without an ID fails the deployment\n\n>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.volumes.volume1: create returned an empty resource id\n\nFiles: 0 uploaded, 0 deleted\n\n=== The failed create does not save resource state\n\n>>> print_state.py\n{}\n\n=== The next plan still creates the resource\n\n>>> [CLI] bundle plan\ncreate volumes.volume1\n\nPlan: 1 to add, 0 to change, 0 to delete, 0 unchanged\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -8,3 +8,2 @@
        	            	 Files: 0 uploaded, 0 deleted
        	            	-Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/deploy/empty-resource-id/create/DMS=true
        	Messages:   	bundle/deploy/empty-resource-id/create/output.txt vs /tmp/TestAcceptbundledeployempty-resource-idcreateDMS=true1165713106/002/output.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/deploy/empty-resource-id/update/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/deploy/empty-resource-id/update/output.txt
        +++ /tmp/TestAcceptbundledeployempty-resource-idupdateDMS=3978422095/002/output.txt
        @@ -14,7 +14,6 @@
         Error: cannot update_id resources.volumes.volume1: update returned an empty resource id
         
         Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         === The failed rename preserves the original ID and state

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/deploy/empty-resource-id/update/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/deploy/empty-resource-id/update/output.txt
        +++ /tmp/TestAcceptbundledeployempty-resource-idupdateDMS=true3226730496/002/output.txt
        @@ -14,7 +14,6 @@
         Error: cannot update_id resources.volumes.volume1: update returned an empty resource id
         
         Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         === The failed rename preserves the original ID and state
         
        
FAIL

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/deploy/empty-resource-id/update/output.txt
        +++ /tmp/TestAcceptbundledeployempty-resource-idupdateDMS=true512739582/002/output.txt
        @@ -14,7 +14,6 @@
         Error: cannot update_id resources.volumes.volume1: update returned an empty resource id
         
         Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         === The failed rename preserves the original ID and state
TestAccept/bundle/deploy/summary-on-error/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/deploy/summary-on-error/output.txt
        +++ /tmp/TestAcceptbundledeploysummary-on-errorDMS=3543566744/002/output.txt
        @@ -16,7 +16,6 @@
         Error: cannot create resources.jobs.job_03: dependency failed: resources.jobs.job_02
         
         Files: 2 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 2 failed
         
         === Removing a resource whose delete is denied reports state removal
         
        @@ -25,9 +24,9 @@
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-deploy-summary-on-error/default/files...
         Warn: destroying resources.jobs.job_01: Ignoring permission error when deleting resources.jobs.job_01 id=[JOB_01_ID]: Fault injected by test.
        -Removed jobs.job_01 from state
        +Deleted jobs.job_01
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 removed from state
        +Resources: 0 created, 0 changed, 1 deleted, 0 unchanged
         
         >>> [CLI] jobs get [JOB_01_ID]
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/deploy/summary-on-error/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/deploy/summary-on-error/output.txt
        +++ /tmp/TestAcceptbundledeploysummary-on-errorDMS=true3581520925/002/output.txt
        @@ -16,7 +16,6 @@
         Error: cannot create resources.jobs.job_03: dependency failed: resources.jobs.job_02
         
         Files: 2 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 2 failed
         
         === Removing a resource whose delete is denied reports state removal
         
        @@ -25,9 +24,9 @@
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-deploy-summary-on-error/default/files...
         Warn: destroying resources.jobs.job_01: Ignoring permission error when deleting resources.jobs.job_01 id=[JOB_01_ID]: Fault injected by test.
        -Removed jobs.job_01 from state
        +Deleted jobs.job_01
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 removed from state
        +Resources: 0 created, 0 changed, 1 deleted, 0 unchanged
         
         >>> [CLI] jobs get [JOB_01_ID]
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/deployment/bind/postgres_data_api/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/deployment/bind/postgres_data_api/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindpostgres_data_apiDMS=2726080473/002/output.txt
        @@ -13,7 +13,6 @@
         API message: Data API is already enabled for this database
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         === Bind adopts the existing Data API
         
        
    acceptance_test.go:1180: 
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-25T14:05:25.704242328Z",
        LOG.setup:   "name": "projects/test-project",
        LOG.setup:   "project_id": "test-project",
        LOG.setup:   "spec": {
        LOG.setup:     "display_name": "Test Project"
        LOG.setup:   },
        LOG.setup:   "status": {
        LOG.setup:     "branch_logical_size_limit_bytes": 8796093022208,
        LOG.setup:     "default_branch": "projects/test-project/branches/production",
        LOG.setup:     "default_endpoint_settings": {
        LOG.setup:       "autoscaling_limit_max_cu": 1,
        LOG.setup:       "autoscaling_limit_min_cu": 1,
        LOG.setup:       "suspend_timeout_duration": "86400s"
        LOG.setup:     },
        LOG.setup:     "display_name": "Test Project",
        LOG.setup:     "enable_pg_native_login": false,
        LOG.setup:     "history_retention_duration": "604800s",
        LOG.setup:     "owner": "tester@databricks.com",
        LOG.setup:     "pg_version": 16,
        LOG.setup:     "project_id": "test-project",
        LOG.setup:     "synthetic_storage_size_bytes": 0
        LOG.setup:   },
        LOG.setup:   "uid": "7a104db8-2e83-1697-7a10-4db82e8317f1",
        LOG.setup:   "update_time": "2026-11-25T14:05:25.704242328Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-25T14:05:25.728037452Z",
        LOG.setup:   "database_id": "test-database",
        LOG.setup:   "name": "projects/test-project/branches/production/databases/test-database",
        LOG.setup:   "parent": "projects/test-project/branches/production",
        LOG.setup:   "spec": {
        LOG.setup:     "postgres_database": "app_db",
        LOG.setup:     "role": "projects/test-project/branches/production/roles/owner"
        LOG.setup:   },
        LOG.setup:   "status": {
        LOG.setup:     "database_id": "test-database",
        LOG.setup:     "postgres_database": "app_db",
        LOG.setup:     "role": "projects/test-project/branches/production/roles/owner"
        LOG.setup:   },
        LOG.setup:   "update_time": "2026-11-25T14:05:25.728037452Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-25T14:05:25.751028694Z",
        LOG.setup:   "name": "projects/test-project/branches/production/databases/test-database/data-api",
        LOG.setup:   "parent": "projects/test-project/branches/production/databases/test-database",
        LOG.setup:   "status": {
        LOG.setup:     "available_schemas": [
        LOG.setup:       "public"
        LOG.setup:     ],
        LOG.setup:     "db_aggregates_enabled": true,
        LOG.setup:     "db_schemas": [
        LOG.setup:       "public"
        LOG.setup:     ],
        LOG.setup:     "jwt_role_claim_key": ".sub",
        LOG.setup:     "openapi_mode": "OPEN_API_MODE_DISABLED",
        LOG.setup:     "server_cors_allowed_origins": [
        LOG.setup:       "none"
        LOG.setup:     ],
        LOG.setup:     "url": "https://ep-7a104db8-2e83-bb39-7.database.us-east-1.cloud.databricks.com/api/2.0/workspace/900800700600/rest/app_db"
        LOG.setup:   },
        LOG.setup:   "update_time": "2026-11-25T14:05:25.751028694Z"
        LOG.setup: }

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/deployment/bind/postgres_data_api/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindpostgres_data_apiDMS=2887740556/002/output.txt
        @@ -13,7 +13,6 @@
         API message: Data API is already enabled for this database
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         === Bind adopts the existing Data API
         
        
    acceptance_test.go:1180: 
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-25T14:05:39.028303384Z",
        LOG.setup:   "name": "projects/test-project",
        LOG.setup:   "project_id": "test-project",
        LOG.setup:   "spec": {
        LOG.setup:     "display_name": "Test Project"
        LOG.setup:   },
        LOG.setup:   "status": {
        LOG.setup:     "branch_logical_size_limit_bytes": 8796093022208,
        LOG.setup:     "default_branch": "projects/test-project/branches/production",
        LOG.setup:     "default_endpoint_settings": {
        LOG.setup:       "autoscaling_limit_max_cu": 1,
        LOG.setup:       "autoscaling_limit_min_cu": 1,
        LOG.setup:       "suspend_timeout_duration": "86400s"
        LOG.setup:     },
        LOG.setup:     "display_name": "Test Project",
        LOG.setup:     "enable_pg_native_login": false,
        LOG.setup:     "history_retention_duration": "604800s",
        LOG.setup:     "owner": "tester@databricks.com",
        LOG.setup:     "pg_version": 16,
        LOG.setup:     "project_id": "test-project",
        LOG.setup:     "synthetic_storage_size_bytes": 0
        LOG.setup:   },
        LOG.setup:   "uid": "7a104dbb-48b0-201f-7a10-4dbb48b02132",
        LOG.setup:   "update_time": "2026-11-25T14:05:39.028303384Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-25T14:05:39.051807372Z",
        LOG.setup:   "database_id": "test-database",
        LOG.setup:   "name": "projects/test-project/branches/production/databases/test-database",
        LOG.setup:   "parent": "projects/test-project/branches/production",
        LOG.setup:   "spec": {
        LOG.setup:     "postgres_database": "app_db",
        LOG.setup:     "role": "projects/test-project/branches/production/roles/owner"
        LOG.setup:   },
        LOG.setup:   "status": {
        LOG.setup:     "database_id": "test-database",
        LOG.setup:     "postgres_database": "app_db",
        LOG.setup:     "role": "projects/test-project/branches/production/roles/owner"
        LOG.setup:   },
        LOG.setup:   "update_time": "2026-11-25T14:05:39.051807372Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-25T14:05:39.073803424Z",
        LOG.setup:   "name": "projects/test-project/branches/production/databases/test-database/data-api",
        LOG.setup:   "parent": "projects/test-project/branches/production/databases/test-database",
        LOG.setup:   "status": {
        LOG.setup:     "available_schemas": [
        LOG.setup:       "public"
        LOG.setup:     ],
        LOG.setup:     "db_aggregates_enabled": true,
        LOG.setup:     "db_schemas": [
        LOG.setup:       "public"
        LOG.setup:     ],
        LOG.setup:     "jwt_role_claim_key": ".sub",
        LOG.setup:     "openapi_mode": "OPEN_API_MODE_DISABLED",
        LOG.setup:     "server_cors_allowed_origins": [
        LOG.setup:       "none"
        LOG.setup:     ],
        LOG.setup:     "url": "https://ep-7a104dbb-48b0-d8a6-7.database.us-east-1.cloud.databricks.com/api/2.0/workspace/900800700600/rest/app_db"
        LOG.setup:   },
        LOG.setup:   "update_time": "2026-11-25T14:05:39.073803424Z"
        LOG.setup: }
TestAccept/bundle/destroy/summary-on-error/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/destroy/summary-on-error/output.txt
        +++ /tmp/TestAcceptbundledestroysummary-on-errorDMS=true1407971305/002/output.txt
        @@ -28,7 +28,6 @@
         API error_code: INVALID_PARAMETER_VALUE
         API message: Fault injected by test.
         
        -Destroy: 2 deleted, 1 failed
         
         === A permission-denied delete removes state without reporting a deletion
         
        @@ -41,7 +40,7 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-destroy-summary-on-error/default
         
         Warn: destroying resources.jobs.job_01: Ignoring permission error when deleting resources.jobs.job_01 id=[JOB_01_ID]: Fault injected by test.
        -Destroy: 0 deleted, 1 removed from state
        +Destroy: 1 deleted
         
         >>> [CLI] jobs get [JOB_01_ID]
         {
        @@ -68,8 +67,7 @@
         
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-destroy-summary-on-error/default
         
        -Warn: destroying resources.jobs.job_01: Ignoring error when deleting resources.jobs.job_01 id=[JOB_01_ID_3]: Fault injected by test.
        -Destroy: 2 deleted, 1 removed from state
        +Destroy: 3 deleted
         
         >>> [CLI] jobs get [JOB_01_ID_3]
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/dms/failed-delete/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/dms/failed-delete/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-deleteDMS=true1206752234/002/output.txt
        @@ -137,7 +137,6 @@
         API error_code: INVALID_PARAMETER_VALUE
         API message: Fault injected by test.
         
        -Destroy: 0 deleted, 1 failed
         
         >>> print_requests.py --dms //api/2.0/bundle
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/dms/failed-recreate/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/dms/failed-recreate/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-recreateDMS=true1479032359/002/output.txt
        @@ -130,7 +130,6 @@
         API message: Fault injected by test.
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 1 deleted, 0 unchanged, 1 failed
         
         >>> print_requests.py --dms --fold-pending //api/2.0/bundle
         {
        
    acceptance_test.go:1180: 
        LOG.catalog: {
        LOG.catalog:   "catalog_type": "MANAGED_CATALOG",
        LOG.catalog:   "created_at": 1795615524216,
        LOG.catalog:   "created_by": "tester@databricks.com",
        LOG.catalog:   "full_name": "dms_other_pn437ja2hbb5bouecxxnf7zrny",
        LOG.catalog:   "isolation_mode": "OPEN",
        LOG.catalog:   "metastore_id": "7a104db7-d5d3-2aa5-7a10-4db7d5d32c63",
        LOG.catalog:   "name": "dms_other_pn437ja2hbb5bouecxxnf7zrny",
        LOG.catalog:   "owner": "tester@databricks.com",
        LOG.catalog:   "updated_at": 1795615524216,
        LOG.catalog:   "updated_by": "tester@databricks.com"
        LOG.catalog: }
    acceptance_test.go:1180: 
        LOG.plan_final: create schemas.foo
        LOG.plan_final: 
        LOG.plan_final: Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/dms/failed-recreate/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-recreateDMS=true1495468929/002/output.txt
        @@ -130,7 +130,6 @@
         API message: Fault injected by test.
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 1 deleted, 0 unchanged, 1 failed
         
         >>> print_requests.py --dms --fold-pending //api/2.0/bundle
         {
        
    acceptance_test.go:1180: 
        LOG.catalog: {
        LOG.catalog:   "catalog_type": "MANAGED_CATALOG",
        LOG.catalog:   "created_at": 1795615537623,
        LOG.catalog:   "created_by": "tester@databricks.com",
        LOG.catalog:   "full_name": "dms_other_sqc4ukngpzbcri4rrtt5wvrvsa",
        LOG.catalog:   "isolation_mode": "OPEN",
        LOG.catalog:   "metastore_id": "7a104dba-f4fb-a122-7a10-4dbaf4fba23c",
        LOG.catalog:   "name": "dms_other_sqc4ukngpzbcri4rrtt5wvrvsa",
        LOG.catalog:   "owner": "tester@databricks.com",
        LOG.catalog:   "updated_at": 1795615537623,
        LOG.catalog:   "updated_by": "tester@databricks.com"
        LOG.catalog: }
    acceptance_test.go:1180: 
        LOG.plan_final: create schemas.foo
        LOG.plan_final: 
        LOG.plan_final: Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
TestAccept/bundle/dms/failed-update-permissions/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/dms/failed-update-permissions/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-update-permissionsDMS=true284280845/002/output.txt
        @@ -111,7 +111,6 @@
         API message: Fault injected by test.
         
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 1 unchanged, 1 failed
         
         === The service lists the job with the failure

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/dms/record-failure/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/dms/record-failure/output.txt
        +++ /tmp/TestAcceptbundledmsrecord-failureDMS=true4218689806/002/output.txt
        @@ -11,7 +11,6 @@
         API message: Node type nonexistent-node-type is not supported. Supported node types: [NODE_TYPES]
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         >>> [CLI] bundle plan -o json
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/migrate/auto/apply-failure/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/migrate/auto/apply-failure/output.txt
        +++ /tmp/TestAcceptbundlemigrateautoapply-failureDMS=3073253620/002/output.txt
        @@ -19,7 +19,6 @@
         API message: Fault injected by test.
         
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         Exit code: 1

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resource_deps/create_error/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resource_deps/create_error/output.txt
        +++ /tmp/TestAcceptbundleresource_depscreate_errorDMS=3001059139/002/output.txt
        @@ -76,14 +76,7 @@
         Plan: 3 to add, 0 to change, 0 to delete, 1 unchanged
         
         === Second deploy: only the summary differs, independent is now unchanged
        ---- out.deploy.txt
        -+++ out.deploy2.txt
        -@@ -12,3 +12,3 @@
         
        - Files: 0 uploaded, 0 deleted
        --Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 3 failed
        -+Resources: 0 created, 0 changed, 0 deleted, 1 unchanged, 3 failed
        -
         >>> print_requests.py --nostamp //jobs
         {
           "method": "POST",
        
    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: "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.jobs.foo: INJECTED (500 UNKNOWN)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.2/jobs/create\nHTTP Status: 500 Internal Server Error\nAPI error_code: UNKNOWN\nAPI message: INJECTED\n\nError: cannot create resources.jobs.bar: dependency failed: resources.jobs.foo\n\nError: cannot create resources.jobs.baz: dependency failed: resources.jobs.foo\n\nFiles: 0 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged, 3 failed\n"
        	            	actual  : "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.jobs.foo: INJECTED (500 UNKNOWN)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.2/jobs/create\nHTTP Status: 500 Internal Server Error\nAPI error_code: UNKNOWN\nAPI message: INJECTED\n\nError: cannot create resources.jobs.bar: dependency failed: resources.jobs.foo\n\nError: cannot create resources.jobs.baz: dependency failed: resources.jobs.foo\n\nFiles: 0 uploaded, 0 deleted\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -13,3 +13,2 @@
        	            	 Files: 0 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 3 failed
        	            	 
        	Test:       	TestAccept/bundle/resource_deps/create_error/DMS=
        	Messages:   	bundle/resource_deps/create_error/out.deploy.txt vs /tmp/TestAcceptbundleresource_depscreate_errorDMS=3001059139/001/out.deploy.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resource_deps/create_error/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resource_deps/create_error/output.txt
        +++ /tmp/TestAcceptbundleresource_depscreate_errorDMS=true4120105119/002/output.txt
        @@ -76,14 +76,7 @@
         Plan: 3 to add, 0 to change, 0 to delete, 1 unchanged
         
         === Second deploy: only the summary differs, independent is now unchanged
        ---- out.deploy.txt
        -+++ out.deploy2.txt
        -@@ -12,3 +12,3 @@
         
        - Files: 0 uploaded, 0 deleted
        --Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 3 failed
        -+Resources: 0 created, 0 changed, 0 deleted, 1 unchanged, 3 failed
        -
         >>> print_requests.py --nostamp //jobs
         {
           "method": "POST",
        
    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: "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.jobs.foo: INJECTED (500 UNKNOWN)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.2/jobs/create\nHTTP Status: 500 Internal Server Error\nAPI error_code: UNKNOWN\nAPI message: INJECTED\n\nError: cannot create resources.jobs.bar: dependency failed: resources.jobs.foo\n\nError: cannot create resources.jobs.baz: dependency failed: resources.jobs.foo\n\nFiles: 0 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged, 3 failed\n"
        	            	actual  : "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nError: cannot create resources.jobs.foo: INJECTED (500 UNKNOWN)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.2/jobs/create\nHTTP Status: 500 Internal Server Error\nAPI error_code: UNKNOWN\nAPI message: INJECTED\n\nError: cannot create resources.jobs.bar: dependency failed: resources.jobs.foo\n\nError: cannot create resources.jobs.baz: dependency failed: resources.jobs.foo\n\nFiles: 0 uploaded, 0 deleted\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -13,3 +13,2 @@
        	            	 Files: 0 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 3 failed
        	            	 
        	Test:       	TestAccept/bundle/resource_deps/create_error/DMS=true
        	Messages:   	bundle/resource_deps/create_error/out.deploy.txt vs /tmp/TestAcceptbundleresource_depscreate_errorDMS=true4120105119/001/out.deploy.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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: "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nCreated pipelines.foo\nError: cannot create resources.pipelines.bar: cannot resolve \"${resources.pipelines.foo.ingestion_definition.connection_name}\": ingestion_definition: cannot access nil value\n\nFiles: 4 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n\nExit code: 1\n"
        	            	actual  : "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nCreated pipelines.foo\nError: cannot create resources.pipelines.bar: cannot resolve \"${resources.pipelines.foo.ingestion_definition.connection_name}\": ingestion_definition: cannot access nil value\n\nFiles: 4 uploaded, 0 deleted\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -5,3 +5,2 @@
        	            	 Files: 4 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=
        	Messages:   	bundle/resource_deps/missing_ingestion_definition/out.deploy.txt vs /tmp/TestAcceptbundleresource_depsmissing_ingestion_definitionDMS3843221303/001/out.deploy.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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: "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nCreated pipelines.foo\nError: cannot create resources.pipelines.bar: cannot resolve \"${resources.pipelines.foo.ingestion_definition.connection_name}\": ingestion_definition: cannot access nil value\n\nFiles: 4 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n\nExit code: 1\n"
        	            	actual  : "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nCreated pipelines.foo\nError: cannot create resources.pipelines.bar: cannot resolve \"${resources.pipelines.foo.ingestion_definition.connection_name}\": ingestion_definition: cannot access nil value\n\nFiles: 4 uploaded, 0 deleted\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -5,3 +5,2 @@
        	            	 Files: 4 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=true
        	Messages:   	bundle/resource_deps/missing_ingestion_definition/out.deploy.txt vs /tmp/TestAcceptbundleresource_depsmissing_ingestion_definitionDMS3849246666/001/out.deploy.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resource_deps/missing_map_key/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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: "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/state/default/files...\nCreated jobs.test\nError: cannot create resources.jobs.bar: cannot resolve \"${resources.jobs.test.tasks[0].new_cluster.custom_tags.missing_tag}\": tasks[0].new_cluster.custom_tags.missing_tag: key \"missing_tag\" not found in map\n\nFiles: 4 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n"
        	            	actual  : "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/state/default/files...\nCreated jobs.test\nError: cannot create resources.jobs.bar: cannot resolve \"${resources.jobs.test.tasks[0].new_cluster.custom_tags.missing_tag}\": tasks[0].new_cluster.custom_tags.missing_tag: key \"missing_tag\" not found in map\n\nFiles: 4 uploaded, 0 deleted\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -5,3 +5,2 @@
        	            	 Files: 4 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/resource_deps/missing_map_key/DMS=
        	Messages:   	bundle/resource_deps/missing_map_key/out.deploy.txt vs /tmp/TestAcceptbundleresource_depsmissing_map_keyDMS=3214435397/001/out.deploy.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resource_deps/missing_map_key/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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: "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/state/default/files...\nCreated jobs.test\nError: cannot create resources.jobs.bar: cannot resolve \"${resources.jobs.test.tasks[0].new_cluster.custom_tags.missing_tag}\": tasks[0].new_cluster.custom_tags.missing_tag: key \"missing_tag\" not found in map\n\nFiles: 4 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n"
        	            	actual  : "Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/state/default/files...\nCreated jobs.test\nError: cannot create resources.jobs.bar: cannot resolve \"${resources.jobs.test.tasks[0].new_cluster.custom_tags.missing_tag}\": tasks[0].new_cluster.custom_tags.missing_tag: key \"missing_tag\" not found in map\n\nFiles: 4 uploaded, 0 deleted\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -5,3 +5,2 @@
        	            	 Files: 4 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/resource_deps/missing_map_key/DMS=true
        	Messages:   	bundle/resource_deps/missing_map_key/out.deploy.txt vs /tmp/TestAcceptbundleresource_depsmissing_map_keyDMS=true14157258/001/out.deploy.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/apps/create_already_exists/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/create_already_exists/output.txt
        +++ /tmp/TestAcceptbundleresourcesappscreate_already_existsDMS=1387174742/002/output.txt
        @@ -38,7 +38,6 @@
         API message: An app with the same name already exists: test-app-already-exists
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         >>> [CLI] apps delete test-app-already-exists
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/apps/create_already_exists/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/create_already_exists/output.txt
        +++ /tmp/TestAcceptbundleresourcesappscreate_already_existsDMS=true1467014527/002/output.txt
        @@ -38,7 +38,6 @@
         API message: An app with the same name already exists: test-app-already-exists
         
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         >>> [CLI] apps delete test-app-already-exists
         {

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/apps/missing-service-principal/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/missing-service-principal/output.txt
        +++ /tmp/TestAcceptbundleresourcesappsmissing-service-principalDMS=2840330214/002/output.txt
        @@ -21,7 +21,6 @@
         API message: App: myappname's service principal does not exist or is deleted. App cannot run without a valid service principal. Please delete your app.
         
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         Exit code: 1
         
        @@ -68,7 +67,6 @@
         API message: App: myappname's service principal does not exist or is deleted. App cannot run without a valid service principal. Please delete your app.
         
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         Exit code: 1

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/apps/missing-service-principal/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/missing-service-principal/output.txt
        +++ /tmp/TestAcceptbundleresourcesappsmissing-service-principalDMS=t3125458505/002/output.txt
        @@ -21,7 +21,6 @@
         API message: App: myappname's service principal does not exist or is deleted. App cannot run without a valid service principal. Please delete your app.
         
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         Exit code: 1
         
        @@ -68,7 +67,6 @@
         API message: App: myappname's service principal does not exist or is deleted. App cannot run without a valid service principal. Please delete your app.
         
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         Exit code: 1

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/apps/thumbnail-upload-fails/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/thumbnail-upload-fails/output.txt
        +++ /tmp/TestAcceptbundleresourcesappsthumbnail-upload-failsDMS=2354719714/002/output.txt
        @@ -28,7 +28,6 @@
         API message: Unsupported image
         
         Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/apps/thumbnail-upload-fails/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/thumbnail-upload-fails/output.txt
        +++ /tmp/TestAcceptbundleresourcesappsthumbnail-upload-failsDMS=true2211302236/002/output.txt
        @@ -28,7 +28,6 @@
         API message: Unsupported image
         
         Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/resources/apps/thumbnail-upload-fails/output.txt
        +++ /tmp/TestAcceptbundleresourcesappsthumbnail-upload-failsDMS=true1452012664/002/output.txt
        @@ -28,7 +28,6 @@
         API message: Unsupported image
         
         Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
         
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
        
FAIL
TestAccept/bundle/resources/catalogs/empty-name/DMS=: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/catalog-empty-name-[UNIQUE_NAME]/default/files...\nError: cannot create resources.catalogs.mycatalog: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters. (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.1/unity-catalog/catalogs\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters.\n\nFiles: 2 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n"
        	            	actual  : "\n>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/catalog-empty-name-[UNIQUE_NAME]/default/files...\nError: cannot create resources.catalogs.mycatalog: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters. (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.1/unity-catalog/catalogs\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters.\n\nFiles: 2 uploaded, 0 deleted\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -11,3 +11,2 @@
        	            	 Files: 2 uploaded, 0 deleted
        	            	-Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/resources/catalogs/empty-name/DMS=
        	Messages:   	bundle/resources/catalogs/empty-name/output.txt vs /tmp/TestAcceptbundleresourcescatalogsempty-nameDMS=2873394510/002/output.txt

latest (v1.28.0): same output as main (1d88015)

TestAccept/bundle/resources/catalogs/empty-name/DMS=true: branch ✅ | main (1d88015) ❌ | latest (v1.28.0) ❌

main (1d88015):

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>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/catalog-empty-name-[UNIQUE_NAME]/default/files...\nError: cannot create resources.catalogs.mycatalog: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters. (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.1/unity-catalog/catalogs\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters.\n\nFiles: 2 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n"
        	            	actual  : "\n>>> musterr [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/catalog-empty-name-[UNIQUE_NAME]/default/files...\nError: cannot create resources.catalogs.mycatalog: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters. (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.1/unity-catalog/catalogs\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: Invalid input: RPC CreateCatalog Field managedcatalog.CatalogInfo.name: name \"\" is not a valid name. Valid names cannot contain spaces, periods, forward slashes, or control characters.\n\nFiles: 2 uploaded, 0 deleted\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -11,3 +11,2 @@
        	            	 Files: 2 uploaded, 0 deleted
        	            	-Resources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed
        	            	 
        	Test:       	TestAccept/bundle/resources/catalogs/empty-name/DMS=true
        	Messages:   	bundle/resources/catalogs/empty-name/output.txt vs /tmp/TestAcceptbundleresourcescatalogsempty-nameDMS=true627902813/002/output.txt

latest (v1.28.0): same output as main (1d88015)

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

@andrewnester
andrewnester self-requested a review November 11, 2026 18:06
Comment thread bundle/direct/apply.go
}

err = d.Adapter.DoDelete(ctx, oldID, oldState)
unbound := isManagedByParent(err)

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.

isManagedByParent sets unbound, so a destroy of a Lakebase branch plus its primary endpoint now prints "Destroy: 2 deleted, 1 removed from state" (postgres_endpoints/replace_existing) even though the parent delete cascade-removes the endpoint, as util.go:9 and that test's script say. Should parent-managed deletes keep counting as deleted rather than reading as left behind?

Comment thread bundle/direct/apply.go
db.RecordFailure(d.ResourceKey, oldID, err)
return err
} else {
unbound = true

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.

Without deployment history this branch ignores the delete error silently, so the new "Destroy: 2 deleted, 1 removed from state" (destroy/summary-on-error, settled_failure) names no resource and gives no reason. Can it log.Warnf like the permission branch above?

andrewnester added a commit that referenced this pull request Nov 11, 2026
With BASE at the merge base with main, a PR stacked on another PR shows
the parent's hunks too and they get reviewed twice (#7496 on #7006).

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

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 3d1b46a

Run: 45629059747

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 317 53 7:31
💚​ aws-windows-latest-4core-16gb 1 319 51 6:33
💚​ azure linux-2core-8gb 1 306 57 6:33
💚​ azure-windows-latest-4core-16gb 1 308 55 6:39
💚​ gcp linux-2core-8gb 1 313 55 6:56
💚​ gcp-windows-latest-4core-16gb 1 315 53 5:44
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 7 slowest tests (at least 2 minutes):
duration env testname
4:03 aws linux-2core-8gb TestAccept
4:02 azure linux-2core-8gb TestAccept
3:40 gcp linux-2core-8gb TestAccept
3:30 azure-windows-latest-4core-16gb TestAccept
3:00 gcp-windows-latest-4core-16gb TestAccept
2:56 aws-windows-latest-4core-16gb TestAccept
2:14 gcp linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=

@janniklasrose
janniklasrose removed this pull request from stack #7497 November 11, 2026 19:09
@janniklasrose
janniklasrose force-pushed the janniklasrose/report-removed-from-state branch from d056548 to 373373f Compare November 11, 2026 19:10
@janniklasrose
janniklasrose force-pushed the janniklasrose/report-removed-from-state branch from 373373f to e52d600 Compare November 11, 2026 19:35
@janniklasrose
janniklasrose force-pushed the janniklasrose/report-removed-from-state branch from e52d600 to e6b39ea Compare November 11, 2026 20:44
tedjt pushed a commit to tedjt/cli that referenced this pull request Nov 12, 2026
…s to CI (databricks#7501)

## Changes
The main-distance check now says the review judges the code at `TARGET`
and only tells the author what moved on main. Stacked PRs take `BASE`
from their base branch so the parent PR is not reviewed twice. The
sentence asking to regenerate generated files locally is replaced by a
pointer to the CI check.

## Why
Follow-up to pietern's questions on databricks#7466, plus databricks#7496 (stacked on databricks#7006)
where the parent hunks showed up in the review.

## Tests
Docs only.

This pull request and its description were written by Isaac.

---------

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

@Sankalp-Mittal Sankalp-Mittal 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.

🤖 AI review from review-factory: 3 independent reviewer models (Claude Fable 5.2, Claude Opus 5.5, Claude Sonnet 5.5) with cross-verification. Only findings that reviewers agreed on are posted.

Reports deletes with ignored API errors as 'removed from state' in summaries; reviewers found parent-managed cascade deletes misreported and a minor wait double count.

Findings: 1 major, 1 minor.

Comment thread bundle/direct/apply.go

err = d.Adapter.DoDelete(ctx, oldID, oldState)
// A parent-managed resource may remain if its parent is kept or fails to delete.
unbound := isManagedByParent(err)

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.

major: Parent-managed deletes are reported as "removed from state" although the parent's delete cascade-cleans them, with no name or reason

unbound := isManagedByParent(err) puts every MANAGED_BY_PARENT rejection in the new "removed from state" bucket. isManagedByParent's own doc (bundle/direct/util.go:9-15) says the standalone Delete can be disregarded because the parent's Delete will cascade-clean the resource. On bundle destroy the parent is always in the plan and is deleted in the same run, so these resources are in fact deleted. The new summary says the opposite: any bundle that manages a Lakebase root branch or primary endpoint now prints Destroy: N-1 deleted, 1 removed from state on a fully successful destroy. Seven goldens encode this (postgres_branches/replace_existing, postgres_endpoints/replace_existing, and five postgres_data_apis tests). Before this change the line was N deleted, which was correct for these cases.

The output also contradicts itself. In postgres_data_apis/basic the approval text says the action "will result in the deletion of the following Lakebase branches" and lists resources.postgres_branches.production, and the summary a few lines later reads Destroy: 3 deleted, 1 removed from state.

Unlike the other two unbound branches (permission denied, no history), this branch logs nothing, and destroy prints no per-resource lines (reportApplied is false at bundle/phases/destroy.go:181). The user is told one resource may have been left behind, with no resource name and no reason, and may go looking for an orphaned branch or endpoint that no longer exists. This is the open question from andrewnester on this line; the code at head is unchanged on it.

The case the PR description gives as justification (the parent is kept, or the parent's delete fails) is real, but no test covers it: the only parent-managed scenarios in the suite are destroys where the parent is deleted. rg MANAGED_BY_PARENT acceptance/bundle matches only the postgres_endpoints/replace_existing and postgres_branches/replace_existing scripts, and rg "Removed postgres" acceptance/bundle has no match, so the deploy-path line for a parent-managed resource is not covered either.

Suggested changes (either one):

  • Do not set Unbound for MANAGED_BY_PARENT. This matches how Recreate already treats it (RecreateDeleted = HasDoDelete() && !managedByParent), which counts it as neither deleted nor unbound.
  • Or count a parent-managed rejection as removed from state only when its parent is not deleted in the same apply, and keep counting it as deleted otherwise (the pre-PR result).

If the current behaviour stays, at least log.Warnf the resource key as the other two unbound branches do, and add a test for the parent-kept case.

Evidence:

  • bundle/direct/apply.go:271-273: unbound := isManagedByParent(err) with no log call, while :279-280 and :289-290 pair unbound = true with log.Warnf.
  • acceptance/bundle/resources/postgres_endpoints/replace_existing/out.requests.destroy.json records DELETE .../branches/develop/endpoints/primary, then DELETE .../branches/develop, then DELETE .../projects/test-pg-proj-[UNIQUE_NAME]. libs/testserver/postgres.go:504-514 (branch delete removes its endpoints) and :273-289 (project delete removes branches and endpoints) show the cascade.
  • out.destroy.txt:16 in that test now reads Destroy: 2 deleted, 1 removed from state with no Warn: line above it.
  • acceptance/bundle/resources/postgres_data_apis/basic/output.txt:130-132 lists delete resources.postgres_branches.production under the Lakebase-branch deletion warning, and :140 reads Destroy: 3 deleted, 1 removed from state.

Agreed by 3 reviewer model(s).

Comment thread bundle/direct/apply.go
if err != nil {
return fmt.Errorf("deleting state id=%s: %w", oldID, err)
}
entry.Unbound = unbound

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.

minor: Unbound deletes still run the delete-wait, and a wait failure counts one resource as both failed and removed from state

entry.Unbound is set before WaitAfterDelete, which still runs even though the delete was rejected and the resource is known to still exist. For resources whose wait polls until the GET fails (vector_search_index, postgres_synced_table), an ignored 403 now means polling until the timeout or cap. A non-capped wait timeout then returns an error. CountApplied and logDestroySummary count that single resource twice: Unbound++ and Failed++. The new unit case wait failure after unbinding still reports state removal ({Unbound: 1, Failed: 1}) locks in that double count.

Polling after an ignored error is not new, but this PR newly ties it to the summary counts. Returning right after entry.Unbound = unbound when unbound is true would remove both the pointless wait and the double count, since the resource was not deleted and there is nothing to wait for.

Evidence:

  • bundle/direct/apply.go:298 sets entry.Unbound before the waitCapped call at :305-311, which returns an error at :310.
  • bundle/direct/dresources/vector_search_index.go:225-233 and postgres_synced_table.go:157-170 poll with Continues("... still exists ...") until GET errors.
  • bundle/deployplan/plan.go:120-127 has if entry.Unbound {c.Unbound++} followed by a separate if entry.Attempted && !entry.Applied {c.Failed++}; bundle/phases/destroy.go:155-162 has the same pattern.
  • bundle/deployplan/plan_test.go:121-124 asserts {Unbound: 1, Failed: 1} for a single entry.

Agreed by 3 reviewer model(s).

@denik

denik commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

#7931 restores the error return in (*DeploymentUnit).Delete for runs without deployment history. Since #6094, a delete that the backend rejects (for example a 400 from jobs/delete) falls through to DeleteState, so bundle destroy reports success and the job stays in the workspace untracked; #7930 records it. This PR keeps that fallthrough and adds a warning for it. Was the fallthrough intended here, or should it return the error as before #6094?

AI agent (opus5.5, isaac_claude)

@janniklasrose
janniklasrose removed this pull request from stack #7504 November 25, 2026 13:49
… janniklasrose/report-removed-from-state

Bring in main through the parent branch. Keep the state-removal tracking
on top of main's retried delete and the IsStateOnly rename.

Co-authored-by: Isaac <no-reply@databricks.com>
stevenayers pushed a commit to stevenayers/cli that referenced this pull request Nov 28, 2026
…atabricks#7931)

## Changes

`(*DeploymentUnit).Delete` returns the delete error again when the
backend rejects a delete with an error that is not missing,
managed-by-parent or permission-denied, and a re-read does not show the
resource gone. Before, without deployment history, it fell through to
dropping the resource from state: `bundle destroy` and `bundle deploy`
(for a resource removed from the config) reported success while the
resource stayed in the workspace, untracked.

This is a regression from databricks#6094 (7bf1485), which changed the final

```go
} else {
	return fmt.Errorf("deleting id=%s: %w", oldID, err)
}
```

into `} else if db.IsDeploymentMetadataService() { ...; return err }`
(renamed to `RecordsHistory` in databricks#7169), so the case without deployment
history lost its return.

Fix shape: I kept the pre-databricks#6094 behavior. The error is returned for
every run, with or without deployment history, and the resource stays in
state so the next deploy or destroy retries the delete. `RecordFailure`
is still called unconditionally in that branch; it is already a no-op
when history is not recorded, so nothing extra is written for runs
without history.

Tests:
- `bundle/destroy/delete-error` (from databricks#7930): output now shows both
commands failing with the delete error and the job kept in state;
`Badness` removed and the `DMS=true` variant re-enabled (both variants
now share one golden).
- `bundle/resources/materialization_sets/settled_failure`: its destroy
step recorded the old behavior ("forgives a delete error ... drops the
state while the set stays in the workspace") and was pinned to `DMS=""`
for that reason. It now asserts the destroy fails (`musterr`) and runs
on both variants.

- In the fix PR, `bundle/destroy/delete-error` asserts the failures with
`musterr` and prints the state after the partial destroy: `foo`
(rejected) is kept and `bar` (deleted) is gone.

Scope notes:
- Any delete error that is not missing, managed-by-parent or
permission-denied, and that a re-read cannot confirm as gone, now fails
the command on runs without deployment history, as it did before databricks#6094
and as it already does with history on. A resource type whose backend
reports an in-progress or already-done teardown with some other error
would need its `IsGone` (or the error classification) taught about it; I
did not find such a case among the existing tests.
- When a destroy partly fails, `destroyCore` returns before printing the
`Destroy: N deleted` summary. That is existing behavior for every delete
error (including runs with history) and is left for a separate change.

Overlap: databricks#7496 changes the same lines and keeps the fallthrough (with a
warning and a "removed from state" count). This PR removes the
fallthrough instead; the two need to be reconciled whichever lands
first.

## Why

A destroy that reports success while leaving resources in the workspace
is worse than a failure: the user has no state and no message pointing
at the leftover resource.

This PR was created by analyzing coverage gaps.

Coverage:
[bundle/direct/apply.go](http://go/cli/dashboard/coverage/file/bundle/direct/apply.go),
`(*DeploymentUnit).Delete`, the branch for a delete error that is not
missing, managed-by-parent or permission-denied.

## Tests

`go test ./acceptance -run 'TestAccept/bundle/destroy/delete-error'` and
`TestAccept/bundle/resources/materialization_sets`; `go test
./bundle/...`.

AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

---------

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

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants