Skip to content

Rename registered models in place; a model in a renamed catalog or schema keeps its versions - #7379

Open
denik wants to merge 44 commits into
mainfrom
denik/models-rename
Open

denik wants to merge 44 commits into
mainfrom
denik/models-rename

Conversation

@denik

@denik denik commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Changing a registered model's name now renames it in place (PATCH new_name) instead of deleting and recreating it, so the model keeps its versions. The recreate only matched Terraform, which is gone.

A model in a renamed catalog or schema (schema_name: ${resources.schemas.<s>.name}) now follows its parent the way volumes do since #7343: with IDFromState, the framework re-keys it without a request (state_only). Before, it was recreated where the parent's rename moved it, which deleted its versions.

UC rejects an update that sets both name and new_name, so a rename leaves name out (#7408 makes the test server reject it too). Changed aliases are set before the rename, under the current name, so a failed alias leaves the model unrenamed and the state still pointing at it.

When a parent's rename moved a resource and the resource has its own changes too, the framework now records the moved ID before updating it there. The parent is applied first, so a failed or interrupted update used to leave the state at the old ID, and a model (no internal ID) could not be found again: every later deploy failed with RESOURCE_ALREADY_EXISTS.

Stacked on #7718. UC secrets get the same fix in #7381.

Tests

New tests (Cloud = true unless noted):

  • registered_models/rename: the model is renamed in place with the same created_at, and a rename together with a comment change goes in one PATCH.
  • registered_models/rename_with_aliases (local only, versions come from the test server): the alias is set before the rename, the versions move with the model, and an alias to a missing version fails before anything is renamed.
  • registered_models/rename_catalog_and_schema: the model follows its catalog and schema renamed in one deploy, with no request.
  • registered_models/move_from_renamed_schema: moving the model out of a renamed schema recreates it and deletes the old one where the rename moved it.
  • registered_models/rename_to_existing_name: renaming onto a taken name fails with RESOURCE_ALREADY_EXISTS and keeps both models.
  • grants/registered_model_change_name: the model's grants follow its in-place rename.
  • registered_models/parent_rename_interrupted (local only): the deploy is killed on the model's update after its schema's rename; the next deploy updates the model at its new path.
  • registered_models/parent_rename_out_of_band (Badness): a model has no recorded id, so when its schema is renamed outside the bundle the plan creates it again and UC rejects the create. Same on main.

A model added to existing parent-rename tests:

  • catalogs/rename: the model follows a catalog rename with the schema and the volume.
  • schemas/rename_then_change: after its schema is renamed, the model's update, rename and move to another schema all reach it at its new path.

Updated goldens:

  • registered_models/basic and migrate/auto/registered-model-rename: a name change now renames.
  • schemas/rename_with_model_and_secret: the model now follows the schema's rename; the secret is still recreated.
  • schemas/rename_referenced_by_name (from Delete the old resource when its name follows a renamed schema #7718): the model named after the renamed schema is renamed in place.
  • schemas/rename_interrupted: the volume's new path is recorded before its update, so the next plan updates it there.

The test server now matches UC (checked on AWS, Azure and GCP) for a missing model (Routine or Model '...' does not exist.), a create or rename onto a taken name (400 RESOURCE_ALREADY_EXISTS, Routine or Model '<name>' already exists).

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: 72adf9c1b | Workflow run

Regression test report

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

38 tests: regression=31 unreleased=0 coverage=7 failing=0
test branch main (ef8fc0b) latest (v1.27.0)
TestAccept/bundle/migrate/auto/registered-model-rename/DMS= ✅ ❌ ❌
TestAccept/bundle/migrate/auto/volume-type-change/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/grants/registered_model_change_name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/grants/registered_model_change_name/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/basic/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/basic/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=/READPLAN= ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=true/READPLAN= ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=true/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/parent_rename_interrupted/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/parent_rename_out_of_band/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/parent_rename_out_of_band/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/registered_models/rename/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_case_only/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_case_only/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_catalog_and_schema/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_to_existing_name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_to_existing_name/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_with_aliases/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/registered_models/rename_with_aliases/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_interrupted/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_referenced_by_name/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_referenced_by_name/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_model_and_secret/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/schemas/rename_with_model_and_secret/DMS=true ✅ ❌ ❌
TestAccept/bundle/migrate/auto/registered-model-rename/DMS=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/migrate/auto/registered-model-rename/output.txt
        +++ /tmp/TestAcceptbundlemigrateautoregistered-model-renameDMS=1394499736/002/output.txt
        @@ -6,15 +6,16 @@
         === Rename the model (an updatable id field) and deploy on direct
         
         >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy
        -Warn: migration to direct: registered_models.my_model: name differs between config ("themodel-[UNIQUE_NAME]-renamed") and terraform state ("themodel-[UNIQUE_NAME]"); this resource will be renamed.
        +Warn: migration to direct: registered_models.my_model: name differs between config ("themodel-[UNIQUE_NAME]-renamed") and terraform state ("themodel-[UNIQUE_NAME]"); this resource will be recreated.
         Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
         Migrated 2 resources to direct deployment engine.
        -Updated registered_models.my_model
        +Recreated registered_models.my_model
         Files: 2 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged
        +Resources: 1 created, 0 changed, 1 deleted, 1 unchanged
         
         >>> print_migration_telemetry
        +direct_migrate_recreate_planned true
         direct_migrated_via_env true
         
         === Redeploy on direct: the model now matches config, so the plan is a clean no-op

latest (v1.27.0): same output as main (ef8fc0b)

TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=298424029/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_wvpw7tue7fadzmrhv3xbpgqds4.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_wvpw7tue7fadzmrhv3xbpgqds4.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_renamed_wvpw7tue7fadzmrhv3xbpgqds4.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_renamed_wvpw7tue7fadzmrhv3xbpgqds4",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=467049910/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_mvijdu4irzah3kep3eai57ibw4.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_mvijdu4irzah3kep3eai57ibw4.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_renamed_mvijdu4irzah3kep3eai57ibw4.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_renamed_mvijdu4irzah3kep3eai57ibw4",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=12390894510/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_ckw7yudqmjb2nfy2kx3mrgsv3y.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_ckw7yudqmjb2nfy2kx3mrgsv3y.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_renamed_ckw7yudqmjb2nfy2kx3mrgsv3y.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_renamed_ckw7yudqmjb2nfy2kx3mrgsv3y",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=READPLAN=12004714911/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_t25gvj52bva5dlsuf7rzk2dqsy.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_t25gvj52bva5dlsuf7rzk2dqsy.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_renamed_t25gvj52bva5dlsuf7rzk2dqsy.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_renamed_t25gvj52bva5dlsuf7rzk2dqsy",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=4143064706/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_hx62zuvnm5a47ag22ylywkkdeu.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_hx62zuvnm5a47ag22ylywkkdeu.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_renamed_hx62zuvnm5a47ag22ylywkkdeu.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_renamed_hx62zuvnm5a47ag22ylywkkdeu",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=2397388058/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_pe2vpz5iafh4hf2ycuv3nok6rm.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_pe2vpz5iafh4hf2ycuv3nok6rm.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_renamed_pe2vpz5iafh4hf2ycuv3nok6rm.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_renamed_pe2vpz5iafh4hf2ycuv3nok6rm",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=11910711078/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_heee3awgvvbppprxtmkyjj4yw4.myschema.myvolume"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_heee3awgvvbppprxtmkyjj4yw4.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/test_catalog_renamed_heee3awgvvbppprxtmkyjj4yw4.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_renamed_heee3awgvvbppprxtmkyjj4yw4",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- bundle/resources/catalogs/rename/output.txt
        +++ /tmp/TestAcceptbundleresourcescatalogsrenameDMS=trueREADPLAN=13119061541/002/output.txt
        @@ -79,6 +79,7 @@
             }
           },
           "resources.registered_models.model1": {
        +    "id": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
             "depends_on": [
               {
                 "node": "resources.catalogs.catalog1",
        @@ -89,8 +90,7 @@
                 "label": "${resources.schemas.schema1.name}"
               }
             ],
        -    "action": "update_id",
        -    "state_only": true,
        +    "action": "recreate",
             "new_state": {
               "value": {
                 "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        @@ -108,8 +108,8 @@
             },
             "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]"
        @@ -224,9 +224,10 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        +Recreated registered_models.model1
         Updated catalogs.catalog1
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 2 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        @@ -238,6 +237,19 @@
             "new_name": "test_catalog_renamed_[UNIQUE_NAME]"
           }
         }
        +{
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
        +  "body": {
        +    "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        +    "name": "mymodel",
        +    "schema_name": "myschema"
        +  }
        +}
         
         === The old catalog is gone and the schema, the volume and the model are under the new one, not recreated
         old catalog is gone
        @@ -260,7 +272,7 @@
         {
           "full_name": "test_catalog_renamed_[UNIQUE_NAME].myschema.mymodel",
           "catalog_name": "test_catalog_renamed_[UNIQUE_NAME]",
        -  "created_at": [MODEL_CREATED_AT]
        +  "created_at": [UNIX_TIME_MILLIS]
         }
         
         === The state tracks the new paths
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/test_catalog_renamed_cngh6rhlzfhy3ha35qkukhf3ki.myschema.mymodel"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/volumes/test_catalog_renamed_cngh6rhlzfhy3ha35qkukhf3ki.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_renamed_cngh6rhlzfhy3ha35qkukhf3ki.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_renamed_cngh6rhlzfhy3ha35qkukhf3ki",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/grants/registered_model_change_name/DMS=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/grants/registered_model_change_name/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsregistered_model_change_name785254548/002/output.txt
        @@ -67,19 +67,22 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated registered_models.model1
        +Recreated registered_models.model1
         Updated registered_models.model1.grants
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 1 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 1 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel",
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
           "body": {
             "catalog_name": "main",
        -    "comment": "",
        -    "new_name": "mymodel_renamed",
        +    "name": "mymodel_renamed",
             "schema_name": "test-schema-[UNIQUE_NAME]"
           }
         }
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/main.test-schema-usfvy5plrjahnpdcmnt6ln5wya.mymodel_renamed"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/main.test-schema-usfvy5plrjahnpdcmnt6ln5wya",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- bundle/resources/grants/registered_model_change_name/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsregistered_model_change_name503192341/002/output.txt
        @@ -67,19 +67,22 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated registered_models.model1
        +Recreated registered_models.model1
         Updated registered_models.model1.grants
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 1 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 1 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel",
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
           "body": {
             "catalog_name": "main",
        -    "comment": "",
        -    "new_name": "mymodel_renamed",
        +    "name": "mymodel_renamed",
             "schema_name": "test-schema-[UNIQUE_NAME]"
           }
         }
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/main.test-schema-gf6lu2zgxverrjks63vitbz764.mymodel_renamed"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/main.test-schema-gf6lu2zgxverrjks63vitbz764",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/grants/registered_model_change_name/DMS=true: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/grants/registered_model_change_name/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsregistered_model_change_name10575409/002/output.txt
        @@ -67,19 +67,22 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated registered_models.model1
        +Recreated registered_models.model1
         Updated registered_models.model1.grants
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 1 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 1 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel",
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
           "body": {
             "catalog_name": "main",
        -    "comment": "",
        -    "new_name": "mymodel_renamed",
        +    "name": "mymodel_renamed",
             "schema_name": "test-schema-[UNIQUE_NAME]"
           }
         }
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/main.test-schema-4txrebuevzgfreqyv4r4im5mze.mymodel_renamed"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/main.test-schema-4txrebuevzgfreqyv4r4im5mze",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }

latest (v1.27.0):

acceptance_test.go:1400: Diff:
        --- bundle/resources/grants/registered_model_change_name/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsregistered_model_change_name1802339974/002/output.txt
        @@ -67,19 +67,22 @@
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
        -Updated registered_models.model1
        +Recreated registered_models.model1
         Updated registered_models.model1.grants
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 1 unchanged
        +Resources: 1 created, 1 changed, 1 deleted, 1 unchanged
         
         >>> print_requests.py //unity-catalog
         {
        -  "method": "PATCH",
        -  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel",
        +  "method": "DELETE",
        +  "path": "/api/2.1/unity-catalog/models/main.test-schema-[UNIQUE_NAME].mymodel"
        +}
        +{
        +  "method": "POST",
        +  "path": "/api/2.1/unity-catalog/models",
           "body": {
             "catalog_name": "main",
        -    "comment": "",
        -    "new_name": "mymodel_renamed",
        +    "name": "mymodel_renamed",
             "schema_name": "test-schema-[UNIQUE_NAME]"
           }
         }
        
    acceptance_test.go:1178: 
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/models/main.test-schema-4ldlav6czzbo7ntl633wxpl2gq.mymodel_renamed"
        LOG.destroy_requests: }
        LOG.destroy_requests: {
        LOG.destroy_requests:   "method": "DELETE",
        LOG.destroy_requests:   "path": "/api/2.1/unity-catalog/schemas/main.test-schema-4ldlav6czzbo7ntl633wxpl2gq",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
TestAccept/bundle/resources/registered_models/basic/DMS=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/registered_models/basic/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsbasicDMS=1278781121/002/output.txt
        @@ -64,15 +64,15 @@
         === update the name, this renames the model in place
         
         >>> [CLI] bundle plan
        -update registered_models.my_registered_model
        +recreate registered_models.my_registered_model
         
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        +Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-basic-[UNIQUE_NAME]/default/files...
        -Updated registered_models.my_registered_model
        +Recreated registered_models.my_registered_model
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 1 created, 0 changed, 1 deleted, 0 unchanged
         
         >>> [CLI] registered-models get main.default.my-registered-model-updated-[UNIQUE_NAME]
         {

latest (v1.27.0): same output as main (ef8fc0b)

TestAccept/bundle/resources/registered_models/basic/DMS=true: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌

main (ef8fc0b):

acceptance_test.go:1400: Diff:
        --- bundle/resources/registered_models/basic/output.txt
        +++ /tmp/TestAcceptbundleresourcesregistered_modelsbasicDMS=true2857395020/002/output.txt
        @@ -64,15 +64,15 @@
         === update the name, this renames the model in place
         
         >>> [CLI] bundle plan
        -update registered_models.my_registered_model
        +recreate registered_models.my_registered_model
         
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        +Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
         
         >>> [CLI] bundle deploy
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-basic-[UNIQUE_NAME]/default/files...
        -Updated registered_models.my_registered_model
        +Recreated registered_models.my_registered_model
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 1 created, 0 changed, 1 deleted, 0 unchanged
         
         >>> [CLI] registered-models get main.default.my-registered-model-updated-[UNIQUE_NAME]
         {

latest (v1.27.0): same output as main (ef8fc0b)

22 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: 72adf9c

Run: 44740048107

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 316 24 7:04
💚​ aws-windows-latest-4core-16gb 1 318 22 13:20
💚​ azure linux-2core-8gb 1 315 24 6:54
💚​ azure-windows-latest-4core-16gb 1 317 22 12:42
💚​ gcp linux-2core-8gb 1 316 24 6:43
💚​ gcp-windows-latest-4core-16gb 1 318 22 10:46
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 8 slowest tests (at least 2 minutes):
duration env testname
5:48 azure-windows-latest-4core-16gb TestAccept
4:15 aws-windows-latest-4core-16gb TestAccept
3:54 gcp-windows-latest-4core-16gb TestAccept
2:56 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
2:49 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
2:27 aws-windows-latest-4core-16gb TestAccept/bundle/resources/registered_models/basic/DMS=true
2:10 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
2:09 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true

@denik
denik force-pushed the denik/models-rename branch from f364f17 to 18077b3 Compare November 5, 2026 15:30
@denik
denik force-pushed the denik/models-rename branch 7 times, most recently from 64af993 to 7496114 Compare November 9, 2026 13:09
@denik
denik force-pushed the denik/models-rename branch from 7496114 to 132a53d 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/models-rename branch from 132a53d to b5f68ef 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/models-rename branch 4 times, most recently from b0476cd to 36755c1 Compare November 10, 2026 13:23
@denik
denik force-pushed the denik/models-rename branch 3 times, most recently from a44c3dc to 43d07f6 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>
denik and others added 21 commits November 20, 2026 13:44
Co-authored-by: Isaac <no-reply@databricks.com>
…case moves to registered_models/

Co-authored-by: Isaac <no-reply@databricks.com>
…ase moves to registered_models/

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…moves to its own test

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

Co-authored-by: Isaac <no-reply@databricks.com>
…e the rename moved it

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The schema and catalog rename steps are covered by schemas/rename_then_change, schemas/rename_with_model_and_secret, catalogs/rename and registered_models/rename_catalog_and_schema.

Co-authored-by: Isaac <no-reply@databricks.com>
…s UC does

Verified on AWS: 400 RESOURCE_ALREADY_EXISTS "Routine or Model '<name>' already exists".

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

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

Co-authored-by: Isaac <no-reply@databricks.com>
…UC does (review F1)

Verified on AWS, Azure and GCP: 400 RESOURCE_ALREADY_EXISTS "Routine or Model '<new_name>' already exists". A missing model on update now gets the same UC error as on get.

Co-authored-by: Isaac <no-reply@databricks.com>
…th (review F1)

Co-authored-by: Isaac <no-reply@databricks.com>
A failed alias sync after the rename left the state at the old name, and the next deploy looked for a model that no longer existed there. Aliases now go first, under the current name.

Co-authored-by: Isaac <no-reply@databricks.com>
… (review F2)

Co-authored-by: Isaac <no-reply@databricks.com>
…dating it there (review S2)

The parent is applied first, so the move has already happened. A failed or interrupted update left the state at the old ID, and a resource with no internal ID (a model, a secret) could not be found at its new one: every later deploy failed with ALREADY_EXISTS. This fixes the parent_rename_interrupted Badness.

Co-authored-by: Isaac <no-reply@databricks.com>
… unrenamed (review R1, F3)

Local only, like the other alias tests: versions are registered through the test server.

Co-authored-by: Isaac <no-reply@databricks.com>
…ded new path (review S2)

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/models-rename branch from b2c3a1f to 22a8af0 Compare November 20, 2026 12:45
@denik denik changed the title Rename registered models in place and follow parent renames Rename registered models in place; a model in a renamed catalog or schema keeps its versions Nov 20, 2026
denik and others added 5 commits November 20, 2026 13:56
…wercase, as in UC

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

Co-authored-by: Isaac <no-reply@databricks.com>
…loud (review)

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

## Changes
A UC resource that takes its own name from another resource's name, and
lives in a different schema, was treated as moved when that resource was
renamed. For example, a secret in schema `shared` with `name:
${resources.schemas.app.name}`: renaming `app` recreated the secret, but
the delete went to `shared.<new app name>`, which does not exist, and
the old secret was left behind. Registered models had the same problem.

Only the fields that name a resource's parent move it with the parent. A
new `parent_id_fields` config lists them (`catalog_name`, `schema_name`)
for schemas, volumes, registered models and secrets, and both the plan's
follow check and the recreate's delete ID now consult only those.
Before, any field referencing the renamed resource counted, except a
name that can be renamed in place.

Found in review of databricks#7381, where
secrets start following a renamed parent. That PR and
databricks#7379 rebase on this one.

## Tests
- New `schemas/rename_referenced_by_name` (`Cloud = true`): a model and
a secret in a shared schema, named after another schema that gets
renamed. The first commit records the bug (`Badness`): the delete went
to the new name and the old model and secret stayed. Now the delete goes
to their actual path, both are gone, and the redeploy is a no-op.

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 Generated] Review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.

@@ -302,8 +302,8 @@ func TestFollowsParentRename(t *testing.T) {
},
{
name: "resource without DoUpdateWithID is recreated",

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 Generated] nit: quality_monitors.table_name is not a parent ID field, so isParentIDField already makes this a recreate and the case passes without the canFollowParentRename check. Could you rename the case or drop it?

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