Repository navigation
config-remote-sync: do not import the ACL of a resource that declares no permissions (option B: no import) - #8149
Conversation
Regression test report ✅Commit: Selected 12 changed tests (limit=20, 0 not selected) 145 tests: regression=20 unreleased=26 coverage=99 failing=0
TestAccept/bundle/config-remote-sync/cluster_override_existing_key/DMS=: branch ✅ | main (e6f3460) ✅ | latest (v1.28.0) ❌latest (v1.28.0): TestAccept/bundle/config-remote-sync/cluster_override_existing_key/DMS=true: branch ✅ | main (e6f3460) ✅ | latest (v1.28.0) ❌latest (v1.28.0): TestAccept/bundle/config-remote-sync/cluster_override_merge_key/DMS=: branch ✅ | main (e6f3460) ✅ | latest (v1.28.0) ❌latest (v1.28.0): TestAccept/bundle/config-remote-sync/cluster_override_merge_key/DMS=true: branch ✅ | main (e6f3460) ✅ | latest (v1.28.0) ❌latest (v1.28.0): TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS=: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS=true: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/job_run_as/DMS=: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/job_run_as/DMS=true: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/merge_key_inherited/DMS=: branch ✅ | main (e6f3460) ✅ | latest (v1.28.0) ❌latest (v1.28.0): TestAccept/bundle/config-remote-sync/merge_key_inherited/DMS=true: branch ✅ | main (e6f3460) ✅ | latest (v1.28.0) ❌latest (v1.28.0): TestAccept/bundle/config-remote-sync/permissions/other_identity/can_manage/DMS=: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/can_manage/DMS=true: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/experiment/DMS=: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/experiment/DMS=true: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/handover/DMS=: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/handover/DMS=true: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/no_grants/DMS=: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) TestAccept/bundle/config-remote-sync/permissions/other_identity/no_grants/DMS=true: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌main (e6f3460): latest (v1.28.0): same output as main (e6f3460) 28 more failure details omitted, see the full report in the run. |
a314c91 to
342fd07
Compare
✅ Integration test reportCommit: 8eaf9e3
62 interesting tests: 61 MISS, 1 RECOVERED
Top 8 slowest tests (at least 2 minutes):
|
342fd07 to
4cfa034
Compare
…onfig-remote-sync The bundle does not manage that ACL. A permissions block written for it replaces the ACL on every later deploy, by any identity and to any target, and it was written from the point of view of the identity that synced. Permissions the config declares are still synced per principal. aws: TestAccept/bundle/config-remote-sync gcp: TestAccept/bundle/config-remote-sync/permissions Co-authored-by: Isaac <no-reply@databricks.com>
4cfa034 to
8eaf9e3
Compare
Draft for a decision: not for review or merge until an option is chosen.
Stacked on the tests PR #8146. Original change: #7536. Sibling option: #8148 (import only for the syncing identity's own deployment).
Changes
bundle config-remote-syncno longer imports the ACL of a deployed resource that declares no permissions. That part of #7536 is removed; permissions the config declares are still synced per principal, including a block that was written but not deployed yet.The bundle does not manage the ACL of such a resource: deploy leaves it alone. A
permissions:block written by the sync changes that for good. Every later deploy replaces the ACL with the block, whoever deploys and to whichever target, and the block was written from the point of view of the identity that synced (see the tests PR). To have a grant made in the UI synced, the resource has to declare permissions.ACLs are now read only for a declared block that was never deployed and for jobs whose owner the
run_assync needs, so a sync sends one request less per resource without permissions.Why
See #8146: when a service principal deploys and another identity syncs, the next deploy revokes that identity's
CAN_MANAGE, or asks for a transferred ownership back; and an ACL imported from one target replaces the ACL of the same resource in the other targets.Tests
Goldens of the tests PR, updated to what this option produces:
other_identity/can_manage,syncer_home,experiment,owner,no_grantsBadnessremoved.other_identity/handover,other_targetother_identity/declared,undeployedBadnesskept: these go through the per-principal sync, which this PR does not touch.Existing tests that covered the import:
unmanaged_permissions: first shows that nothing is imported, then declares the same blocks by hand; the rest of the script (unreadable ACL, a grant made before the block is deployed, level change, added and removed principals) is unchanged.cluster_policy_permissions: shows that a group'sCAN_USEon a policy without permissions is not imported, then declares it by hand; the creator'sCAN_USEis still kept out of the block and the deploy applies it.job_run_as: the job with a transferred owner no longer gets apermissions:block.Unit test for which ACLs are read.
Gaps and risks
permissions:block is no longer written to the config. The grant itself is not lost, since deploy does not touch that ACL.withoutCurrentUserDefaultsis now reached only for cluster policies; trimming it is left for the chosen option.declaredandundeployedstill record a grant that is lost.🤖 AI agent (fable5.2, isaac_claude)
This pull request and its description were written by Isaac.