-
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
Cached rules with directory outputs fail to build when build without the bytes is enabled #18579
Comments
Can you use a custom Starlark rule with |
@tjgq I actually hit the problem with a custom rule that declares a rule.bzl:
BUILD:
Same thing happens:
I'm looking into using
I see. If we can't fix it, surely it should fail on both cases to avoid the current confusing behaviour. In fact this broke the build for everyone since the first commit worked fine but after it merged it started failing for everyone |
I agree. I'll look into making this an error (behind an --incompatible flag). |
…ule actions. The motivation behind this change is to eventually promote the warning to an error in the output case; this avoids surprising behavior such as described in #18579. I'm less confident that the input case (source directories) can be similarly promoted to an error, but I'm still extending the warning to all actions for symmetry. PiperOrigin-RevId: 538470433 Change-Id: Ic6c8a4cb353dda5f6397d286fe2e6faee28f896c
…ule actions. The motivation behind this change is to eventually promote the warning to an error in the output case; this avoids surprising behavior such as described in bazelbuild#18579. I'm less confident that the input case (source directories) can be similarly promoted to an error, but I'm still extending the warning to all actions for symmetry. PiperOrigin-RevId: 538470433 Change-Id: Ic6c8a4cb353dda5f6397d286fe2e6faee28f896c
To close the loop here: I've added an |
I'm going to close this since the actual fix here would be something like #19030. |
Description of the bug:
Rules outputting directories (which is not sane, but unfortunately happens) that hit the remote cache fail to build when build with the bytes is enabled.
I hit this when trying remote execution and it surprised me that tagging the genrule with
no-remote-exec
immediately fixes the issue, only to break a few builds later when the local outputs are gone and it starts to hit the remote cache. Note that this issue happens without remote execution at all.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a single BUILD file with:
build it:
clear the local outputs:
build again (should hit the remote cache):
Which operating system are you running Bazel on?
Linux and macOS
What is the output of
bazel info release
?release 6.2.1
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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: