Skip to content

direct: ignore remote-only changes on name-based ID fields#5599

Open
denik wants to merge 3 commits into
mainfrom
denik/named-id-fields
Open

direct: ignore remote-only changes on name-based ID fields#5599
denik wants to merge 3 commits into
mainfrom
denik/named-id-fields

Conversation

@denik

@denik denik commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The direct engine reacted to remote-only changes on the name fields that compose a resource's ID — recreating schemas/volumes or renaming catalogs on a no-op redeploy. Such a difference can only be backend normalization: the resource was just fetched by that ID, so a real out-of-band rename would 404 (already handled as resource-gone), not come back as a changed value.

Encode this declaratively with a new resources.yml key, named_id_fields: local changes recreate as before, but remote-only differences are skipped. update_id_on_changes gains the same skip (its name is kept to minimize the diff; the local-only semantics are documented). Applied to every name-keyed resource. normalize_case still covers the one case the get-by-ID argument can't — a local case-only edit.

@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

4 files changed
Suggested: @pietern
Also eligible: @janniklasrose, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

/bundle/ - needs approval

8 files changed
Suggested: @pietern
Also eligible: @janniklasrose, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

General files (require maintainer)

Files: NEXT_CHANGELOG.md
Based on git history:

  • @pietern -- recent work in bundle/direct/dresources/, ./, bundle/direct/

Any maintainer (@andrewnester, @anton-107, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

denik added 2 commits June 14, 2026 15:25
Resources fetched by a name-based ID (schemas, volumes, registered models,
apps, secret scopes, postgres resources, etc.) cannot exhibit real remote
drift on the fields composing that ID: a successful get-by-ID means a
differing remote value can only be backend normalization (e.g. UC
lowercasing), since an out-of-band rename would 404 and is already handled
as resource-gone. Reacting with recreate or rename is therefore never
correct for remote-only diffs on these fields.

Encode this declaratively:
- named_id_fields: ID components; local changes recreate, remote-only
  diffs are skipped. Replaces their recreate_on_changes entries.
- update_id_on_local_changes (renamed from update_id_on_changes): same
  skip for remote-only diffs; local changes still rename via DoUpdateWithID.

normalize_case is unchanged: it covers local case-only edits, which the
get-by-ID argument does not, and which would otherwise recreate a resource
UC considers unchanged.

Co-authored-by: Isaac
Revert the cosmetic update_id_on_changes -> update_id_on_local_changes rename
to minimize the diff (catalogs, external_locations, volumes,
secret_scopes.permissions keep their existing key). The semantics shift is
explained in comments instead: update_id_on_changes now only governs local
changes, since remote-only diffs on these ID fields are skipped by
shouldSkipIDField.

Co-authored-by: Isaac
@denik denik force-pushed the denik/named-id-fields branch from de92903 to 380841e Compare June 14, 2026 22:26
@denik denik temporarily deployed to test-trigger-is June 14, 2026 22:26 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 22:26 — with GitHub Actions Inactive
The fields hold a user-provided name that forms the resource ID (as opposed to
a server-generated id); "provided" makes clear why a remote-only difference can
only be backend normalization. Source-only rename; reason strings (id_field)
are unchanged.

Also regenerate volumes/uppercase-name/out.deploy.direct.txt, whose id_field
reasons were reverted to the stale uc_case by the rebase auto-merge.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 14, 2026 22:50 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 14, 2026 22:50 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 4f7b7ab

Run: 27514571428

Env ❌​FAIL 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 7 15 264 977 7:22
💚​ aws windows 7 15 266 975 10:56
❌​ aws-ucws linux 2 1 6 15 358 891 8:14
❌​ aws-ucws windows 2 1 6 15 360 889 13:48
💚​ azure linux 1 17 267 975 6:31
💚​ azure windows 1 17 269 973 11:26
❌​ azure-ucws linux 2 1 17 363 887 8:03
❌​ azure-ucws windows 2 1 17 365 885 13:39
💚​ gcp linux 1 17 263 978 8:12
💚​ gcp windows 1 17 265 976 13:06
24 interesting tests: 15 SKIP, 6 RECOVERED, 2 FAIL, 1 KNOWN
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 💚​R 💚​R 🟨​K 🟨​K 💚​R 💚​R 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
❌​ TestAccept/bundle/resources/model_serving_endpoints/basic 🙈​s 🙈​s ❌​F ❌​F 🙈​s 🙈​s ❌​F ❌​F 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 25 slowest tests (at least 2 minutes):
duration env testname
7:22 gcp windows TestAccept
6:27 azure windows TestAccept
5:44 aws windows TestAccept
4:44 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:26 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:19 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:07 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:13 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:11 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:09 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:55 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:55 gcp linux TestAccept
2:54 aws linux TestAccept
2:54 azure linux TestAccept
2:50 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:49 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:44 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:38 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:33 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:30 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:29 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:28 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants