Repository navigation
Re-key grants when their parent's ID changes - #7345
Merged
Merged
Conversation
Co-authored-by: Isaac <[email protected]>
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 <[email protected]>
Co-authored-by: Isaac <[email protected]>
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 <[email protected]>
andrewnester
approved these changes
Nov 4, 2026
Co-authored-by: Isaac <[email protected]>
denik
enabled stacked auto-merge
November 4, 2026 14:46
Co-authored-by: Isaac <[email protected]>
Co-authored-by: Isaac <[email protected]>
Co-authored-by: Isaac <[email protected]>
Collaborator
Integration test reportCommit: e1b8c92
26 interesting tests: 21 FAIL, 5 flaky
Top 50 slowest tests (at least 2 minutes):
|
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Nov 9, 2026
## Release v1.25.0 ### CLI * `databricks aitools install --output json` now reports a more specific `error_category` (`MANIFEST_NOT_FOUND`, `PERMISSION_DENIED`, `FILESYSTEM`) for some failures it reported as `UNCATEGORIZED`. ([#7380](#7380)) * Suggest `databricks auth logout --profile <profile-name> --delete` when multiple profiles match the same workspace in `databricks auth docker` commands. ([#7363](#7363)) * Fix `%pip` in Jupyter notebooks opened over `databricks ssh connect` on serverless environment versions 5 and 6 and on dedicated clusters running recent Databricks Runtime versions, which fell back to the stock IPython magic instead of the Databricks one. ([#7263](#7263)) ### AI Runtime * `databricks air run` now validates the config server-side while it uploads the run artifacts, instead of before, which shortens submission. ([#7368](#7368)) * Remove `CRITICAL` as a valid `compute.priority_class` value; the AI Runtime API no longer accepts it. ([#7371](#7371)) ### Bundles * Built-in templates add the workspace ID to `workspace.host` (`?w=<id>`) when the profile or an environment variable sets it, so generated bundles select the right workspace on hosts shared by several workspaces. Welcome messages show the same URL, and `dbt-sql` also adds `?o=<id>` to the HTTP path it suggests for `dbt init`. ([#7350](#7350)) * Fix grants of a renamed or recreated catalog, schema, volume or other UC resource staying recorded under the old name, which made the next `bundle plan` propose to apply them again. ([#7345](#7345)) * Fix permissions of a recreated pipeline, app, dashboard, model serving endpoint or other resource staying recorded under the old ID, which made every later `bundle plan` propose to apply them again. ([#7361](#7361)) * Add the `postgres_data_apis` resource (Private Preview) for enabling and configuring the Data API of a Lakebase Postgres database. ([#7160](#7160)) * Fixes [#4012](#4012): registered model `aliases` are now set in Unity Catalog on deploy instead of being silently ignored. A model without an `aliases` section keeps the aliases set outside the bundle (for example by MLflow), and `aliases: []` removes them. ([#7163](#7163)) * Include variable declarations and the source of each resolved value in the `--include-locations` output of `bundle validate` and `bundle summary`. ([#7351](#7351)) * Add `.workspace.URLID` to bundle templates: the workspace ID that `.workspace.URL` adds, or empty, so templates can use it without failing when the ID is unknown. ([#7388](#7388)) * Expose the workspace of the selected profile to bundle templates as `.workspace`, with `Hostname`, `ID`, and `URL`, so templates can address a workspace on a host shared by several workspaces. A template input named `workspace` takes precedence. ([#7349](#7349)) ### Dependency Updates * Bump dependencies with known vulnerabilities. ([#7394](#7394)) * Upgrade `github.com/mattn/go-runewidth` to v0.0.31, which removes ~30ms of startup time from every command. ([#7391](#7391)) * Update the Go SDK to [v0.194.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.194.0). ([#7371](#7371)) * Update the Go SDK to [v0.195.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.195.0). ([#7384](#7384))
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.