Repository navigation
Re-key grants when their parent's ID changes - #7345
Merged
Merged
Conversation
Co-authored-by: Isaac <no-reply@databricks.com>
The grants ID embeds the parent's full name. When the parent was renamed (catalogs, volumes) or recreated under a new name (schemas), the grants were applied to the new name but their state kept the old ID, so the next plan proposed them again: UC 404s on the old name (plan: create), the test server does not (plan: update, forever). full_name is now an updatable ID field of every grants type, and DoUpdateWithID records the new ID. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 2 changed tests (limit=20, 0 not selected) 4 tests: regression=4 unreleased=0 coverage=0 failing=0
TestAccept/bundle/resources/grants/schemas/change_name/DMS=: branch ✅ | main (ef99113) ❌ | latest (v1.24.0) ❌main (ef99113): latest (v1.24.0): TestAccept/bundle/resources/grants/schemas/change_name/DMS=true: branch ✅ | main (ef99113) ❌ | latest (v1.24.0) ❌main (ef99113): latest (v1.24.0): TestAccept/bundle/resources/grants/volume_change_name/DMS=: branch ✅ | main (ef99113) ❌ | latest (v1.24.0) ❌main (ef99113): latest (v1.24.0): TestAccept/bundle/resources/grants/volume_change_name/DMS=true: branch ✅ | main (ef99113) ❌ | latest (v1.24.0) ❌main (ef99113): latest (v1.24.0): |
Collaborator
Integration test reportCommit: ecf3ada
Top 3 slowest tests (at least 2 minutes):
|
A config file named after a sub-resource now applies to that sub-resource of every parent, so the ten identical <parent>.grants.yml files become one. Co-authored-by: Isaac <no-reply@databricks.com>
andrewnester
approved these changes
Nov 4, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
denik
enabled stacked auto-merge
November 4, 2026 14:46
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: e1b8c92
26 interesting tests: 21 FAIL, 5 flaky
Top 50 slowest tests (at least 2 minutes):
|
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
Grants are keyed by their parent's full name (
volume/main.s.vol). When the parent got a new ID, the grants were applied under the new name, but their state kept the old ID. This happens on a rename (catalogs, volumes) or a recreate under a new name (schemas). The nextbundle planthen proposed the grants again. On UC the old name 404s, so the plan showscreate ...grantsonce; on the test server the plan showsupdate ...grantsforever.full_nameis now anupdatable_id_fieldsentry for every grants type, andDoUpdateWithIDrecords the new ID. This followssecret_scopes.permissions.yml, which solves the same problem for secret scope ACLs. The rule lives in a singleconfigs/grants.yml: a config file named after a sub-resource now applies to that sub-resource of every parent (catalogs.grants,schemas.grants, ...).Needed before #7343 (schema rename), so that renamed schemas keep their grants in sync.
Tests
New acceptance tests,
Cloud = true, passing locally and on AWS:grants/volume_change_name: volume rename (update_id).grants/schemas/change_name: schema name change (a recreate today).The first commit adds them with the pre-fix goldens; the second commit shows the fix flipping them to a no-op plan.
This pull request and its description were written by Isaac.