-
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
Build (after clean) with disk cache is missing empty subdirectories #15789
Comments
@coeuvre Resolving this would probably require generalizing what I did in #15276 to apply to all empty (leaf) directories, not just the top-level one. What do you think of the approach to add a new artifact type representing an empty directory? I think that this could even clean up some of the existing logic introduced for #15276. |
@tjgq did you look into this recently? |
I think this issue actually runs deeper: we don't track empty directories inside tree artifacts properly (see #15901). However, it should be possible to fix the disk cache issue separately. |
Duplicated of #15789. |
Argh, yes, that's what I had in my mind. |
Description of the bug:
I build a rule with disk cache enabled. I've added a 5 second delay in
rule1.sh
to prove that it is executing:The rule generates 2 directory trees. The
empty_dir
is completely empty. And thetree
has an empty subdirectory.I do:
Then, I rebuild.
rule1.sh
is not re-executed.The empty subdirectory
empty_subdir
is missing:What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD
rule1.sh
Which operating system are you running Bazel on?
Ubuntu 20.04.1 LTS
What is the output of
bazel info release
?release 5.2.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
It looks like there is special handing for empty directories here:
bazel/src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java
Lines 1086 to 1090 in 24a4941
I am not sure how empty subdirectories are/should be handled.
The text was updated successfully, but these errors were encountered: