Skip to content

Allow native workers to request sticky action directories - #270

Closed
jrandolf wants to merge 2 commits into
buildbarn:mainfrom
sloper-ai:codex/native-sticky-directories
Closed

jrandolf wants to merge 2 commits into
buildbarn:mainfrom
sloper-ai:codex/native-sticky-directories

Conversation

@jrandolf

@jrandolf jrandolf commented Sep 30, 2026 •

Copy link
Copy Markdown

Native workers request mode 0777 for action directories, input roots and temporary directories. Add native.useStickyDirectories so deployments that run actions under another UID can request the sticky bit on those three directories. The default remains disabled, preserving actions that need to remove worker-owned inputs. Ordinary input/output subdirectories, server logs, readiness checks and the virtual backend retain their existing modes.

Pass the selected mode through the shared-directory creator and local executor, and regenerate the configuration protobuf. Tests cover both modes, directory-creation failures and unaffected directories. The new expectations fail when directory creation uses the old fixed mode.

Both Go and Bazel dependencies now use upstream bb-storage 624be7d, the merged BSD sticky-bit fix from #382.

The bb-storage update also adopts its cache configuration change: local cache settings now use keyLocationMap: { onBlockDevice: ..., maximumGetAttempts: ..., maximumPutAttempts: ... } instead of the three former top-level fields. Existing native-worker local cache configurations need that migration.

Validation on the updated dependencies: native macOS builder tests with and without the race detector; worker and builder cross-builds for Linux amd64/arm64, Windows amd64 and FreeBSD amd64; upstream formatting, stable repeated generation and golint. FreeBSD was cross-compiled only. Native Unix permission and ACL semantics still apply; this option does not provide complete action isolation or change Windows access controls.

Integration tests using this PR and the canonical merged storage dependency passed on Linux (normal/race) and macOS. Real actions exercised omitted, false and true settings, the three selected directory modes, unchanged input/output and log-directory modes, and cleanup.

Fixes #269.

@jrandolf
jrandolf force-pushed the codex/native-sticky-directories branch from 06fd7ef to bf954a9 Compare September 30, 2026 20:22
@jrandolf
jrandolf marked this pull request as ready for review September 30, 2026 20:22
@sloper-ai sloper-ai closed this by deleting the head repository Oct 10, 2026
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.

Allow native workers to request sticky action directories

2 participants