Repository navigation
Rename registered models in place; a model in a renamed catalog or schema keeps its versions - #7379
Merged
Merged
Conversation
Contributor
|
Commit: Regression test reportSelected 20 changed tests (limit=20, 0 not selected) 46 tests: regression=43 unreleased=0 coverage=3 failing=0
TestAccept/bundle/migrate/auto/registered-model-rename/DMS=: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): same output as main (c450460) TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): TestAccept/bundle/resources/grants/registered_model_change_name/DMS=: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): TestAccept/bundle/resources/grants/registered_model_change_name/DMS=true: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): TestAccept/bundle/resources/registered_models/basic/DMS=: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): same output as main (c450460) TestAccept/bundle/resources/registered_models/basic/DMS=true: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): same output as main (c450460) TestAccept/bundle/resources/registered_models/move_from_renamed_schema/DMS=/READPLAN=: branch ✅ | main (c450460) ❌ | latest (v1.28.0) ❌main (c450460): latest (v1.28.0): 33 more failure details omitted, see the full report in the run. |
Collaborator
✅ Integration test reportCommit: 0ce0887
Top 6 slowest tests (at least 2 minutes):
|
denik
force-pushed
the
denik/models-rename
branch
from
November 5, 2026 15:30
f364f17 to
18077b3
Compare
denik
force-pushed
the
denik/models-rename
branch
7 times, most recently
from
November 9, 2026 13:09
64af993 to
7496114
Compare
denik
force-pushed
the
denik/models-rename
branch
from
November 9, 2026 14:52
7496114 to
132a53d
Compare
denik
force-pushed
the
denik/models-rename
branch
from
November 9, 2026 14:59
132a53d to
b5f68ef
Compare
denik
force-pushed
the
denik/models-rename
branch
4 times, most recently
from
November 10, 2026 13:23
b0476cd to
36755c1
Compare
denik
force-pushed
the
denik/models-rename
branch
3 times, most recently
from
November 10, 2026 16:06
a44c3dc to
43d07f6
Compare
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>
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>
…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>
…WithID check (review) table_name is not a parent ID field, so the case was a recreate before the check, and no resource has parent_id_fields without DoUpdateWithID. Co-authored-by: Isaac <no-reply@databricks.com>
…ID field (review) Co-authored-by: Isaac <no-reply@databricks.com>
…al ID A volume or a schema is found at its new ID by the plan (findMoved), as on main; only a model or a secret, which nothing identifies at its new path, needs its moved ID recorded before the update. Co-authored-by: Isaac <no-reply@databricks.com>
…gain This reverts 85c4ecb: volumes are back on findMoved. Co-authored-by: Isaac <no-reply@databricks.com>
denik
force-pushed
the
denik/models-rename
branch
from
November 24, 2026 17:18
3b56b9e to
c12ab5e
Compare
Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Changing a registered model's
namenow 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: withIDFromState, 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
nameandnew_name, so a rename leavesnameout (#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 model and the model 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 would leave the state at the old ID, and a model has no internal ID to be found by at its new one: every later deploy would fail with
RESOURCE_ALREADY_EXISTS. Volumes and schemas do not need this; the plan finds them by theirvolume_idandschema_id, as on main.Builds on #7718 (merged). UC secrets get the same fix in #7381.
Tests
New tests (
Cloud = trueunless noted):registered_models/rename: the model is renamed in place with the samecreated_at, a rename together with a comment change goes in one PATCH, and a schema rename together with a comment change goes in one PATCH at the new path.registered_models/rename_case_only: a case-only rename leaves the model as it was (UC keeps names lowercase).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 withRESOURCE_ALREADY_EXISTSand 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/basicandmigrate/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.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), and model names, which it stores lowercase and looks up case-insensitively.This pull request and its description were written by Isaac.