Repository navigation
Conversation
|
Commit: Regression test reportSelected 20 changed tests (limit=20, 30 not selected) 46 tests: regression=42 unreleased=0 coverage=4 failing=0
TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=: branch ✅ | main (437e24a) ❌ | latest (v1.26.0) ❌main (437e24a): latest (v1.26.0): TestAccept/bundle/resources/catalogs/rename/DMS=/READPLAN=1: branch ✅ | main (437e24a) ❌ | latest (v1.26.0) ❌main (437e24a): latest (v1.26.0): TestAccept/bundle/resources/catalogs/rename/DMS=true/READPLAN=: branch ✅ | main (437e24a) ❌ | latest (v1.26.0) ❌main (437e24a): latest (v1.26.0): 39 more failure details omitted, see the full report in the run. |
c643054 to
3aabe1b
Compare
✅ Integration test reportCommit: ccb9119
Top 16 slowest tests (at least 2 minutes):
|
5f6e047 to
0d42d75
Compare
3678e96 to
891fceb
Compare
891fceb to
fe7fb69
Compare
a4a9475 to
6845544
Compare
4f7fd4e to
27ceb82
Compare
| return fullName, nil, nil | ||
| } | ||
|
|
||
| response, err := r.client.Schemas.Update(ctx, makeUpdateSchema(fullName, newName, config)) |
There was a problem hiding this comment.
IIRC including other fields during a rename caused issues.
Also; what happens if we rename to something that UC considers equivalent?
E.g. case change (via EqualFold)?
There was a problem hiding this comment.
schemas/rename_with_comment covers rename + update and schemas/rename_case_only covers case change. Both work on cloud. In case of case_only change there is one avoidable PATCH but it's not harmful (and makes DABs more independent of backend folding rules).
Co-authored-by: Isaac <no-reply@databricks.com>
…; record volume_id in empty-resource-id The volume's created_at/updated_at made rename_interrupted flaky ([UNIX_TIME_MILLIS] vs [UNIX_TIME_MILLIS][0] depending on timing). Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Jan N Rose <janniklas.rose@gmail.com>
The recreate deletes the volume at its recorded path after the schema's rename moved it, so the moved volume is left behind. Co-authored-by: Isaac <no-reply@databricks.com>
A parent renamed in the same plan moves the resource before its recreate runs. The recreate now deletes it at the ID the rename gives it, after the rename. The parent comes from the state's depends_on, since the config may no longer reference it. Co-authored-by: Isaac <no-reply@databricks.com>
The plan's state_only re-keys, found IDs and added depends_on must survive serialization. Co-authored-by: Isaac <no-reply@databricks.com>
Numbered UUIDs from main (#7021); restores the volume_id skip in change-name and the recorded schema_id in user_agent/simple, which the rebase dropped. Co-authored-by: Isaac <no-reply@databricks.com>
… case-insensitive volume lookups On AWS the re-keyed ID keeps the config's casing (main.s.MyVolume) and UC still reads the volume at it, so the next plan is a no-op. The test server now looks a volume's full name up case-insensitively too, instead of planning a create. Co-authored-by: Isaac <no-reply@databricks.com>
Without IDFromState the update_id would reach DoUpdateWithID with the stale ID. Co-authored-by: Isaac <no-reply@databricks.com>
…ew B5) Co-authored-by: Isaac <no-reply@databricks.com>
…ad (review B6) Co-authored-by: Isaac <no-reply@databricks.com>
…view B7) Co-authored-by: Isaac <no-reply@databricks.com>
…w B8) Co-authored-by: Isaac <no-reply@databricks.com>
…om four goldens Co-authored-by: Isaac <no-reply@databricks.com>
… rename (review A3, Badness); testserver: reject a taken schema name Recorded on AWS: the schema's create fails with SCHEMA_ALREADY_EXISTS. The test server now rejects it the same way instead of creating it again. Co-authored-by: Isaac <no-reply@databricks.com>
The test server now rejects a taken schema name, as UC does. Co-authored-by: Isaac <no-reply@databricks.com>
… A3) A state recorded without schema_id/volume_id (by an older CLI, or by bind) never got them, since a skip writes no state, so the plan could not follow an out-of-band rename. An otherwise unchanged resource whose state lacks the ID is now planned as a state-only update that records it from the remote state. Co-authored-by: Isaac <no-reply@databricks.com>
…y (review A3) The terraform state has no volume_id, and the migrated state would otherwise get the IDs from a state-only update in the next plan. The migration's plan check already read every resource, so record them from there. Co-authored-by: Isaac <no-reply@databricks.com>
The provider records UC's schema_id on databricks_schema. databricks_volume has no volume_id, so a volume migrated this way has none. Co-authored-by: Isaac <no-reply@databricks.com>
… requests The fixture was captured with the init script, so replaying it after the init created the source schema twice, which the test server now rejects as UC does. Co-authored-by: Isaac <no-reply@databricks.com>
It was captured with the init script's schema and source-table requests, which every test runs anyway, so the replay created the schema twice. Reverts the INVARIANT_REPLAY workaround. Co-authored-by: Isaac <no-reply@databricks.com>
The command plans nothing and the terraform state has no volume_id, so it reads each resource whose migrated state lacks its internal ID. A failed read only warns: the next deploy records the ID with a state-only update. Co-authored-by: Isaac <no-reply@databricks.com>
… saved plan too (READPLAN) Co-authored-by: Isaac <no-reply@databricks.com>
… recorded name (review B1, B2, Badness) Both gaps are on main too: destroy never looks for a moved resource, and the plan takes whatever is at the recorded ID without checking schema_id. Co-authored-by: Isaac <no-reply@databricks.com>
… Badness) Co-authored-by: Isaac <no-reply@databricks.com>
Before the lookup existed the plan created the resource; an error other than not-found at the config's ID now leads to the same plan, with a warning. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
e9ef060 to
aa83943
Compare
…e schema-rename's in-place rename Co-authored-by: Isaac <no-reply@databricks.com>
…eset to main's Co-authored-by: Isaac <no-reply@databricks.com>
Changes
Changing a schema's
namenow renames it in place (PATCH new_name) instead of deleting and recreating it, so the schema and its contents survive.UC moves the children of a renamed catalog or schema along with it. A volume in a renamed schema, or a schema in a renamed catalog (
schema_name/catalog_name: ${resources.<parent>.name}), used to be planned as a recreate, whose create then failed withRESOURCE_ALREADY_EXISTSon every deploy. The planner now re-keys such children (update_id, reasonparent_renamed). Catalog rename was already supported and had the same latent bug for child schemas.state_only: the framework saves it under the ID the adapter's new optionalIDFromStategives it, with no request. It is left out of the text plan and counted as unchanged. A child with its own changes too goes throughDoUpdateWithIDat its new path.id) and orders it after the parent, taken from the state'sdepends_onbecause the config may now reference another one. Before, the delete went to the old path and the moved volume was left behind.A resource can also be missing from its recorded ID with no rename in the plan: a deploy stopped after renaming its parent, or it was renamed out of band. The plan then reads it at the
IDFromStateID and takes what it finds only if its internal ID matches the recorded one, so a different object under that name is never adopted; the plan entry'sid(declared, but never set until now) records where it is, and apply addresses it there. If that read fails with anything but not-found, the plan warns and goes on as before.internal_id_fieldlifecycle setting names the internal ID (schema_id,volume_id). The framework records it from the remote state on every save, and the plan skips it (reasoninternal_id).bind) gets it from a state-only update. A migration from terraform records it directly:schema_idfrom the terraform state,volume_idfrom the remote (read bybundle deployment migrate, taken from the plan check when migrating on deploy).apitypes.generated.ymlmaps schemas and volumes toSchemaInfo/VolumeInfo, as registered models already map to their Info type.The test server now looks a volume's full name up case-insensitively and rejects a taken schema name, like UC.
state_presentand the synced-table terraform fixture no longer create a schema twice. The earlier test-server work is in #7408 (merged).Known gaps, all as on main, recorded with
Badness: destroy does not look for a resource renamed out of band (schemas/destroy_after_rename_out_of_band); the plan takes whatever is at the recorded name without checking the internal ID (schemas/foreign_at_recorded_name); a catalog renamed out of band is not found (catalogs/rename_out_of_band, fixed by #7418). A parent named by a literal rather than a reference is not followed.With #7345 and #7361 (merged), a renamed schema keeps its grants and permissions in sync. Registered models and UC secrets follow parent renames in #7379 and #7381.
Tests
Acceptance tests marked
Cloud = truepass locally and on AWS, GCP and Azure.Cloud = true:schemas/rename,schemas/rename_with_volume,catalogs/rename(catalog → schema → volume),volumes/rename_catalog_and_schema(two parent renames at once),schemas/rename_with_volume_ref(a job reading the volume'sfull_name,id,volume_id),schemas/rename_then_change(update, rename and recreate reach the new path, also after a second rename and a rename back).schemas/rename_with_comment,catalogs/rename_with_comment. Case-only renames:schemas/rename_case_only,volumes/rename_case_only(UC keeps the lowercase name; a re-key under a renamed schema keeps the config's casing, which UC reads case-insensitively).volumes/move_from_renamed_schema(Cloud = true) andvolumes/recreate_in_renamed_schema(local only: an external volume needs an external location).volumes/rename_out_of_band,schemas/rename_out_of_band(found by id, no requests),catalogs/rename_out_of_band,catalogs/rename_all_out_of_band,volumes/recreate_out_of_band,schemas/recreate_out_of_band(a different id: created, not adopted),schemas/rename_out_of_band_old_state(a state without the ids records them, then follows the rename).schemas/rename_interrupted,schemas/recreate_interrupted. A failed lookup read:schemas/rename_probe_forbidden(local only, injected 403).EnvMatrix.READPLAN).migrate/command/{basic,grants}record the ids; the invariantmigrateandauto-migratetargets show no drift.grants/schemas/change_nameandmigrate/auto/schema-renameshow the in-place rename;lifecycle/prevent-destroyswitched its recreate trigger fromnametocatalog_name.addParentMoves,followsParentRename,Changes.HasOnlySingleReasonand the skipped internal-ID changes.This pull request and its description were written by Isaac.