Repository navigation
Conversation
Regression test report ✅Commit: Selected 4 changed tests (limit=20, 0 not selected) 10 tests: regression=8 unreleased=0 coverage=2 failing=0
TestAccept/bundle/resources/schemas/destroy_with_other_at_recorded_name/DMS=: branch ✅ | main (9a14ad6) ❌ | latest (v1.28.0) ❌main (9a14ad6): latest (v1.28.0): TestAccept/bundle/resources/schemas/destroy_with_other_at_recorded_name/DMS=true: branch ✅ | main (9a14ad6) ❌ | latest (v1.28.0) ❌main (9a14ad6): latest (v1.28.0): TestAccept/bundle/resources/schemas/foreign_at_recorded_name/DMS=: branch ✅ | main (9a14ad6) ❌ | latest (v1.28.0) ❌main (9a14ad6): latest (v1.28.0): TestAccept/bundle/resources/schemas/foreign_at_recorded_name/DMS=true: branch ✅ | main (9a14ad6) ❌ | latest (v1.28.0) ❌main (9a14ad6): latest (v1.28.0): 4 more failure details omitted, see the full report in the run. |
✅ Integration test reportCommit: efce9ca
Top 3 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at 87ab7b3. Each finding was verified against the code.
Not ready yet: 2 blocking issue(s), tagged [blocking].
This PR makes the direct engine compare schema_id/volume_id before updating or deleting a schema or volume, and makes delete look for one that was renamed out of band (catalog/schema listing plus the follow-the-renamed-parent pass). The identity check on the plan side does what it should. The new parent-follow path in findInMovedParents has two real holes. It can send a DELETE to a volume that is not the bundle's. And because it relies only on depends_on, it can let a schema force-delete take a prevent_destroy volume with it. The rest are comment and wording fixes.
andrewnester
left a comment
There was a problem hiding this comment.
Holding my approval until the open thread on bundle/direct/bundle_plan.go is settled.
There was a problem hiding this comment.
Automated review at 87ab7b3. Each finding was verified against the code.
No blocking issues found. 7 non-blocking comment(s) below.
This PR makes the direct engine check schema_id/volume_id before it updates or deletes a schema or volume, and it lets destroy find the bundle's own object after an out-of-band rename, either through DoFindByInternalID or under a parent that has moved. The main fix holds up in the code and the acceptance tests. The edge most worth fixing is how findInMovedParents maps a child to its moved parent: it can send a DELETE to a volume that isn't the bundle's, and a case-sensitive prefix match can miss a protected volume entirely. The rest are smaller points about the changelog, stale comments and repo conventions.
Comments outside the changed lines
- [nice to have]
bundle/direct/bundle_plan.go:1011: A schema renamed by the bundle to a mixed-case name is saved at UC's lowercasedresponse.FullName(DoUpdateWithID), while its volume's state-onlyRekeysavesIDFromStatein config case (main.MixedSchema.v). After a later out-of-band rename of the schema,CutPrefix("main.MixedSchema.v", "main.mixedschema.")misses. The volume stays Gone, and the schema's force delete removes it without itsprevent_destroybeing checked. Should this compare the parent components case-insensitively, with a test for that sequence?
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Opus 5.5 + Claude Sonnet 5.5, cross-verified). Only points the reviewers agreed on are posted.
…full name Address review on #8056: - a child under a parent deleted at a moved ID that cannot be verified there (models and secrets included) gets with_parent: listed, counted and checked for prevent_destroy, but no delete is sent at the guessed name; - parents are matched by case-insensitive full-name prefix over every UC resource the plan found at a moved ID, not through depends_on; - warnings are diagnostics, a Delete's is told after the parent pass, and errors name schema_id/volume_id; - comments, README and changelog updated; schema_fields/volume_fields helpers for the new tests. Co-authored-by: Isaac <no-reply@databricks.com>
…nts for any child Address the review round on #8056: - a with_parent child is applied after its parent's delete and selected with it, so its state is dropped only once that delete succeeded; - a child of any type under a moved parent is looked for there, and one without an internal ID that is not there stays Gone; - a child at its old path under a moved parent is never deleted there; - a 403 at the recorded ID searches by internal ID first; - the completed plan is checked for cycles again; doc fixes. Co-authored-by: Isaac <no-reply@databricks.com>
87ab7b3 to
c33cefa
Compare
|
🤖 Addressed all review comments on 87ab7b3 in one push,
A second review round on this push (two more independent reviewers and a devil's-advocate pass) found and closed more instances of the same classes: a child left at its old path under a moved parent, a secret scope named like the schema, a cycle through a sibling, and a parent delete that fails. Each has a test that fails without the fix. The cloud tests passed on AWS locally, and the last commit names them for the PR's cloud run. One open question for an owner, in "Gaps and risks": should this PR bump AI agent (opus5.5, isaac_claude) |
|
/review |
There was a problem hiding this comment.
Automated review at c33cefa. Each finding was verified against the code.
Not ready yet: 1 blocking issue(s), tagged [blocking].
This PR makes the direct engine check schema_id/volume_id before updating or deleting a schema or volume. Destroy can now find the bundle's own object after a rename out of band, and children of a renamed parent are tracked through the new with_parent field. The main fix holds up when traced through the code, but one gap remains: the prefix lookup under a moved parent can still delete an unrelated secret scope at a guessed name, and that should be fixed before merge. The rest are smaller issues: delete ordering for with_parent entries, --select widening to a forced schema delete, and some test-convention items.
Questions
- Saved plans can now carry a Delete
idthat apply honours and a newwith_parentfield, whilecurrentPlanVersionstays 2. A plan saved by the previous CLI has noidfor its Delete, so after a rename out of band this CLI would delete the other schema at the recorded name. Shouldplan_versionbe bumped so mixed-version plans are rejected, or is the change inbundle plan -o jsonoutput the reason to keep it? (non-blocking)
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Opus 5.5 + Claude Sonnet 5.5, cross-verified). Only points the reviewers agreed on are posted.
|
🤖 Addressed the review on c33cefa and the nit on ac738ad in one push,
Each fix has a test that fails without it. An independent review of this batch found one more instance of the class: the first version of the scope fix dropped the lookup for features. That is fixed in the same push. The changed cloud tests passed on AWS locally. The bot's question about AI agent (opus5.5, isaac_claude) |
|
/review |
There was a problem hiding this comment.
Automated review at 12cd4fd. Each finding was verified against the code.
Not ready yet: 1 blocking issue(s), tagged [blocking].
This PR makes the direct engine check a schema's or volume's recorded internal ID before it updates or deletes it. Destroy now finds the bundle's object after a rename out of band, and children of a moved parent are handled. The core identity check looks right, and the acceptance tests show the before and after clearly. Two gaps remain in the new with_parent handling: --select rejects a parent that the selection already pulls in, and the graph drops a child's ordering edges to resources outside its parent. There are also a plan-version gap and a few test-script rule nits.
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Opus 5.5 + Claude Sonnet 5.5, cross-verified). Only points the reviewers agreed on are posted.
No new issues found.
|
/review |
…the recorded name A schema or volume someone else created under the recorded name, after ours was renamed out of band, was planned as an update and deleted by destroy. The plan now treats it as not ours. Destroy, which has no config to give a renamed resource's new name, finds it by its internal id (listing the parent) and deletes it there. Co-authored-by: Isaac <no-reply@databricks.com>
…e other object Address review: a failed search or identity read fails the plan instead of dropping the state entry or deleting at the recorded name; ID-only state entries skip the check; one helper compares internal ids for findMoved and findByInternalID; a warning names the object left alone and how to take it over; the replay helper maps lowercased UC names. Co-authored-by: Isaac <no-reply@databricks.com>
…ours is not found A volume in a schema renamed out of band was dropped from state and went with the schema's force delete, past its prevent_destroy. Look it up under the parent's new name and delete it as itself. Warn about the other object only when the bundle's own is not found elsewhere, and document that a resource deleted and created again out of band needs rebinding. Co-authored-by: Isaac <no-reply@databricks.com>
…arent's new one Address review: map the child's ID by its parent's ID prefix instead of by field value (a schema named like its catalog); follow a parent re-keyed in a deploy too; and when the parent is deleted, delete the child at its new ID even if not found there, so prevent_destroy applies. Co-authored-by: Isaac <no-reply@databricks.com>
aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
…struct) aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
…full name Address review on #8056: - a child under a parent deleted at a moved ID that cannot be verified there (models and secrets included) gets with_parent: listed, counted and checked for prevent_destroy, but no delete is sent at the guessed name; - parents are matched by case-insensitive full-name prefix over every UC resource the plan found at a moved ID, not through depends_on; - warnings are diagnostics, a Delete's is told after the parent pass, and errors name schema_id/volume_id; - comments, README and changelog updated; schema_fields/volume_fields helpers for the new tests. Co-authored-by: Isaac <no-reply@databricks.com>
…nts for any child Address the review round on #8056: - a with_parent child is applied after its parent's delete and selected with it, so its state is dropped only once that delete succeeded; - a child of any type under a moved parent is looked for there, and one without an internal ID that is not there stays Gone; - a child at its old path under a moved parent is never deleted there; - a 403 at the recorded ID searches by internal ID first; - the completed plan is checked for cycles again; doc fixes. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
A child whose recorded read was forbidden and not found by its internal ID is looked for under the moved parent too; an entry found at its recorded ID is re-targeted only for UC full-name types, so a secret scope named like a schema is deleted where it is. Co-authored-by: Isaac <no-reply@databricks.com>
It sends no request, so its other delete edges are not needed; one to a sibling in the same parent closed a cycle through the parent. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_renamed_with_model_and_secret TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/volumes/removed_from_renamed_schema TestAccept/bundle/resources/volumes/prevent_destroy_schema_without_dependency TestAccept/bundle/resources/volumes/prevent_destroy_mixed_case_schema TestAccept/bundle/resources/volumes/select_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_renamed_with_model_and_secret TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/volumes/removed_from_renamed_schema TestAccept/bundle/resources/volumes/prevent_destroy_schema_without_dependency TestAccept/bundle/resources/volumes/prevent_destroy_mixed_case_schema TestAccept/bundle/resources/volumes/select_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
…t with_parent deletes with their parent - Only resources with parent_id_fields or moves_with_parent (features, feature specs) are looked for under a renamed parent, so a secret scope named like a schema is never re-targeted. - A delete that depends on a with_parent entry also waits for, and blocks, its parent's delete. - --select of a with_parent entry without its parent is an error instead of pulling in a forced parent delete. - One advice sentence for both "another object" warnings; comment fixes. - Tests: shared helpers in acceptance/bundle/resources/script.prepare; fault.py instead of [[Server]] stubs. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_renamed_with_model_and_secret TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/volumes/removed_from_renamed_schema TestAccept/bundle/resources/volumes/prevent_destroy_schema_without_dependency TestAccept/bundle/resources/volumes/prevent_destroy_mixed_case_schema TestAccept/bundle/resources/volumes/select_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
…n; its parent's delete waits for its dependencies - FilterToSelected checks a with_parent entry's parent against the closure once the walk is done, so a parent pulled in as a dependent (a schema under a selected catalog) counts. - makeGraph moves a with_parent entry's edges to nodes outside its parent onto the parent's delete, unless that would close a cycle (a sibling deleted before the parent). - Tests: LOG.rename instead of /dev/null; a secret_scope_names helper. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_renamed_with_model_and_secret TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/volumes/removed_from_renamed_schema TestAccept/bundle/resources/volumes/prevent_destroy_schema_without_dependency TestAccept/bundle/resources/volumes/prevent_destroy_mixed_case_schema TestAccept/bundle/resources/volumes/select_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
- A child under a parent deleted at a moved ID that is not verified there gets with_parent, also on a 404 and without an internal ID: a 404 cannot tell a model renamed too from one deleted. - The search warning says what was searched; the Action.Gone comment matches PlanEntry.Gone. - Tests: registered_models/prevent_destroy_in_renamed_schema, registered_models/removed_from_renamed_schema; fault.py instead of [[Server]] stubs in destroy_forbidden_at_recorded_name. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_renamed_with_model_and_secret TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/volumes/removed_from_renamed_schema TestAccept/bundle/resources/volumes/prevent_destroy_schema_without_dependency TestAccept/bundle/resources/volumes/prevent_destroy_mixed_case_schema TestAccept/bundle/resources/volumes/select_renamed_schema TestAccept/bundle/resources/registered_models/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/registered_models/removed_from_renamed_schema Co-authored-by: Isaac <no-reply@databricks.com>
…rents move to a follow-up Keep: a schema or volume at the recorded name with another schema_id/volume_id is never updated or deleted; deploy falls through to findMoved, a delete drops the state entry and warns. Move to the follow-up: DoFindByInternalID and the list routes, findInMovedParents, with_parent, the makeGraph and --select handling, Destroy at a moved ID, and their tests. destroy_after_rename_out_of_band is back to main, Badness note included. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
…at the recorded ID - Deploy suggests pointing the config at the renamed object, or unbind and bind; delete says no delete is sent and suggests deleting it outside the bundle. - The Gone comments mention another object at the recorded ID. - foreign_at_recorded_name and recreated_at_recorded_name show the failed deploy's requests; the plan step uses plan_filter.py. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
In schemas/ and volumes/foreign_at_recorded_name, a new step points the config at the renamed object: the plan finds it there by its internal ID (update_id), deploy sends nothing to the other object, and destroy deletes the bundle's at its new name. Their Badness notes are dropped, since destroy no longer leaves anything behind in them; schemas/destroy_after_rename_out_of_band still records the leak. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
Its bucket URL differs per cloud (s3, gs, abfss), so volumes/foreign_at_recorded_name failed on Azure and GCP. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
schemas/destroy_with_other_at_recorded_name: while the config still names the recorded schema, destroy warns, sends no DELETE, drops the entry, and leaves both the other schema and the bundle's renamed one in place. The Badness note records the leak, which the follow-up fixes. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_with_other_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
…angelog - The delete warning names the resource key once and says the bundle's renamed copy is left in place and must be deleted outside the bundle. - otherInternalID's comment names both causes. - replay_tfstate.py matches names lowercased on both sides, one lookup. - Plainer changelog fragment. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_with_other_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
main removed the errcode helper (#7975). The EXIT-trap cleanup in schemas/destroy_with_other_at_recorded_name, schemas/recreated_at_recorded_name and volumes/foreign_at_recorded_name now uses `cmd > LOG.cleanup 2>&1 || true`, as .agents/rules/testing.md asks. aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_with_other_at_recorded_name TestAccept/bundle/resources/volumes/foreign_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
49cbb30 to
efce9ca
Compare
… resources in it Restores what was narrowed out of #8056: DoFindByInternalID (schemas, volumes) with the testserver list routes, findInMovedParents, the with_parent plan field and its makeGraph and --select handling, Destroy at a moved ID, and their tests. Adds its own changelog fragment (schema-moved-parent.md); #8056's fragment is unchanged. Rebased on #8056 as of efce9ca: the warnings use #8056's wording, and destroy_with_other_at_recorded_name now shows destroy deleting the bundle's schema at its new name (its Badness note and destroy_after_rename_out_of_band's are removed). The cleanup in the restored tests uses `|| true`, as main no longer has errcode (#7975). aws: TestAccept/bundle/resources/schemas/foreign_at_recorded_name TestAccept/bundle/resources/schemas/destroy_after_rename_out_of_band TestAccept/bundle/resources/schemas/recreated_at_recorded_name TestAccept/bundle/resources/schemas/destroy_renamed_with_model_and_secret TestAccept/bundle/resources/volumes/foreign_at_recorded_name TestAccept/bundle/resources/volumes/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/volumes/removed_from_renamed_schema TestAccept/bundle/resources/volumes/prevent_destroy_schema_without_dependency TestAccept/bundle/resources/volumes/prevent_destroy_mixed_case_schema TestAccept/bundle/resources/volumes/select_renamed_schema TestAccept/bundle/resources/registered_models/prevent_destroy_in_renamed_schema TestAccept/bundle/resources/registered_models/removed_from_renamed_schema TestAccept/bundle/resources/schemas/destroy_with_other_at_recorded_name Co-authored-by: Isaac <no-reply@databricks.com>
Changes
The direct engine now checks a schema's
schema_idor a volume'svolume_idbefore it updates or deletes what is at the recorded name. An object there with a different internal id is someone else's, or the bundle's was deleted and created again: the CLI never updates or deletes it.findMovedlookup at the config's ID, so it finds the bundle's object when the config follows the rename. Otherwise it plans a create, which fails on the name. A warning (a diagnostic) names the object and the ways out: point the config at the renamed object, or unbind and bind.acceptance/bin/replay_tfstate.py: matches a create request to its tfstate entry case-insensitively. UC lowercases names, so a mixed-case schema'sschema_idwas not remapped on replay, and the migrated state carried a stale id that the new check rejected (migrate/auto/schema-name-normalized).This PR was narrowed to the identity check during review. Finding a renamed schema or volume by its internal id on destroy, and handling the resources inside a renamed schema, moved to the follow-up #8096.
Why
This PR fixes the behavior recorded as Badness in
acceptance/bundle/resources/schemas/foreign_at_recorded_name:Before, the plan was
"action": "update"on the other schema (schema_id: [FOREIGN_SCHEMA_ID]) and destroy sentDELETE /api/2.1/unity-catalog/schemas/main.test-schema-[UNIQUE_NAME]. Now the plan is"action": "create"with a warning, and deploy fails withSCHEMA_ALREADY_EXISTS. Once the config names the renamed schema, the plan finds it there by itsschema_id("action": "update_id","id": "main.test-schema-moved-[UNIQUE_NAME]"), deploy sends nothing to the other schema, and destroy sendsDELETE /api/2.1/unity-catalog/schemas/main.test-schema-moved-[UNIQUE_NAME]. The other schema is left alone.If the config does not follow the rename, destroy still leaves the bundle's renamed schema behind, now with a warning instead of deleting the other one.
schemas/destroy_after_rename_out_of_bandis unchanged and keeps its Badness note for that leak, which the follow-up fixes.Tests
schemas/foreign_at_recorded_name: the Badness note is removed. The test shows the warning and the failed create, then a config that names the renamed schema, which the plan finds byschema_id, deploy keeps, and destroy deletes at its new name.schemas/destroy_with_other_at_recorded_name(destroy while the config still names the recorded schema: a warning, no DELETE, the entry dropped, and both schemas left in place; its Badness note records the leak),volumes/foreign_at_recorded_name(the same for volumes, byvolume_id), andschemas/recreated_at_recorded_name(documents the behavior change below, and that unbind + bind recovers).otherInternalID,otherObjectAtRecordedID(ID-only state entries, no recorded internal id).bundle_plan.go). The Cloud tests passed on AWS locally.Gaps and risks
Overall risk: low. The change only narrows what the CLI updates or deletes, and touches only schemas and volumes, the two resources with an internal id today.
Judgment call: a schema or volume deleted and created again outside the bundle is no longer adopted. The CLI cannot tell it from an object someone else created under the same name: both have another
schema_id/volume_idat the recorded name. Adopting it silently is what let destroy delete other people's schemas, so it is now left alone: deploy fails withALREADY_EXISTSand destroy drops it from the state, until the user runsbundle deployment unbindandbundle deployment bind. A warning on every plan names the object and the way out, andschemas/recreated_at_recorded_nameshows the recovery. Risk: medium. A user who drops and recreates schemas by hand sees deploys fail where they used to succeed; nothing is deleted or changed in the workspace.Destroy still leaves a schema or volume renamed out of band behind, now also when another object took its old name; it drops the state entry and warns. That is a leak, not a wrong delete, and the follow-up fixes it. Risk: low.
plan_version: this PR adds no plan field and no new meaning to one. A plan saved by an older CLI and applied by this one deletes at the recorded name without the check, as that CLI would; a plan saved by this one marks the other object's deletegone, which an older CLI already honors. A saved plan means the same to both CLIs, so a bump would only reject plans without protecting anything; this PR does not bump it. The question comes back in #8096, where a Delete'sidgets a new meaning.bundle deployment binddoes not record the internal id; the next deploy does. Until then the check has nothing to compare, as with state from an older CLI. Risk: low.Related PRs
apply.go) has merged; this PR no longer changesapply.go.Dashboard
"action": "update"on the schema with[FOREIGN_SCHEMA_ID], thenDELETE /api/2.1/unity-catalog/schemas/main.test-schema-[UNIQUE_NAME]🤖 AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.