-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Changing permissions of an input file does not cause its actions to rerun #3400
Comments
As your example shows, it affects correctness, so it certainly is a bug. A more realistic example, albeit with significantly worse consequence, is following.
Now, if the permissions of If you don't like
|
I agree with @aehlig that this is a correctness issue. We've never tracked mods, and it's never been a problem in practice, though. |
@ulfjack what's the right category for this? |
I don't see any category more appropriate than misc. |
We're now triggering on ctime everywhere, which, in principle, detects mod changes. However, our action cache does not take mods into account for the action cache entry, which would be the next step here - it's not a conceptually complicated change, but it will increase memory consumption by a bit. We're also not tracking mods during remote execution or for the spawn cache. |
I think if we put the mods into FileContentsProxy, and then use them when we create the action cache entry, that would be straightforward and fix action caching. |
Here is another repro of what I presume is the same root cause. Setup: sh_binary(
name = "must_be_executable",
srcs = ["ex"],
) On initial run, as expected, this fails to build:
After
But after
And running
I was attempting to use a |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen (or ping me to reopen) if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
Was this issue fixed? This should not be closed. |
This is not affecting me personally and I consider it pretty low priority — in fact I'm not sure if you would consider it a bug — but I'm filing it in case it's something you want to address.
Description of the problem / feature request / question:
Changing the permissions of an input file (e.g. with chmod) do not cause any actions that have that file as an input to rerun. Seems like this might be a bug, although the only scenarios I've been able to come up with are somewhat contrived, such as the example below.
If possible, provide a minimal example to reproduce the problem:
BUILD
file:Then,
touch main.in
and thenbazel build :main
. As expected, bazel-genfiles/main.out will say:main.in is not executable
Then,
chmod +x main.in
andbazel build -s :main
. Nothing rebuilds, and bazel-genfiles/main.out has not changed.Environment info
Operating System: OSX and Linux
Bazel version (output of
bazel info release
): 0.5.2The text was updated successfully, but these errors were encountered: