-
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 failure from missing files when using --experimental_action_cache_store_output_metadata
#13882
Comments
cc: @coeuvre |
Hi @coeuvre, just a ping on this, as it makes the flag unusable for us. |
What's the use case here for changing The root cause is those files aren't downloaded in the first build because of I have a fix in hand but it requires invalidating all actions if |
And this issue can be reproduced without using |
We can't reproduce without using that flag though. We only encountered it with the flag, and after removing the flag we never encountered it again. Our use case is that we disable the remote cache if we detect that we can't connect to it (with curl), because Bazel takes way too long on each build if it can't connect to the cache (offline, vpn, etc). |
And invalidating the actions wouldn't be good. That would be a huge regression for us. There are cases when we still use the disk cache when disabling the remote cache. |
Also, I feel it's very valid to flip off the remote cache if your internet becomes too slow (on a hotspot for example). Since Dynamic Scheduling doesn't support remote cache, this can drastically speed up your build. |
This issue is similar to #8250 that Bazel knows the file is in the remote server but can't get it (evicted or no remote endpoint). The only way to generate those missing files is to rerun the generating actions. So the real fix is to implement action rewinding. A temporary fix as I mentioned above is to invalidate all actions if That said, I am curious why this didn't happen to you without |
I'll work on a repo. |
Here are some reproductions: https://github.com/brentleyjones/action_cache_store_output_metadata_bug It seems that if you don't invalidate the analysis cache that you get a build failure with or without the flag ( |
Thanks for the repros! For
The fix for The fix for |
Sorry for the delay. I just transferred to Munich and had to deal with travelling, jet lag etc. Yes, I will cherry-pick these and other fixes into 5.0. |
Fixed in the 5.0 RC with #14321 |
Description of the problem / feature request:
When using
--experimental_action_cache_store_output_metadata
, which was introduced in 4e29042, you can get build failures when going from using a remote cache to not using one.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
The second command will fail with errors like this:
What operating system are you running Bazel on?
macOS
What's the output of
bazel info release
?release 5.0.0-pre.20210810.4
The text was updated successfully, but these errors were encountered: