Repository navigation
Re-key permissions when their parent's ID changes - #7361
Merged
Merged
Conversation
Contributor
|
Commit: Regression test reportSelected 4 changed tests (limit=20, 0 not selected) 7 tests: regression=7 unreleased=0 coverage=0 failing=0
TestAccept/bundle/resources/model_serving_endpoints/basic/DMS=: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) TestAccept/bundle/resources/model_serving_endpoints/basic/DMS=true: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) TestAccept/bundle/resources/model_serving_endpoints/drift/recreated_same_name/DMS=: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) TestAccept/bundle/resources/model_serving_endpoints/drift/recreated_same_name/DMS=true: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) TestAccept/bundle/resources/permissions/pipelines/recreate/DMS=: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) TestAccept/bundle/resources/permissions/pipelines/recreate/DMS=true: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) TestAccept/bundle/state/permission_level_migration/DMS=: branch ✅ | main (5c0ab45) ❌ | latest (v1.24.0) ❌main (5c0ab45): latest (v1.24.0): same output as main (5c0ab45) |
Collaborator
✅ Integration test reportCommit: efab0cd
Top 3 slowest tests (at least 2 minutes):
|
denik
marked this pull request as ready for review
November 5, 2026 09:23
denik
enabled stacked auto-merge
November 5, 2026 10:38
Co-authored-by: Isaac <no-reply@databricks.com>
Permissions are keyed by their parent's object ID. When the parent was recreated (or replaced out of band) under a new ID, the permissions were applied to the new object but their state kept the old ID. The permissions API still answers for the deleted object, so every later plan proposed them again and never converged. object_id is now an updatable ID field of every permissions type, via a shared permissions.yml, and DoUpdateWithID records the new ID. A resource type's own file (secret_scopes.permissions.yml) replaces the shared one. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The seeded job 123 does not exist, so the deploy creates the job under a new ID. The permissions were applied to it but their state kept /jobs/123; it is now re-keyed to the new job. Co-authored-by: Isaac <no-reply@databricks.com>
denik
force-pushed
the
denik/permissions-rekey
branch
from
November 5, 2026 13:06
6687eaf to
efab0cd
Compare
pietern
approved these changes
Nov 5, 2026
|
|
||
| // DoUpdate calls https://docs.databricks.com/api/workspace/jobs/setjobpermissions. | ||
| func (r *ResourcePermissions) DoUpdate(ctx context.Context, _ string, newState *PermissionsState, _ *PlanEntry) (*PermissionsState, error) { | ||
| extractedType, extractedID, err := parsePermissionsID(newState.ObjectID) |
Contributor
There was a problem hiding this comment.
Why don't we use the id argument here?
Contributor
Author
There was a problem hiding this comment.
If I remember correctly, these are equivalent.
Collaborator
❌ Integration test reportCommit: eb1328d
70 interesting tests: 42 FAIL, 28 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
Permissions are keyed by their parent's object ID (
/pipelines/<id>). When the parent was recreated under a new ID (a pipelinestoragechange, an app or model rename, a dashboardparent_pathchange, a serving endpoint replaced out of band, ...), the permissions were applied to the new object, but their state kept the old ID. The permissions API still answers for the deleted object, so every laterbundle planproposed the permissions again and never converged (verified on AWS).Same fix as grants in #7345:
object_idis anupdatable_id_fieldsentry in a sharedconfigs/permissions.yml, andDoUpdateWithIDrecords the new ID. Secret scope ACLs have their own state and keepsecret_scopes.permissions.yml; a resource type's own file now replaces the shared one instead of conflicting with it.Tests
permissions/pipelines/recreate(Cloud = true, passing locally and on AWS): the first commit records the stale ID and the endless plan, the fix commit flips it to a no-op.model_serving_endpoints/drift/recreated_same_namehad this bug recorded asBadness; it now converges. Passes on AWS.model_serving_endpoints/basic: the permissions entry is planned asupdate_idinstead ofupdate.This pull request and its description were written by Isaac.