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 ValidateWorkspaceSharedPermissions rename and shares workspace_root_test.go. Review/merge #5428 first; GitHub will retarget this to main afterward.

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

eng-dev-ecosystem-bot commented Jun 4, 2026

Commit: 30172b5

Run: 27009320063

@shreyas-goenka shreyas-goenka force-pushed the ticklish-munching-bear branch from cc47397 to b2c7271 Compare June 5, 2026 10:05
@shreyas-goenka shreyas-goenka force-pushed the pr-deploy-folder-permission-check branch from 7c783aa to 5e587f0 Compare June 5, 2026 10:05
@shreyas-goenka shreyas-goenka force-pushed the ticklish-munching-bear branch from b2c7271 to c2aa303 Compare June 5, 2026 10:11
@shreyas-goenka shreyas-goenka force-pushed the pr-deploy-folder-permission-check branch from 5e587f0 to 2cd3ef3 Compare June 5, 2026 10:11
@shreyas-goenka shreyas-goenka force-pushed the ticklish-munching-bear branch from c2aa303 to b1d732b Compare June 5, 2026 10:14
@shreyas-goenka shreyas-goenka force-pushed the pr-deploy-folder-permission-check branch from 2cd3ef3 to 07abec1 Compare June 5, 2026 10:14
@shreyas-goenka shreyas-goenka force-pushed the ticklish-munching-bear branch from b1d732b to 9e2f26b Compare June 5, 2026 10:18
@shreyas-goenka shreyas-goenka force-pushed the pr-deploy-folder-permission-check branch from 07abec1 to 26c3380 Compare June 5, 2026 10:18
…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>
@shreyas-goenka shreyas-goenka force-pushed the ticklish-munching-bear branch from 9e2f26b to 00c5b7b Compare June 5, 2026 10:18
@shreyas-goenka shreyas-goenka force-pushed the pr-deploy-folder-permission-check branch from 26c3380 to 30172b5 Compare June 5, 2026 10:19
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