-
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
Remote: Ignore blobs referenced in BEP if the generating action cannot be cached remotely. #14338
Conversation
…t be cached remotely.
Thank you soooo much for this! ❤️ |
This interacts in an interesting way with |
Good catch! Updated to use the same method that used to determine whether Bazel should upload local results. So the behaviours should be aligned. |
And if that sounds like a weird request, it's because we need a way for local developers to upload BES specific artifacts (timing profile mainly), without uploading everything else. In our CI case we upload everything (besides for those tagged with |
Maybe my specific case (which I think is going to be a common setup for BES users) needs the The more I think about this, I think this is the best route, to keep your new flag pure. Plus there are other uses for |
Thanks for your input. I know it is somewhat confusing. Some artifacts in BEP are outputs of actions, some of them are generated by Bazel (e.g. timing profile). This change only applies to artifacts that are outputs of actions. So with my latest change, if Basically, this PR ensures that if the outputs are not uploaded by spawns, they will not be uploaded by BES uploader as well.
I like this idea! I will create another PR for |
I didn't see that. With your latest changes, the timing profile still wasn't uploaded for me 🤔. Only when I set |
Another question: how should this affect test log upload? That is another thing that stopped uploading for us with |
I was referring to "command.profile.gz" and the newly added tests are checking that it is uploaded. Are there other files in your build that you want to be uploaded but not? If so, can you share a minimal repro?
test logs are treated as action outputs. i.e. they are uploaded if the result of test actions can be uploaded. Or not uploaded if tagged with "no-cache". |
I'm working on reducing my reproduction. With a simple case I see the profile is uploaded, but in our project it's not. I should have something soon. |
It's when using a combined cache. This fails to upload the profile:
But this doesn't:
|
I found the root cause, but it is hard to fix due to how combined cache works today: the cache itself uses remote options to decide whether upload blobs to remote cache regardless of what kind of artifacts. I may need to update the combined cache to make it works for this case. |
Fixed combined cache and added support for tag @brentleyjones please have another try. |
The latest code works. Thanks @coeuvre! |
@philwo I think this needs your review ;) |
When executing a spawn that is tagged with no-remote-cache-upload, Bazel still looks up the remote cache. However, its local outputs are not uploaded after local execution. Part of #14338. PiperOrigin-RevId: 414708472
When executing a spawn that is tagged with no-remote-cache-upload, Bazel still looks up the remote cache. However, its local outputs are not uploaded after local execution. Part of bazelbuild#14338. PiperOrigin-RevId: 414708472 (cherry picked from commit 0d7d44d)
…t be cached remotely. Introduces new flag --incompatible_remote_build_event_upload_respect_no_cache which when set to true, remote uploader won't upload blobs referenced in BEP if the generating action cannot be cached remotely. Part of bazelbuild#14338. Closes bazelbuild#14338. PiperOrigin-RevId: 414721139 (cherry picked from commit 2ec457d)
When executing a spawn that is tagged with no-remote-cache-upload, Bazel still looks up the remote cache. However, its local outputs are not uploaded after local execution. Part of bazelbuild#14338. PiperOrigin-RevId: 414708472
…t be cached remotely. Introduces new flag --incompatible_remote_build_event_upload_respect_no_cache which when set to true, remote uploader won't upload blobs referenced in BEP if the generating action cannot be cached remotely. Part of bazelbuild#14338. Closes bazelbuild#14338. PiperOrigin-RevId: 414721139
…cannot be cached remotely. (#14389) * Remote: Add support for tag no-remote-cache-upload. When executing a spawn that is tagged with no-remote-cache-upload, Bazel still looks up the remote cache. However, its local outputs are not uploaded after local execution. Part of #14338. PiperOrigin-RevId: 414708472 (cherry picked from commit 0d7d44d) * Remote: Ignore blobs referenced in BEP if the generating action cannot be cached remotely. Introduces new flag --incompatible_remote_build_event_upload_respect_no_cache which when set to true, remote uploader won't upload blobs referenced in BEP if the generating action cannot be cached remotely. Part of #14338. Closes #14338. PiperOrigin-RevId: 414721139 (cherry picked from commit 2ec457d) Co-authored-by: chiwang <chiwang@google.com>
When executing a spawn that is tagged with no-remote-cache-upload, Bazel still looks up the remote cache. However, its local outputs are not uploaded after local execution. Part of bazelbuild#14338. PiperOrigin-RevId: 414708472
…t be cached remotely. Introduces new flag --incompatible_remote_build_event_upload_respect_no_cache which when set to true, remote uploader won't upload blobs referenced in BEP if the generating action cannot be cached remotely. Part of bazelbuild#14338. Closes bazelbuild#14338. PiperOrigin-RevId: 414721139
It seems that we're missing the |
I do not. @meteorcloudy do you know? |
The flag author should do it, it seems we are missing tracking issue for a number of remote execution related incompatible flags? @coeuvre |
Created #15150. |
Introduces new flag
--incompatible_remote_build_event_upload_respect_no_cache
which when set to true, remote uploader won't upload blobs referenced in BEP if the generating action cannot be cached remotely.Fixes #11473.