Repository navigation
executor: return untouched output directories from the input root in strict mode - #53
Merged
Merged
Conversation
dzbarsky
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bazel adds every declared output directory (tree artifact) to the input root as an empty directory (bazelbuild/bazel#15366,
MerkleTreeComputer). Inactiondfs_strictmode outputs are collected from the stage only, so an output directory the action never writes into is silently skipped and Bazel fails withmandatory output <path> was not created.This breaks rules_go's nogo on every package:
RunNogodeclares a<pkg>_nogodirectory that it only writes into when an analyzer suggests fixes.Per the REAPI spec,
ActionResult.output_directoriesmust contain an entry for each requested output directory that "existed after the action completed", so the empty directory should be returned. BuildBuddy and Buildbarn both do this because they collect outputs from the merged input/output tree.Change
OutputParentValidator.validatenow walks the full output path and reports whether the path itself is a directory in the input root. Parent conflict checks (input file/symlink as an output parent) are unchanged.validateOutputParentsAgainstInputsWithCancellationcollects those paths during the existing validation pass, and they are created in the stage before execution. actiondfs already merges staged and input directories, so the action's view is unchanged, and the directory is now collected like any other staged output.prepareOutputParentstest.mutates_inputs) is unaffected; its collection path already sees input directories.