Skip to content

executor: keep empty output directories writable - #59

Draft
fionera wants to merge 1 commit into
hermeticbuild:mainfrom
fionera:fionera/writable-output-directories
Draft

fionera wants to merge 1 commit into
hermeticbuild:mainfrom
fionera:fionera/writable-output-directories

Conversation

@fionera

@fionera fionera commented Nov 2, 2026

Copy link
Copy Markdown

Follow-up to #53: Bazel may put an empty declared output directory in the input root. Mirroring it into the writable stage makes untouched output collection work, but its immutable lower-tree entry still prevents an action from removing and recreating that directory. This breaks tools such as rules_foreign_cc.

Rewrite the mounted input-root descriptors to omit only empty declared output directories after preparing their stage directories. Preserve unrelated inputs and nonempty directories, and continue collecting declared outputs from the writable stage.

The added unit case checks nested directory rewriting and preservation of ordinary inputs. A native action that removes and recreates its declared output directory passed in the combined integration run.

Validation was performed with these fixes combined in a Linux KVM integration workspace, using actiond for execution and caching. The native unit suite, filesystem probes, and a large mixed-language Bazel workload passed. These draft changes have not been validated with tools/e2e.sh vm on macOS.

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.

1 participant