Skip to content

UC secrets follow a renamed catalog or schema - #7381

Draft
denik wants to merge 9 commits into
denik/models-renamefrom
denik/secrets-parent-rename
Draft

denik wants to merge 9 commits into
denik/models-renamefrom
denik/secrets-parent-rename

Conversation

@denik

@denik denik commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Changes

A UC secret in a renamed catalog or schema (schema_name: ${resources.schemas.<s>.name}) now follows its parent the way volumes do in #7343 and registered models do in #7379: with IDFromState, the framework re-keys it without a request (state_only). It used to be planned as a recreate whose create failed with 409 ALREADY_EXISTS (verified on AWS), and every later deploy tried to create it again.

UC cannot rename a secret, so its name still recreates. When the secret also has its own changes, the new DoUpdateWithID sends the update at the new path. The adapter check used to require updatable_id_fields for a DoUpdateWithID; it now also accepts provided_id_fields, which a parent rename can change.

Stacked on #7379; the test-server support is in #7408.

Tests

  • New secrets/recreate_in_renamed_schema (Cloud = true): rename the schema and the secret in one deploy. The secret is recreated, and the old one is deleted where the schema's rename moved it (the fix is in Rename schemas in place; schemas and volumes follow a renamed catalog or schema #7343). The test server now reports a missing secret with UC's message.
  • New secrets/parent_rename (Cloud = true): rename the schema (no request to the secret), then rename the catalog and change the secret's comment in one deploy (one PATCH at the new path). create_time stays the same and the final plan is a no-op.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Commit: cd48921cc | Workflow run

Regression test report

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

38 tests: regression=36 unreleased=0 coverage=2 failing=0
test branch main (6a8d9bf) latest (v1.25.0)
TestAccept/bundle/resources/catalogs/rename/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/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/catalogs/rename_with_comment/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/catalogs/rename_with_comment/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/rename/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/recreate_interrupted/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/recreate_out_of_band/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/recreate_out_of_band/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_case_only/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_case_only/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_interrupted/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_out_of_band/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_out_of_band/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_then_change/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_then_change/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_comment/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_comment/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_volume/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_volume/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_volume_ref/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_volume_ref/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/volumes/move_from_renamed_schema/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/volumes/move_from_renamed_schema/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/volumes/recreate_in_renamed_schema/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/volumes/recreate_in_renamed_schema/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/volumes/recreate_out_of_band/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/volumes/recreate_out_of_band/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=3168239566/002/output.txt
        @@ -73,8 +73,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -93,17 +92,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -118,8 +108,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -141,17 +130,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -160,63 +140,21 @@
         === Deploy renames the catalog. UC moves the schema and the volume with it, so they get no request
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema and the volume are under the new one, with their original ids
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        -=== The state tracks the new paths
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -235,3 +169,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 3 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1124: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_chbk6fskdvfwdc5sebqdqqsspq.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_chbk6fskdvfwdc5sebqdqqsspq.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_chbk6fskdvfwdc5sebqdqqsspq",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.25.0):

acceptance_test.go:1346: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=164899165/002/output.txt
        @@ -73,8 +73,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -93,17 +92,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -118,8 +108,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -141,17 +130,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -160,63 +140,21 @@
         === Deploy renames the catalog. UC moves the schema and the volume with it, so they get no request
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema and the volume are under the new one, with their original ids
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        -=== The state tracks the new paths
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -235,3 +169,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 3 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1124: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_urmuh2xpzveu3bd57m4zauqh6a.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_urmuh2xpzveu3bd57m4zauqh6a.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_urmuh2xpzveu3bd57m4zauqh6a",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/catalogs/rename/DMS=true: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=true661384346/002/output.txt
        @@ -73,8 +73,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -93,17 +92,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -118,8 +108,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -141,17 +130,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -160,63 +140,21 @@
         === Deploy renames the catalog. UC moves the schema and the volume with it, so they get no request
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema and the volume are under the new one, with their original ids
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        -=== The state tracks the new paths
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -235,3 +169,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 3 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1124: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_3zo2iazgyncuxp3uh4bd5qlqry.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_3zo2iazgyncuxp3uh4bd5qlqry.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_3zo2iazgyncuxp3uh4bd5qlqry",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.25.0):

acceptance_test.go:1346: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=true3266056332/002/output.txt
        @@ -73,8 +73,7 @@
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -93,17 +92,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
               }
             }
           },
        @@ -118,8 +108,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -141,17 +130,11 @@
             },
             "changes": {
               "catalog_name": {
        -        "action": "update_id",
        -        "reason": "parent_renamed",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
                 "new": "test_catalog_renamed_[UNIQUE_NAME]",
                 "remote": "test_catalog_[UNIQUE_NAME]"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
               }
             }
           }
        @@ -160,63 +140,21 @@
         === Deploy renames the catalog. UC moves the schema and the volume with it, so they get no request
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated catalogs.catalog1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged
         
        ->>> print_requests.py //unity-catalog
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/catalogs/test_catalog_[UNIQUE_NAME]",
        -  "body": {
        -    "comment": "",
        -    "custom_max_retention_hours": 0,
        -    "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
        -  }
        -}
        +This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        +  recreate resources.schemas.schema1
         
        -=== The old catalog is gone and the schema and the volume are under the new one, with their original ids
        -old catalog is gone
        +This action will result in the deletion or recreation of the following volumes.
        +For managed volumes, the files stored in the volume are also deleted from your
        +cloud tenant within 30 days. For external volumes, the metadata about the volume
        +is removed from the catalog, but the underlying files are not deleted:
        +  recreate resources.volumes.volume1
        +Error: the deployment requires destructive actions, but the current console does not support prompting.
        +Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        +To proceed, use --auto-approve after reviewing the plan above.
         
        ->>> [CLI] schemas get test_catalog_renamed_[UNIQUE_NAME].myschema
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "schema_id": "[SCHEMA_ID]"
        -}
        +Files: 1 uploaded, 0 deleted
         
        ->>> [CLI] volumes read test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume
        -{
        -  "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume",
        -  "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "volume_id": "[VOLUME_ID]"
        -}
        -
        -=== The state tracks the new paths
        ->>> [CLI] bundle summary --output json
        -{
        -  "catalogs": {
        -    "catalog1": "test_catalog_renamed_[UNIQUE_NAME]"
        -  },
        -  "schemas": {
        -    "schema1": "test_catalog_renamed_[UNIQUE_NAME].myschema"
        -  },
        -  "volumes": {
        -    "volume1": "test_catalog_renamed_[UNIQUE_NAME].myschema.myvolume"
        -  }
        -}
        -
        -=== Redeploy is a no-op
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged
        -
        ->>> print_requests.py //unity-catalog
        -
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.catalogs.catalog1
        @@ -235,3 +169,5 @@
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default
         
         Destroy: 3 deleted
        +
        +Exit code: 1
        
    acceptance_test.go:1124: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_n6mjs6bsfnhz7krebrdjhqhdi4.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_n6mjs6bsfnhz7krebrdjhqhdi4.myschema",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_n6mjs6bsfnhz7krebrdjhqhdi4",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=: branch ✅ | main (6a8d9bf) ❌ | latest (v1.25.0) ❌

main (6a8d9bf):

acceptance_test.go:1346: Diff:
        --- bundle/resources/catalogs/rename_all_out_of_band/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrename_all_out_of_bandDMS=756163126/002/output.txt
        @@ -51,56 +51,35 @@
             }
           },
           "resources.schemas.schema1": {
        -    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema2",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "create",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
                 "name": "myschema2"
               }
             },
        -    "remote_state": {
        -      "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -      "catalog_type": "MANAGED_CATALOG",
        -      "created_at": [UNIX_TIME_MILLIS][0],
        -      "created_by": "[USERNAME]",
        -      "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema2",
        -      "name": "myschema2",
        -      "owner": "[USERNAME]",
        -      "schema_id": "[SCHEMA_ID]"
        -    },
             "changes": {
               "catalog_name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
        -        "new": "test_catalog_renamed_[UNIQUE_NAME]",
        -        "remote": "test_catalog_renamed_[UNIQUE_NAME]"
        +        "new": "test_catalog_renamed_[UNIQUE_NAME]"
               },
               "name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "myschema",
        -        "new": "myschema2",
        -        "remote": "myschema2"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
        +        "new": "myschema2"
               }
             }
           },
           "resources.volumes.volume1": {
        -    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema2.myvolume2",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -111,8 +68,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "create",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -121,44 +77,24 @@
                 "volume_type": "MANAGED"
               }
             },
        -    "remote_state": {
        -      "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -      "created_at": [UNIX_TIME_MILLIS][1],
        -      "created_by": "[USERNAME]",
        -      "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema2.myvolume2",
        -      "name": "myvolume2",
        -      "owner": "[USERNAME]",
        -      "schema_name": "myschema2",
        -      "volume_id": "[VOLUME_ID]",
        -      "volume_type": "MANAGED"
        -    },
             "changes": {
               "catalog_name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
        -        "new": "test_catalog_renamed_[UNIQUE_NAME]",
        -        "remote": "test_catalog_renamed_[UNIQUE_NAME]"
        +        "new": "test_catalog_renamed_[UNIQUE_NAME]"
               },
               "name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "update_id",
        +        "reason": "id_changes",
                 "old": "myvolume",
        -        "new": "myvolume2",
        -        "remote": "myvolume2"
        +        "new": "myvolume2"
               },
               "schema_name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "myschema",
        -        "new": "myschema2",
        -        "remote": "myschema2"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
        +        "new": "myschema2"
               }
             }
           }
        @@ -174,9 +101,9 @@
         API error_code: CATALOG_ALREADY_EXISTS
         API message: Catalog 'test_catalog_renamed_[UNIQUE_NAME]' already exists
         
        -Error: cannot update_id resources.schemas.schema1: dependency failed: resources.catalogs.catalog1
        +Error: cannot create resources.schemas.schema1: dependency failed: resources.catalogs.catalog1
         
        -Error: cannot update_id resources.volumes.volume1: dependency failed: resources.catalogs.catalog1
        +Error: cannot create resources.volumes.volume1: dependency failed: resources.catalogs.catalog1
         
         Files: 3 uploaded, 0 deleted
         
        
    acceptance_test.go:1124: 
        LOG.deploy_requests: {
        LOG.deploy_requests:   "method": "POST",
        LOG.deploy_requests:   "path": "/api/2.1/unity-catalog/catalogs",
        LOG.deploy_requests:   "body": {
        LOG.deploy_requests:     "name": "test_catalog_6hcog4w6lvbypd665fgfotveoq"
        LOG.deploy_requests:   }
        LOG.deploy_requests: }
        LOG.deploy_requests: {
        LOG.deploy_requests:   "method": "POST",
        LOG.deploy_requests:   "path": "/api/2.1/unity-catalog/schemas",
        LOG.deploy_requests:   "body": {
        LOG.deploy_requests:     "catalog_name": "test_catalog_6hcog4w6lvbypd665fgfotveoq",
        LOG.deploy_requests:     "name": "myschema"
        LOG.deploy_requests:   }
        LOG.deploy_requests: }
        LOG.deploy_requests: {
        LOG.deploy_requests:   "method": "POST",
        LOG.deploy_requests:   "path": "/api/2.1/unity-catalog/volumes",
        LOG.deploy_requests:   "body": {
        LOG.deploy_requests:     "catalog_name": "test_catalog_6hcog4w6lvbypd665fgfotveoq",
        LOG.deploy_requests:     "name": "myvolume",
        LOG.deploy_requests:     "schema_name": "myschema",
        LOG.deploy_requests:     "volume_type": "MANAGED"
        LOG.deploy_requests:   }
        LOG.deploy_requests: }
    acceptance_test.go:1124: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "POST",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs",
        LOG.destroy_requests:   "body": {
        LOG.destroy_requests:     "name": "test_catalog_renamed_6hcog4w6lvbypd665fgfotveoq"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_renamed_6hcog4w6lvbypd665fgfotveoq",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
    acceptance_test.go:1124: 
        LOG.rename_requests: {
        LOG.rename_requests:   "method": "PATCH",
        LOG.rename_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_6hcog4w6lvbypd665fgfotveoq.myschema.myvolume",
        LOG.rename_requests:   "body": {
        LOG.rename_requests:     "new_name": "myvolume2"
        LOG.rename_requests:   }
        LOG.rename_requests: }
        LOG.rename_requests: {
        LOG.rename_requests:   "method": "PATCH",
        LOG.rename_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_6hcog4w6lvbypd665fgfotveoq.myschema",
        LOG.rename_requests:   "body": {
        LOG.rename_requests:     "new_name": "myschema2"
        LOG.rename_requests:   }
        LOG.rename_requests: }
... (7 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.25.0):

acceptance_test.go:1346: Diff:
        --- bundle/resources/catalogs/rename_all_out_of_band/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrename_all_out_of_bandDMS=469764603/002/output.txt
        @@ -51,56 +51,35 @@
             }
           },
           "resources.schemas.schema1": {
        -    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema2",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
                 "label": "${resources.catalogs.catalog1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "create",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
                 "name": "myschema2"
               }
             },
        -    "remote_state": {
        -      "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -      "catalog_type": "MANAGED_CATALOG",
        -      "created_at": [UNIX_TIME_MILLIS][0],
        -      "created_by": "[USERNAME]",
        -      "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema2",
        -      "name": "myschema2",
        -      "owner": "[USERNAME]",
        -      "schema_id": "[SCHEMA_ID]"
        -    },
             "changes": {
               "catalog_name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
        -        "new": "test_catalog_renamed_[UNIQUE_NAME]",
        -        "remote": "test_catalog_renamed_[UNIQUE_NAME]"
        +        "new": "test_catalog_renamed_[UNIQUE_NAME]"
               },
               "name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "myschema",
        -        "new": "myschema2",
        -        "remote": "myschema2"
        -      },
        -      "schema_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[SCHEMA_ID]",
        -        "remote": "[SCHEMA_ID]"
        +        "new": "myschema2"
               }
             }
           },
           "resources.volumes.volume1": {
        -    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema2.myvolume2",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -111,8 +68,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "create",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -121,44 +77,24 @@
                 "volume_type": "MANAGED"
               }
             },
        -    "remote_state": {
        -      "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -      "created_at": [UNIX_TIME_MILLIS][1],
        -      "created_by": "[USERNAME]",
        -      "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema2.myvolume2",
        -      "name": "myvolume2",
        -      "owner": "[USERNAME]",
        -      "schema_name": "myschema2",
        -      "volume_id": "[VOLUME_ID]",
        -      "volume_type": "MANAGED"
        -    },
             "changes": {
               "catalog_name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "test_catalog_[UNIQUE_NAME]",
        -        "new": "test_catalog_renamed_[UNIQUE_NAME]",
        -        "remote": "test_catalog_renamed_[UNIQUE_NAME]"
        +        "new": "test_catalog_renamed_[UNIQUE_NAME]"
               },
               "name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "update_id",
        +        "reason": "id_changes",
                 "old": "myvolume",
        -        "new": "myvolume2",
        -        "remote": "myvolume2"
        +        "new": "myvolume2"
               },
               "schema_name": {
        -        "action": "skip",
        -        "reason": "remote_already_set",
        +        "action": "recreate",
        +        "reason": "id_field",
                 "old": "myschema",
        -        "new": "myschema2",
        -        "remote": "myschema2"
        -      },
        -      "volume_id": {
        -        "action": "skip",
        -        "reason": "internal_id",
        -        "old": "[VOLUME_ID]",
        -        "remote": "[VOLUME_ID]"
        +        "new": "myschema2"
               }
             }
           }
        @@ -174,9 +101,9 @@
         API error_code: CATALOG_ALREADY_EXISTS
         API message: Catalog 'test_catalog_renamed_[UNIQUE_NAME]' already exists
         
        -Error: cannot update_id resources.schemas.schema1: dependency failed: resources.catalogs.catalog1
        +Error: cannot create resources.schemas.schema1: dependency failed: resources.catalogs.catalog1
         
        -Error: cannot update_id resources.volumes.volume1: dependency failed: resources.catalogs.catalog1
        +Error: cannot create resources.volumes.volume1: dependency failed: resources.catalogs.catalog1
         
         Files: 3 uploaded, 0 deleted
         
        
    acceptance_test.go:1124: 
        LOG.deploy_requests: {
        LOG.deploy_requests:   "method": "POST",
        LOG.deploy_requests:   "path": "/api/2.1/unity-catalog/catalogs",
        LOG.deploy_requests:   "body": {
        LOG.deploy_requests:     "name": "test_catalog_gdxaqbpv2zd5hptkgpw3peyxxu"
        LOG.deploy_requests:   }
        LOG.deploy_requests: }
        LOG.deploy_requests: {
        LOG.deploy_requests:   "method": "POST",
        LOG.deploy_requests:   "path": "/api/2.1/unity-catalog/schemas",
        LOG.deploy_requests:   "body": {
        LOG.deploy_requests:     "catalog_name": "test_catalog_gdxaqbpv2zd5hptkgpw3peyxxu",
        LOG.deploy_requests:     "name": "myschema"
        LOG.deploy_requests:   }
        LOG.deploy_requests: }
        LOG.deploy_requests: {
        LOG.deploy_requests:   "method": "POST",
        LOG.deploy_requests:   "path": "/api/2.1/unity-catalog/volumes",
        LOG.deploy_requests:   "body": {
        LOG.deploy_requests:     "catalog_name": "test_catalog_gdxaqbpv2zd5hptkgpw3peyxxu",
        LOG.deploy_requests:     "name": "myvolume",
        LOG.deploy_requests:     "schema_name": "myschema",
        LOG.deploy_requests:     "volume_type": "MANAGED"
        LOG.deploy_requests:   }
        LOG.deploy_requests: }
    acceptance_test.go:1124: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "POST",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs",
        LOG.destroy_requests:   "body": {
        LOG.destroy_requests:     "name": "test_catalog_renamed_gdxaqbpv2zd5hptkgpw3peyxxu"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/catalogs/test_catalog_renamed_gdxaqbpv2zd5hptkgpw3peyxxu",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
    acceptance_test.go:1124: 
        LOG.rename_requests: {
        LOG.rename_requests:   "method": "PATCH",
        LOG.rename_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_gdxaqbpv2zd5hptkgpw3peyxxu.myschema.myvolume",
        LOG.rename_requests:   "body": {
        LOG.rename_requests:     "new_name": "myvolume2"
        LOG.rename_requests:   }
        LOG.rename_requests: }
        LOG.rename_requests: {
        LOG.rename_requests:   "method": "PATCH",
        LOG.rename_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_gdxaqbpv2zd5hptkgpw3peyxxu.myschema",
        LOG.rename_requests:   "body": {
        LOG.rename_requests:     "new_name": "myschema2"
        LOG.rename_requests:   }
        LOG.rename_requests: }
... (7 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

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

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: cd48921

Run: 42845134338

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 358 34 18:27
🔄​ aws-windows-latest-4core-16gb 1 359 32 21:30
🔄​ azure linux-2core-8gb 3 354 34 19:12
✅​ azure-windows-latest-4core-16gb 359 32 20:59
🔄​ gcp linux-2core-8gb 4 354 34 25:55
✅​ gcp-windows-latest-4core-16gb 360 32 24:38
8 interesting tests: 8 flaky
Test Name aws-windows-latest-4core-16gb azure linux-2core-8gb gcp linux-2core-8gb
🔄​ TestAccept ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/catalogs/rename_out_of_band ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/catalogs/rename_out_of_band/DMS=true ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/schemas/rename_with_comment ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/schemas/rename_with_comment/DMS= ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/schemas/rename_with_volume ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/schemas/rename_with_volume/DMS=true ✅​p 🔄​f ✅​p
🔄​ TestSyncIncrementalFileOverwritesFolder 🔄​f ✅​p ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
5:14 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
4:21 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
4:19 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
4:18 azure linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
4:08 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
3:52 azure linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
3:26 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
3:25 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
3:22 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=
3:13 gcp linux-2core-8gb TestAccept/bundle/resources/registered_models/rename/DMS=
3:07 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
3:03 gcp-windows-latest-4core-16gb TestAccept
3:01 aws-windows-latest-4core-16gb TestAccept
2:59 azure-windows-latest-4core-16gb TestAccept
2:54 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
2:53 aws linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
2:52 gcp linux-2core-8gb TestAccept/bundle/resources/secrets/parent_rename/DMS=true
2:48 azure-windows-latest-4core-16gb TestAccept/bundle/resources/volumes/rename_catalog_and_schema/DMS=
2:39 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_with_volume/DMS=true
2:38 azure linux-2core-8gb TestAccept/bundle/resources/registered_models/rename/DMS=true
2:36 gcp linux-2core-8gb TestAccept/bundle/resources/registered_models/rename/DMS=true
2:36 gcp linux-2core-8gb TestAccept/bundle/resources/catalogs/rename_with_comment/DMS=
2:35 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename/DMS=
2:34 azure linux-2core-8gb TestAccept/bundle/resources/registered_models/rename/DMS=
2:34 aws linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
2:32 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_out_of_band/DMS=
2:31 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:30 gcp linux-2core-8gb TestAccept/bundle/dms/deployment-metadata-change/DMS=true
2:25 gcp linux-2core-8gb TestTelemetryEndpoint
2:24 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/secrets/parent_rename/DMS=
2:22 aws-windows-latest-4core-16gb TestAccept/bundle/resources/volumes/comment_out_of_band/DMS=
2:22 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_with_volume/DMS=
2:20 gcp linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=true
2:14 aws linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=
2:14 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/secrets/parent_rename/DMS=true
2:13 azure linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=
2:12 aws linux-2core-8gb TestAccept/bundle/resources/volumes/rename_case_only/DMS=
2:11 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
2:09 gcp linux-2core-8gb TestAccept/bundle/resources/registered_models/basic/DMS=
2:09 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/rename/DMS=true
2:05 aws-windows-latest-4core-16gb TestAccept/bundle/resources/grants/schemas/change_name/DMS=true
2:05 gcp-windows-latest-4core-16gb TestAccept/bundle/dms/successful-recreate/DMS=true
2:04 aws linux-2core-8gb TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true
2:04 aws linux-2core-8gb TestAccept/bundle/resources/secrets/parent_rename/DMS=true
2:02 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/catalogs/rename_all_out_of_band/DMS=true
2:02 azure linux-2core-8gb TestAccept/bundle/resources/schemas/rename_with_volume/DMS=
2:01 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
2:00 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/grants/schemas/duplicate_principals/DMS=
2:00 azure-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=
2:00 aws-windows-latest-4core-16gb TestAccept/bundle/resources/secrets/parent_rename/DMS=true

@denik
denik force-pushed the denik/secrets-parent-rename branch from 344a6c9 to 24b12d9 Compare November 6, 2026 11:21
@denik
denik force-pushed the denik/secrets-parent-rename branch from 24b12d9 to 35b8737 Compare November 6, 2026 11:58
@denik
denik force-pushed the denik/secrets-parent-rename branch from 35b8737 to 5bd3516 Compare November 6, 2026 12:25
@denik
denik force-pushed the denik/secrets-parent-rename branch from 5bd3516 to a333a4b Compare November 9, 2026 10:06
@denik
denik force-pushed the denik/secrets-parent-rename branch from a333a4b to 4ccf5ab Compare November 9, 2026 10:17
@denik
denik force-pushed the denik/secrets-parent-rename branch from 4ccf5ab to cdc56bf Compare November 9, 2026 11:52
@denik
denik force-pushed the denik/secrets-parent-rename branch from cdc56bf to 0d1ef07 Compare November 9, 2026 13:12
@denik
denik force-pushed the denik/secrets-parent-rename branch from 0d1ef07 to d16b7c2 Compare November 9, 2026 14:52
@denik
denik added this pull request to stack #7411 November 9, 2026 14:54
@denik
denik force-pushed the denik/secrets-parent-rename branch from d16b7c2 to 5e37c6e Compare November 9, 2026 14:59
@github-actions github-actions Bot added the DABs DABs related issues label Nov 9, 2026
@denik
denik force-pushed the denik/secrets-parent-rename branch from 5e37c6e to 2957d38 Compare November 9, 2026 15:11
@denik
denik force-pushed the denik/secrets-parent-rename branch from 2957d38 to ce6daec Compare November 9, 2026 15:43
@denik
denik force-pushed the denik/secrets-parent-rename branch from ce6daec to 2b74f07 Compare November 9, 2026 20:33
@denik
denik force-pushed the denik/secrets-parent-rename branch from 2b74f07 to 7f7dd30 Compare November 10, 2026 13:23
@denik
denik force-pushed the denik/secrets-parent-rename branch from 7f7dd30 to 6177b6a Compare November 10, 2026 14:14
@denik
denik force-pushed the denik/secrets-parent-rename branch from 6177b6a to cd48921 Compare November 10, 2026 15:28
denik and others added 9 commits November 10, 2026 16:42
UC moves a secret with its renamed parent, so the planner now re-keys it
(update_id, parent_renamed) instead of recreating it, which failed with
ALREADY_EXISTS. A secret cannot be renamed itself, so its DoUpdateWithID only
re-keys; the adapter check now accepts DoUpdateWithID for a resource whose
provided_id_fields a parent rename can change.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…t; drop duplicated test-server moves

Co-authored-by: Isaac <no-reply@databricks.com>
The recreate deletes the secret at its recorded path after the schema's rename
moved it, so the moved secret is left behind.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the denik/secrets-parent-rename branch from cd48921 to 21ac5c2 Compare November 10, 2026 16:06
idelafuente-oc pushed a commit to idelafuente-oc/cli that referenced this pull request Nov 11, 2026
…names (databricks#7408)

## Changes

Make the test server behave like Unity Catalog where the UC rename PRs
depend on it:

- A renamed catalog moves its schemas, volumes, registered models and
secrets. A renamed schema moves its volumes, registered models and
secrets.
- A forced catalog or schema delete also deletes what is in it.
- Creating a catalog under a taken name fails with
`CATALOG_ALREADY_EXISTS`.
- A renamed schema or volume gets a lowercased name. A renamed
registered model updates its `full_name` and keeps its versions, and
setting `name` and `new_name` in one update is rejected.

The `schema-catalog-change` and `registered-model-catalog-change`
migrate scripts created a catalog that their captured replay creates
again; the fake now rejects that, so the scripts no longer create it.

## Tests

New `acceptance/cmd/workspace/uc-renames` (Cloud = true) checks each
behavior with plain CLI calls. It passes locally and on AWS, GCP and
Azure.

Next: databricks#7343 (schema rename) stacks
on this PR, followed by databricks#7379 and
databricks#7381.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
idelafuente-oc pushed a commit to idelafuente-oc/cli that referenced this pull request Nov 14, 2026
… or schema (databricks#7343)

## Changes
Changing a schema's `name` now renames it in place (`PATCH new_name`)
instead of deleting and recreating it, so the schema and its contents
survive.

UC moves the children of a renamed catalog or schema along with it. A
volume in a renamed schema, or a schema in a renamed catalog
(`schema_name`/`catalog_name: ${resources.<parent>.name}`), used to be
planned as a recreate, whose create then failed with
`RESOURCE_ALREADY_EXISTS` on every deploy. The planner now re-keys such
children (`update_id`, reason `parent_renamed`). Catalog rename was
already supported and had the same latent bug for child schemas.
- A child whose only change is following its parent is `state_only`: the
framework saves it under the ID the adapter's new optional `IDFromState`
gives it, with no request. It is left out of the text plan and counted
as unchanged. A child with its own changes too goes through
`DoUpdateWithID` at its new path.
- A child recreated in the same deploy as its parent's rename is deleted
where the rename moved it: the plan points the delete at the re-keyed ID
(the entry's `id`) and orders it after the parent, taken from the
state's `depends_on` because the config may now reference another one.
Before, the delete went to the old path and the moved volume was left
behind.
- Registered models and UC secrets cannot follow a rename until
databricks#7379 and
databricks#7381, so in a renamed schema they
are recreated where the rename moved them, as on main.

A resource can also be missing from its recorded ID with no rename in
the plan: a deploy stopped after renaming its parent, or it was renamed
out of band. The plan then reads it at the `IDFromState` ID and takes
what it finds only if its internal ID matches the recorded one, so a
different object under that name is never adopted; the plan entry's `id`
(declared, but never set until now) records where it is, and apply
addresses it there. If that read fails with anything but not-found, the
plan warns and goes on as before.
- The new `internal_id_field` lifecycle setting names the internal ID
(`schema_id`, `volume_id`). The framework records it from the remote
state on every save, and the plan skips it (reason `internal_id`).
- A state recorded without it (by an older CLI, or by `bind`) gets it
from a state-only update. Like a skip, it needs no confirmation in
`bind`, and references to it read the remote state. A migration from
terraform records it directly: `schema_id` from the terraform state,
`volume_id` from the remote (read by `bundle deployment migrate`, taken
from the plan check when migrating on deploy).
- With the new state fields, `apitypes.generated.yml` maps schemas and
volumes to `SchemaInfo`/`VolumeInfo`, as registered models already map
to their Info type.

The test server now looks a volume's full name up case-insensitively and
rejects a taken schema name, like UC. `state_present` and the
synced-table terraform fixture no longer create a schema twice. The
earlier test-server work is in
databricks#7408 (merged).

Known gaps, all as on main, recorded with `Badness`: destroy does not
look for a resource renamed out of band
(`schemas/destroy_after_rename_out_of_band`); the plan takes whatever is
at the recorded name without checking the internal ID
(`schemas/foreign_at_recorded_name`); a catalog renamed out of band is
not found (`catalogs/rename_out_of_band`, fixed by
databricks#7418). A parent named by a
literal rather than a reference is not followed, nor is one interpolated
into another field (a quality monitor's `table_name`).

With databricks#7345 and
databricks#7361 (merged), a renamed schema
keeps its grants and permissions in sync. Registered models and UC
secrets follow parent renames in
databricks#7379 and
databricks#7381.

## Tests
Acceptance tests marked `Cloud = true` pass locally and on AWS, GCP and
Azure.
- Renames, `Cloud = true`: `schemas/rename`,
`schemas/rename_with_volume`, `catalogs/rename` (catalog → schema →
volume), `volumes/rename_catalog_and_schema` (two parent renames at
once), `schemas/rename_with_volume_ref` (a job reading the volume's
`full_name`, `id`, `volume_id`), `schemas/rename_then_change` (update,
rename and recreate reach the new path, also after a second rename and a
rename back).
- Rename together with another change (one PATCH):
`schemas/rename_with_comment`, `catalogs/rename_with_comment`. Case-only
renames: `schemas/rename_case_only`, `volumes/rename_case_only` (UC
keeps the lowercase name; a re-key under a renamed schema keeps the
config's casing, which UC reads case-insensitively).
- Recreate during a parent rename: `volumes/move_from_renamed_schema`
(`Cloud = true`), `volumes/recreate_in_renamed_schema` (local only: an
external volume needs an external location),
`schemas/rename_with_model_and_secret` (`Cloud = true`).
- Out of band: `volumes/rename_out_of_band`,
`schemas/rename_out_of_band` (found by id, no requests),
`catalogs/rename_out_of_band`, `catalogs/rename_all_out_of_band`,
`volumes/recreate_out_of_band`, `schemas/recreate_out_of_band` (a
different id: created, not adopted),
`schemas/rename_out_of_band_old_state` (a state without the ids records
them, then follows the rename), `volumes/old_state_ref` (a job reading
the volume's fields stays unchanged while the ids are recorded).
`deployment/bind/volume` now binds without `--auto-approve`.
- Interrupted deploys (local only, kill hook):
`schemas/rename_interrupted`, `schemas/recreate_interrupted`. A failed
lookup read: `schemas/rename_probe_forbidden` (local only, injected
403).
- The key rename tests also deploy from a saved plan
(`EnvMatrix.READPLAN`).
- Migration: `migrate/command/{basic,grants}` record the ids; the
invariant `migrate` and `auto-migrate` targets show no drift.
`grants/schemas/change_name` and `migrate/auto/schema-rename` show the
in-place rename; `lifecycle/prevent-destroy` switched its recreate
trigger from `name` to `catalog_name`.
- Unit tests for `addParentMoves`, `followsParentRename`,
`Changes.HasOnlySingleReason` and the skipped internal-ID changes.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Jan N Rose <janniklas.rose@gmail.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.

2 participants