Repository navigation
Conversation
|
Commit: Regression test reportSelected 17 changed tests (limit=20, 0 not selected) 38 tests: regression=31 unreleased=0 coverage=7 failing=0
TestAccept/bundle/migrate/auto/registered-model-rename/DMS=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): 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): latest (v1.27.0): TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): latest (v1.27.0): TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): latest (v1.27.0): TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=1: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): latest (v1.27.0): TestAccept/bundle/resources/grants/registered_model_change_name/DMS=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): latest (v1.27.0): TestAccept/bundle/resources/grants/registered_model_change_name/DMS=true: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): latest (v1.27.0): TestAccept/bundle/resources/registered_models/basic/DMS=: branch ✅ | main (ef8fc0b) ❌ | latest (v1.27.0) ❌main (ef8fc0b): 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): latest (v1.27.0): same output as main (ef8fc0b) 22 more failure details omitted, see the full report in the run. |
✅ Integration test reportCommit: 72adf9c
Top 8 slowest tests (at least 2 minutes):
|
f364f17 to
18077b3
Compare
64af993 to
7496114
Compare
7496114 to
132a53d
Compare
132a53d to
b5f68ef
Compare
b0476cd to
36755c1
Compare
a44c3dc to
43d07f6
Compare
…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>
…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>
b2c3a1f to
22a8af0
Compare
…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>
…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
left a comment
There was a problem hiding this comment.
[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", | |||
There was a problem hiding this comment.
[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?
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 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 = trueunless noted):registered_models/rename: the model is renamed in place with the samecreated_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 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.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.