Repository navigation
Ignore the cluster policy creator's CAN_USE in config-remote-sync - #7717
Conversation
The backend grants the creator CAN_USE on a new cluster policy, so config-remote-sync imported it as a permissions block for policies that declare none. Drop it like the deployer's IS_OWNER/CAN_MANAGE, and seed the grant in the testserver so local runs cover it. cloud: TestAccept/bundle/config-remote-sync/cluster_policy_cross_target TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields Co-authored-by: Isaac <no-reply@databricks.com>
FixPermissions does not add a cluster policy grant back, so dropping the creator's CAN_USE next to other imported grants would revoke it on the next deploy. Drop it only when it is the whole ACL, credit the creator by token in the testserver, and cover sync and deploy with a remote group grant. cloud: TestAccept/bundle/config-remote-sync/cluster_policy_cross_target TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields TestAccept/bundle/config-remote-sync/cluster_policy_permissions Co-authored-by: Isaac <no-reply@databricks.com>
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 8 tests: regression=8 unreleased=0 coverage=0 failing=0
TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS=: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ✅main (c15c8c6): TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS=true: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ✅main (c15c8c6): TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS=: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ❌main (c15c8c6): latest (v1.26.0): TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS=true: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ❌main (c15c8c6): latest (v1.26.0): TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS=: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ✅main (c15c8c6): TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS=true: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ✅main (c15c8c6): TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS=: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ✅main (c15c8c6): TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS=true: branch ✅ | main (c15c8c6) ❌ | latest (v1.26.0) ✅main (c15c8c6): |
✅ Integration test reportCommit: 1d52db9
Top 3 slowest tests (at least 2 minutes):
|
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
No blocking or major issues found.
ilyakuz-db
left a comment
There was a problem hiding this comment.
LGTM, please TAL at other comments as well
Only admins create cluster policies and admins can use every policy, so the creator's CAN_USE is not needed in the config, and writing it there would apply one deployer's grant to other targets and deployers. cloud: TestAccept/bundle/config-remote-sync/cluster_policy_cross_target TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields TestAccept/bundle/config-remote-sync/cluster_policy_permissions Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
No new issues found.
Resolve the conflict with #7717 in permissions.go: readUnmanagedPermissions keeps returning the raw ACL (jobOwners needs the IS_OWNER entry), and addPermissionsChanges now filters it with withoutCurrentUserDefaults. Co-authored-by: Isaac <no-reply@databricks.com>
Changes
bundle config-remote-syncno longer imports the current user'sCAN_USEon a cluster policy that declares no permissions. The backend grants the creatorCAN_USEon a new policy, so this entry is there without any remote edit. It is dropped like the deployer's ownIS_OWNER/CAN_MANAGEon other resources.withoutCurrentUserManageis renamed towithoutCurrentUserDefaultsand now takes the resource type.The testserver now gives the creator
CAN_USEwhen a cluster policy is created, matching the cloud, so local runs cover this case.Why
Since #7536, config-remote-sync reads the ACL of deployed resources that declare no permissions. On cloud, the three
config-remote-synccluster policy tests began reportingResource: resources.cluster_policies.policy permissions: addand writing this into databricks.yml:After that, the next deploy created
cluster_policies.policy.permissions. They fail on AWS, Azure and GCP, for both DMS variants. The testserver gave a new policy no ACL, which is why #7536 passed locally.Decisions:
CAN_USEon a cluster policy is always dropped, also when other principals are imported with it. Only workspace admins create or edit cluster policies, and admins can use every policy regardless of its ACL. So the grant isn't needed in the config, and writing it would apply one deployer's grant to other targets and deployers. As a result, a deploy after such a sync removes the deployer's directCAN_USEentry, and they keep access as an admin.creator_user_nameis not read.Tests
config-remote-sync/cluster_policy_permissions: the first sync reports no changes. Then a group is grantedCAN_USEremotely, and the sync imports only the group. The deploy that follows applies that ACL, and the plan is a no-op.Dashboard
Failing since the 2026-11-17 nightly (the dashboard has not ingested that run yet; I will add the error links once it does):
This pull request and its description were written by Isaac.