-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
action sandbox elides empty directories from tree artifacts #14094
Comments
@alexjski What is the proper behaviour for tree artifacts wrt empty directories? |
This is not at all an issue of the sandbox -- tree artifact values currently do not collect empty directories. The difference between a local build and a sandboxed one is that a local one would pick up those directories which are not represented in the metadata held by Bazel (as such it's kind of like picking up auxiliary files). I think a workaround you could apply would be to declare those empty directories as nested tree artifacts, generated by the same action:
@coeuvre Do we get empty directories within tree artifacts when we run an action generating trees in RBE? |
Sorry I missed the notification. For remote execution, only files are downloaded, empty directories are not downloaded. |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
I happened upon a tree artifact edge case involving empty directories.
Consider two tree artifacts,
treeA
andtreeB
. Both contain an empty directory namedempty
, buttreeB
also contains a file nameddummy
.When these tree artifacts are provided as inputs to a sandboxed action, Bazel elides the empty directory from
treeB
. If, however, a tree artifact's only content is an empty directory, then the empty directory appears in the action's sandbox. Afind -L .
in a genrule having bothtreeA
andtreeB
reports the following to stdout:(Observe that
treeB/empty
is missing.)Motivation
I'm trying to implement
pkg_tree
inrules_pkg
(bazelbuild/rules_pkg#388) but my test cases fail because something in spawn/sandbox-land is eating my empty input directories.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
See repro at https://github.com/beasleyr-vmw/repro-treeartifact-emptysubdir
What operating system are you running Bazel on?
CentOS 8
What's the output of
bazel info release
?release 4.2.1
If
bazel info release
returns "development version" or "(@Non-Git)", tell us how you built Bazel.n/a
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?n/a
Have you found anything relevant by searching the web?
The following appear to be somewhat related.
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: