Skip to content

bundle: warn during deploy when workspace folder permissions exceed the bundle's#5439

Draft
shreyas-goenka wants to merge 1 commit into
ticklish-munching-bearfrom
pr-deploy-folder-permission-check
Draft

bundle: warn during deploy when workspace folder permissions exceed the bundle's#5439
shreyas-goenka wants to merge 1 commit into
ticklish-munching-bearfrom
pr-deploy-folder-permission-check

Conversation

@shreyas-goenka
Copy link
Copy Markdown
Contributor

@shreyas-goenka shreyas-goenka commented Jun 4, 2026

Summary

Brings the live workspace-folder ACL comparison (already done in bundle validate via ValidateFolderPermissions) to bundle deploywithout adding any API latency.

ApplyWorkspaceRootPermissions already calls SetPermissions on each workspace path prefix (root_path and, when separate, state_path). The SDK response carries the resulting ACL, so we reuse it for the comparison instead of issuing a separate GetPermissions.

Because the Set replaces the folder's direct ACL with the declared permissions, any principal still showing higher access in the response is inherited from a parent folder — the broader access that actually persists after the deploy, which is exactly the scope mismatch worth surfacing.

The check is skipped for /Workspace/Shared paths, consistent with existing behavior.

Stacked on #5428 — depends on the ValidateWorkspacePermissions rename and shares workspace_root_test.go. Review/merge #5428 first; GitHub will retarget this to main afterward.

…he bundle's

ValidateFolderPermissions already compares the live workspace ACL against the
declared permissions, but it only runs during `bundle validate`. This brings the
same check to `bundle deploy` without adding any API latency: ApplyWorkspaceRoot-
Permissions already calls SetPermissions on each workspace path prefix (root_path
and, when separate, state_path), and the response carries the resulting ACL.

Reusing that response, we compare against the declared permissions. Because the
Set replaces the folder's direct ACL with the declared set, any principal still
showing higher access is inherited from a parent folder — the broader access that
actually persists after deploy, which is the scope mismatch worth surfacing.

No extra GetPermissions round trip is made. The check is skipped for /Workspace/
Shared paths, consistent with the existing behavior.

Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 7c783aa

Run: 26949964623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants