Skip to content

UC secrets follow a renamed catalog or schema - #7381

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

denik wants to merge 17 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 since #7343 and registered models do in #7379: with IDFromState, the framework re-keys it without a request (state_only). Before, it was recreated where the parent's rename moved it: the secret was deleted and created again.

UC cannot rename a secret, so its own name still recreates, even when it references a renamed resource's name: only its parent_id_fields (catalog_name, schema_name, from #7718) follow a parent. When the secret also has its own changes, the new DoUpdateWithID sends the update at the new path, and the framework records the new path first (#7379), so a failed update is retried there.

Stacked on #7379.

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.
  • 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.
  • New secrets/parent_rename_out_of_band (Cloud = true, Badness): a secret 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.
  • schemas/rename_with_model_and_secret (Cloud = true): the secret now follows the schema's rename too; the deploy sends only the schema's PATCH.
  • Unit test: a secret whose own name references the renamed schema is recreated, not re-keyed.
  • The test server now reports a missing secret and an existing one with UC's messages (Secret '<name>' does not exist., 409 ALREADY_EXISTS Secret '<name>' already exists; checked on AWS, Azure and GCP).

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: ae7b23cea | Workflow run

Regression test report

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

48 tests: regression=39 unreleased=0 coverage=9 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/resources/secrets/parent_rename/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/secrets/parent_rename_out_of_band/DMS= ✅ ✅ ✅
TestAccept/bundle/resources/secrets/parent_rename_out_of_band/DMS=true ✅ ✅ ✅
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true/READPLAN= ✅ ❌ ❌
TestAccept/bundle/resources/secrets/recreate_in_renamed_schema/DMS=true/READPLAN=1 ✅ ❌ ❌
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=2375965542/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=2675813749/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_dz3wptcpyzg4lkbf72dncxzwqa.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_dz3wptcpyzg4lkbf72dncxzwqa.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_dz3wptcpyzg4lkbf72dncxzwqa.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_dz3wptcpyzg4lkbf72dncxzwqa",
        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=2578779743/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_44m2ao574bc5ljoghijqr7s6yi.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_44m2ao574bc5ljoghijqr7s6yi.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_44m2ao574bc5ljoghijqr7s6yi.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_44m2ao574bc5ljoghijqr7s6yi",
        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=12159043488/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_zy6ky5sg4raendbk7yfhp425sm.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_zy6ky5sg4raendbk7yfhp425sm.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_zy6ky5sg4raendbk7yfhp425sm.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_zy6ky5sg4raendbk7yfhp425sm",
        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=12078624214/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_wc4gy3mlsnfm5awiny3rqaasve.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_wc4gy3mlsnfm5awiny3rqaasve.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_wc4gy3mlsnfm5awiny3rqaasve.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_wc4gy3mlsnfm5awiny3rqaasve",
        LOG.destroy_requests:   "q": {
        LOG.destroy_requests:     "force": "true"
        LOG.destroy_requests:   }
        LOG.destroy_requests: }
FAIL
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=994440331/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_qckwcv2n3vdtrf3nsocflw35l4.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_qckwcv2n3vdtrf3nsocflw35l4.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_qckwcv2n3vdtrf3nsocflw35l4.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_qckwcv2n3vdtrf3nsocflw35l4",
        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=1125150758/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_n7nnmfqm55azlgauzeqzqujxwy.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_n7nnmfqm55azlgauzeqzqujxwy.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_n7nnmfqm55azlgauzeqzqujxwy.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_n7nnmfqm55azlgauzeqzqujxwy",
        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=14153809237/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_kkojotksovcc5owwgf72x6azoa.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_kkojotksovcc5owwgf72x6azoa.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_kkojotksovcc5owwgf72x6azoa.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_kkojotksovcc5owwgf72x6azoa",
        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=1613579604/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_4m3ah5env5bonipuoqql7aeaqu.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_4m3ah5env5bonipuoqql7aeaqu.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_4m3ah5env5bonipuoqql7aeaqu.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_4m3ah5env5bonipuoqql7aeaqu",
        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_name2140158185/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-3tojgq4brbaldhhbnkzpmb2vge.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-3tojgq4brbaldhhbnkzpmb2vge",
        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_name1438742903/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-rlmj67tuhrggrkg4idapk5joha.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-rlmj67tuhrggrkg4idapk5joha",
        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_name4004056389/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-tqmjtefo3rcxjkj2lvssynczmq.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-tqmjtefo3rcxjkj2lvssynczmq",
        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_name4067510778/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-auy5xdrszjbjjf3qoathy54iyq.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-auy5xdrszjbjjf3qoathy54iyq",
        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=3000410879/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=true152425656/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)

30 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: ae7b23c

Run: 44740301972

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 329 24 7:31
💚​ aws-windows-latest-4core-16gb 1 331 22 14:38
💚​ azure linux-2core-8gb 1 328 24 8:29
💚​ azure-windows-latest-4core-16gb 1 330 22 12:55
💚​ gcp linux-2core-8gb 1 329 24 7:13
💚​ gcp-windows-latest-4core-16gb 1 331 22 12:42
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
4:07 aws-windows-latest-4core-16gb TestAccept
4:04 azure-windows-latest-4core-16gb TestAccept
4:00 gcp-windows-latest-4core-16gb TestAccept
2:35 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
2:33 aws-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
2:24 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
2:17 azure-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
2:17 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=

@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 removed this pull request from stack #7411 November 17, 2026 11:23
@denik
denik added this pull request to stack #7719 November 17, 2026 11:23
@denik
denik force-pushed the denik/secrets-parent-rename branch 3 times, most recently from 1e1984e to 66ba15f Compare November 17, 2026 13:32

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

trace $CLI bundle plan

title "The create fails: the secret is already there"
trace errcode $CLI bundle deploy

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: This deploy is expected to fail with 409, and .agents/rules/testing.md asks for musterr rather than errcode when a failure is required. Can this be trace musterr $CLI bundle deploy?

@denik
denik force-pushed the denik/secrets-parent-rename branch from 66ba15f to 162f1f3 Compare November 20, 2026 12:46
denik and others added 17 commits November 20, 2026 13:56
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>
Co-authored-by: Isaac <no-reply@databricks.com>
…secret

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

The check is skipped for resources that implement OverrideChangeDesc, as secrets do.

Co-authored-by: Isaac <no-reply@databricks.com>
Only parent_id_fields (catalog_name, schema_name, from #7718) follow a parent's rename, so a name that references a renamed schema's name recreates the secret instead of re-keying it to a path that does not exist.

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

Verified on AWS, Azure and GCP: "Secret '<full_name>' already exists".

Co-authored-by: Isaac <no-reply@databricks.com>
…adness, review G1)

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 162f1f3 to ae7b23c Compare November 20, 2026 12:58
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.

expectedAction: deployplan.Recreate,
},
{
name: "own name referencing the renamed parent 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: This case meets every condition in TestFollowsParentRename's doc comment (provided_id_field, DoUpdateWithID, same old parent value) yet expects recreate. Can the comment add that the field must also be a parent_id_fields entry?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants