Skip to content

Distinguish resources removed from state in bundle summaries - #7496

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

janniklasrose wants to merge 3 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: e52d600eb | Workflow run

Regression test report

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

35 tests: regression=35 unreleased=0 coverage=0 failing=0
test branch main (4bb0730) latest (v1.26.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/catalogs/empty-name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/empty-name/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/resources/dashboards/publish-failure-cleans-up-dashboard/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/dashboards/publish-failure-cleans-up-dashboard/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/dashboards/publish-failure-cleans-up-dashboard/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/dashboards/publish-failure-cleans-up-dashboard/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/postgres_projects/add_default_endpoint_settings/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/postgres_projects/add_default_endpoint_settings/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/postgres_projects/remove_history_retention/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/postgres_projects/remove_history_retention/DMS=true ✅ ❌ ❌
TestAccept/bundle/deploy/empty-resource-id/create/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=3197889106/002/output.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/deploy/empty-resource-id/create/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=true2092522029/002/output.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/deploy/empty-resource-id/update/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/deploy/empty-resource-id/update/output.txt
        +++ /tmp/TestAcceptbundledeployempty-resource-idupdateDMS=1549578951/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.26.0): same output as main (4bb0730)

TestAccept/bundle/deploy/empty-resource-id/update/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/deploy/empty-resource-id/update/output.txt
        +++ /tmp/TestAcceptbundledeployempty-resource-idupdateDMS=true417677531/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.26.0):

acceptance_test.go:1345: Diff:
        --- bundle/deploy/empty-resource-id/update/output.txt
        +++ /tmp/TestAcceptbundledeployempty-resource-idupdateDMS=true3430318335/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
TestAccept/bundle/deploy/summary-on-error/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/deploy/summary-on-error/output.txt
        +++ /tmp/TestAcceptbundledeploysummary-on-errorDMS=3807210031/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.26.0): same output as main (4bb0730)

TestAccept/bundle/deploy/summary-on-error/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/deploy/summary-on-error/output.txt
        +++ /tmp/TestAcceptbundledeploysummary-on-errorDMS=true3954539013/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.26.0): same output as main (4bb0730)

TestAccept/bundle/deployment/bind/postgres_data_api/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/deployment/bind/postgres_data_api/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindpostgres_data_apiDMS=2140793691/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:1123: 
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-11T19:43:18.241361204Z",
        LOG.setup:   "name": "projects/test-project",
        LOG.setup:   "project_id": "test-project",
        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": "7a0c1408-4d90-bfdb-7a0c-14084d90c141",
        LOG.setup:   "update_time": "2026-11-11T19:43:18.241361204Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-11T19:43:18.275697666Z",
        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:   "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-11T19:43:18.275697666Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-11T19:43:18.311080377Z",
        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-7a0c1408-4d90-f4e4-7.database.us-east-1.cloud.databricks.com/api/2.0/workspace/900800700600/rest/app_db"
        LOG.setup:   },
        LOG.setup:   "update_time": "2026-11-11T19:43:18.311080377Z"
        LOG.setup: }

latest (v1.26.0):

acceptance_test.go:1345: Diff:
        --- bundle/deployment/bind/postgres_data_api/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindpostgres_data_apiDMS=1700221693/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:1123: 
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-11T19:43:37.147623528Z",
        LOG.setup:   "name": "projects/test-project",
        LOG.setup:   "project_id": "test-project",
        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": "7a0c140c-b477-6b15-7a0c-140cb4776c0d",
        LOG.setup:   "update_time": "2026-11-11T19:43:37.147623528Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-11T19:43:37.184785229Z",
        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:   "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-11T19:43:37.184785229Z"
        LOG.setup: }
        LOG.setup: {
        LOG.setup:   "create_time": "2026-11-11T19:43:37.220807808Z",
        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-7a0c140c-b477-872e-7.database.us-east-1.cloud.databricks.com/api/2.0/workspace/900800700600/rest/app_db"
        LOG.setup:   },
        LOG.setup:   "update_time": "2026-11-11T19:43:37.220807808Z"
        LOG.setup: }
TestAccept/bundle/destroy/summary-on-error/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/destroy/summary-on-error/output.txt
        +++ /tmp/TestAcceptbundledestroysummary-on-errorDMS=true879130274/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,7 +67,7 @@
         
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-destroy-summary-on-error/default
         
        -Destroy: 2 deleted, 1 removed from state
        +Destroy: 3 deleted
         
         >>> [CLI] jobs get [JOB_01_ID_3]
         {

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/dms/failed-delete/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/dms/failed-delete/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-deleteDMS=true3762038055/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.26.0): same output as main (4bb0730)

TestAccept/bundle/dms/failed-recreate/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/dms/failed-recreate/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-recreateDMS=true425981745/002/output.txt
        @@ -129,7 +129,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 //api/2.0/bundle
         {
        
    acceptance_test.go:1123: 
        LOG.catalog: {
        LOG.catalog:   "catalog_type": "MANAGED_CATALOG",
        LOG.catalog:   "created_at": 1794426196363,
        LOG.catalog:   "created_by": "tester@databricks.com",
        LOG.catalog:   "full_name": "dms_other_xxoei7zqsrcmbe2z3brzubxbly",
        LOG.catalog:   "metastore_id": "7a0c1407-dd9b-7d95-7a0c-1407dd9b7ead",
        LOG.catalog:   "name": "dms_other_xxoei7zqsrcmbe2z3brzubxbly",
        LOG.catalog:   "owner": "tester@databricks.com",
        LOG.catalog:   "updated_at": 1794426196363,
        LOG.catalog:   "updated_by": "tester@databricks.com"
        LOG.catalog: }
    acceptance_test.go:1123: 
        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.26.0):

acceptance_test.go:1345: Diff:
        --- bundle/dms/failed-recreate/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-recreateDMS=true1957501445/002/output.txt
        @@ -129,7 +129,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 //api/2.0/bundle
         {
        
    acceptance_test.go:1123: 
        LOG.catalog: {
        LOG.catalog:   "catalog_type": "MANAGED_CATALOG",
        LOG.catalog:   "created_at": 1794426215842,
        LOG.catalog:   "created_by": "tester@databricks.com",
        LOG.catalog:   "full_name": "dms_other_dmwcjfykfffj5ozft5studlwdu",
        LOG.catalog:   "metastore_id": "7a0c140c-66a5-6fd8-7a0c-140c66a57175",
        LOG.catalog:   "name": "dms_other_dmwcjfykfffj5ozft5studlwdu",
        LOG.catalog:   "owner": "tester@databricks.com",
        LOG.catalog:   "updated_at": 1794426215842,
        LOG.catalog:   "updated_by": "tester@databricks.com"
        LOG.catalog: }
    acceptance_test.go:1123: 
        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 (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/dms/failed-update-permissions/output.txt
        +++ /tmp/TestAcceptbundledmsfailed-update-permissionsDMS=true2884231288/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.26.0): same output as main (4bb0730)

TestAccept/bundle/dms/record-failure/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/dms/record-failure/output.txt
        +++ /tmp/TestAcceptbundledmsrecord-failureDMS=true231091534/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.26.0): same output as main (4bb0730)

TestAccept/bundle/migrate/auto/apply-failure/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/migrate/auto/apply-failure/output.txt
        +++ /tmp/TestAcceptbundlemigrateautoapply-failureDMS=3168597655/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.26.0): same output as main (4bb0730)

TestAccept/bundle/resource_deps/create_error/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/resource_deps/create_error/output.txt
        +++ /tmp/TestAcceptbundleresource_depscreate_errorDMS=385740837/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:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=385740837/001/out.deploy.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resource_deps/create_error/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/resource_deps/create_error/output.txt
        +++ /tmp/TestAcceptbundleresource_depscreate_errorDMS=true3826833891/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:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=true3826833891/001/out.deploy.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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_definitionDMS3171244700/001/out.deploy.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resource_deps/missing_ingestion_definition/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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_definitionDMS603273900/001/out.deploy.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resource_deps/missing_map_key/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=1000989141/001/out.deploy.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resource_deps/missing_map_key/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=true2267994539/001/out.deploy.txt
FAIL

latest (v1.26.0):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1098
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=true159275831/001/out.deploy.txt
TestAccept/bundle/resources/apps/create_already_exists/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/resources/apps/create_already_exists/output.txt
        +++ /tmp/TestAcceptbundleresourcesappscreate_already_existsDMS=248753066/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.26.0): same output as main (4bb0730)

TestAccept/bundle/resources/apps/create_already_exists/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: Diff:
        --- bundle/resources/apps/create_already_exists/output.txt
        +++ /tmp/TestAcceptbundleresourcesappscreate_already_existsDMS=true765201705/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.26.0): same output as main (4bb0730)

TestAccept/bundle/resources/catalogs/empty-name/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=1939062818/002/output.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resources/catalogs/empty-name/DMS=true: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	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=true2321336707/002/output.txt

latest (v1.26.0): same output as main (4bb0730)

TestAccept/bundle/resources/cluster_policies/definition_and_family_conflict/DMS=: branch ✅ | main (4bb0730) ❌ | latest (v1.26.0) ❌

main (4bb0730):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n=== Deploying a policy with both definition and policy_family_id must fail\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...\nError: cannot create resources.cluster_policies.pol: policy_family_id and definition cannot be used together (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.0/policies/clusters/create\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: policy_family_id and definition cannot be used together\n\nFiles: 2 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n"
        	            	actual  : "\n=== Deploying a policy with both definition and policy_family_id must fail\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...\nError: cannot create resources.cluster_policies.pol: policy_family_id and definition cannot be used together (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.0/policies/clusters/create\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: policy_family_id and definition cannot be used together\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/cluster_policies/definition_and_family_conflict/DMS=
        	Messages:   	bundle/resources/cluster_policies/definition_and_family_conflict/output.txt vs /tmp/TestAcceptbundleresourcescluster_policiesdefinition_and_fami3392118996/002/output.txt
    acceptance_test.go:1123: 
        LOG.destroy: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/pyq6f2zgzbgbbjqqbfnfuechum
        LOG.destroy: 
        LOG.destroy: Destroy: 0 deleted

latest (v1.26.0):

acceptance_test.go:1345: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1345
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1086
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n=== Deploying a policy with both definition and policy_family_id must fail\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...\nError: cannot create resources.cluster_policies.pol: policy_family_id and definition cannot be used together (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.0/policies/clusters/create\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: policy_family_id and definition cannot be used together\n\nFiles: 2 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged, 1 failed\n"
        	            	actual  : "\n=== Deploying a policy with both definition and policy_family_id must fail\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...\nError: cannot create resources.cluster_policies.pol: policy_family_id and definition cannot be used together (400 INVALID_PARAMETER_VALUE)\n\nEndpoint: POST [DATABRICKS_URL]/api/2.0/policies/clusters/create\nHTTP Status: 400 Bad Request\nAPI error_code: INVALID_PARAMETER_VALUE\nAPI message: policy_family_id and definition cannot be used together\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/cluster_policies/definition_and_family_conflict/DMS=
        	Messages:   	bundle/resources/cluster_policies/definition_and_family_conflict/output.txt vs /tmp/TestAcceptbundleresourcescluster_policiesdefinition_and_fami4203084265/002/output.txt
    acceptance_test.go:1123: 
        LOG.destroy: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/2c3zelfvgjaqhc6io4tqxg3yvq
        LOG.destroy: 
        LOG.destroy: Destroy: 0 deleted

11 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

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: d056548

Run: 43072565195

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 4 3 323 43 35:16
❌​ aws-windows-latest-4core-16gb 4 328 41 26:15
❌​ azure linux-2core-8gb 4 2 307 50 27:10
❌​ azure-windows-latest-4core-16gb 4 311 48 22:40
❌​ gcp linux-2core-8gb 4 2 314 48 29:14
❌​ gcp-windows-latest-4core-16gb 4 1 317 46 25:42
10 interesting tests: 6 flaky, 4 FAIL
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 ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🔄​ TestAccept/bundle/resources/materialization_sets/batch 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/materialization_sets/batch/DMS= 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
❌​ TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout/DMS= ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/postgres_endpoints/remove_suspend_timeout/DMS=true ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
🔄​ TestAccept/bundle/resources/postgres_endpoints/replace_existing ✅​p ✅​p 🔄​f ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/postgres_endpoints/replace_existing/DMS= ✅​p ✅​p 🔄​f ✅​p 🔄​f ✅​p
🔄​ TestSyncIncrementalFileSync ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestSyncIncrementalSyncPythonNotebookDelete 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
Top 45 slowest tests (at least 2 minutes):
duration env testname
8:27 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
7:04 aws linux-2core-8gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
6:09 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
5:52 gcp linux-2core-8gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
5:12 azure-windows-latest-4core-16gb TestAccept/bundle/resources/job_runs/failed_run/DMS=
4:25 azure-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
4:16 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
3:38 aws linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=
3:34 azure linux-2core-8gb TestAccept/bundle/resources/postgres_databases/live_errors/bad_database_id/DMS=true
3:33 gcp linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
3:33 aws linux-2core-8gb TestAccept/bundle/resources/postgres_data_apis/out-of-band/DMS=
3:29 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_data_apis/out-of-band/DMS=
3:23 aws-windows-latest-4core-16gb TestAccept/bundle/resources/job_runs/failed_run/DMS=true
3:21 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DMS=
3:18 gcp linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=true
3:11 azure linux-2core-8gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
3:02 azure-windows-latest-4core-16gb TestAccept/bundle/resources/job_runs/failed_run/DMS=true
2:58 aws linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
2:52 aws-windows-latest-4core-16gb TestAccept/bundle/resources/job_runs/failed_run/DMS=
2:49 azure linux-2core-8gb TestAccept/bundle/resources/jobs/cluster_policy/config_conflicts_policy/DMS=
2:40 azure-windows-latest-4core-16gb TestExportDir
2:36 aws-windows-latest-4core-16gb TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DMS=
2:34 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:32 azure linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=
2:26 azure linux-2core-8gb TestAccept/bundle/resources/cluster_policies/definition_and_family_conflict/DMS=true
2:24 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/job_runs/failed_run/DMS=true
2:23 aws linux-2core-8gb TestAccept/bundle/resources/postgres_data_apis/update/DMS=
2:23 azure linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=true
2:18 aws linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=true
2:17 azure-windows-latest-4core-16gb TestImportDir
2:17 aws-windows-latest-4core-16gb TestAccept/bundle/resources/cluster_policies/definition_and_family_conflict/DMS=true
2:15 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
2:15 azure-windows-latest-4core-16gb TestLockUnlockWithoutAllowsLockFileNotExist
2:14 aws linux-2core-8gb TestImportDirDoesNotOverwrite
2:11 gcp linux-2core-8gb TestAccept/bundle/resources/postgres_branches/without_branch_id/DMS=true
2:11 gcp linux-2core-8gb TestAccept/bundle/resources/jobs/no-git-provider/DMS=true
2:09 gcp linux-2core-8gb TestAccept/bundle/resources/job_runs/failed_run/DMS=
2:08 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/job_runs/failed_run/DMS=
2:07 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:06 gcp-windows-latest-4core-16gb TestImportDirWithOverwriteFlag
2:03 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_data_apis/update/DMS=
2:03 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_branches/without_branch_id/DMS=true
2:03 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
2:03 aws-windows-latest-4core-16gb TestAccept/bundle/resources/postgres_data_apis/recreate/DMS=
2:03 azure-windows-latest-4core-16gb TestAccept/bundle/resources/jobs/no-git-provider/DMS=true

@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).

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.

4 participants