-
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 event uploader is not robust to upload failures and does not respect no-cache tag #11473
Comments
This is pretty annoying. We also set some actions to be |
I also needed to use it to prevent build failures |
I think it's reasonable to print a warning message and continue the build in this case, just like CAS upload. I can look into this.
IIUC, However, I do understand there are cases where we don't want some outputs be uploaded. We probably need another way to do this:
|
I think both of those would be good to have, and if I had to choose just one, it would be the new flag. |
…oad errors Local files referenced by build events are uploaded to remote cache with `ByteStreamBuildEventArtifactUploader` which uses `ByteStreamUploader` and `MissingDigestsFinder` internally. This PR changes `ByteStreamBuildEventArtifactUploader` to use `RemoteCache` directly in order to benefit from recently improvements to `RemoteCache`. Upload error that used to crash Bazel or cause a non-zero exit code is now caught and reported. Fixes #13920. Related #11473. Closes #13959. PiperOrigin-RevId: 396526152
I just wanted to bump this, since it's been nearly 3 months since the last comment. We would love to have our timing profile, and other BES related files, uploaded, but we can't because we don't want BES to cause our |
Sorry for the delay. I will try to make this into 5.0. |
Thank you @coeuvre! |
Hi @coeuvre, do you still think this will make 5.0? |
I do think. My fix is almost done. |
That's great to hear! |
Description of the problem / feature request:
The BEP code that uploads missing files to remote cache has problematic behavior in two cases:
no-cache
tag works correctly in that an AC entry never gets written to the remote cache, the BEP uploader's "upload-referenced-blobs" behavior means thatno-cache
cannot be used to prevent writing the action outputs (= CAS blobs) to the remote cache. In particular, we would like to useno-cache
tags for actions that generate large artifacts that change often, and therefore not upload them to remote cache.--nobuild_event_json_file_path_conversion
fixes these issues, but it has the downside that none of the entries in the BES report reference the files in the remote cache, even if they were uploaded there as part of the build process.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run a remote cache at grpc://localhost:8980 (I used bb-storage).
Create two targets that output a large file, and add a
no-cache
tag to the other one.We simulate upload failures by disabling retries and using a small timeout value. Without
--build_event_json_file
the build of//:bigfile
passes with warnings:With
--build_event_json_file
the build fails:The BEP uploader also doesn't respect the
no-cache
tag (notice that the build does not emit BulkTransferException anymore, because it doesn't attempt to upload the results due to theno-cache
tag):What operating system are you running Bazel on?
Ubuntu 18.04.3 LTS
What's the output of
bazel info release
?release 3.1.0
Have you found anything relevant by searching the web?
No.
Any other information, logs, or outputs that you want to share?
I wonder if the BES uploader should behave as if
--nobuild_event_json_file_path_conversion
was passed for the files that have not been uploaded to the remote cache by the build?The text was updated successfully, but these errors were encountered: