-
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
--incompatible_remote_build_event_upload_respect_no_cache
still uploads some no-cache
outputs
#16151
Comments
cc: @coeuvre |
Hello @brentleyjones, While performing above shared steps gives access error. Could you please guide if anything is required from our end to test local.
|
It's a git clone. I've changed the command to use https for easier use for people that don't have ssh keys setup on GitHub. |
Thanks for the repro! The reason why there are still outputs being uploaded even you set In your repro, there are some actions created by the rule However, I do understand that users do want to run all actions of a target locally sometimes, and prevent outputs of that target being uploaded by BEP. |
Yes. This is preventing people from using |
@coeuvre any other advice on solutions for this case? This is a hard blocker for us to fully use BEP services in generally since we have to force some tests locally, and don't want to spend many GB uploads for throw away data, but then that's tied to us uploading useful things like the full test logs etc |
I understand the problem is to prevent (some) outputs of (some) local actions to be uploaded to BES. What I am missing are:
I think the solution might be different depending on the answers to above questions. |
I think for all of these, they shouldn't upload if it's only BES that is trying to upload them. If they would upload normally, then they will be uploaded normally. Basically, BES shouldn't cause these blobs, if they end up in "important outputs", to be uploaded to BES. If they were previously uploaded, then they can have the bytestream URL. |
Do you mean something similar to |
Sorta. That already exists as |
Okay, then it's essentially an uploader that:
Do you think using regex to match the path of outputs is a good enough allowlist mechanism? @keith Does this solution work for you? |
If we can reliably describe the paths of tests logs and the timing profile, I believe so. Though most users of BES would want this to be the default behavior, and it would be a little annoying to have to tell every user to set this flag. |
Thanks for the clarifications! Now it's clear to me. Here is solution: we introduce a new flag WDTY? |
Yeah, I think that is nice. Ideally, when it leaves experimental state, the default flips to |
SGTM. we can try to make this into |
Add flag `--experimental_remote_build_event_upload` which controls the way Bazel uploads files referenced in BEP to remote cache. It defaults to `all` which maintains current behaviour: Bazel uploads all local files referenced by BEP to remote cache and convert their paths to `bytestream://...`. Additionally, `--incompatible_remote_build_event_upload_respect_no_cache` can be set to avoid uploading outputs that are generated by "non-remote-cachable" spawns. If set to `minimal`, local outputs are not uploaded to the remote cache, except for files that are **important** to the consumers of BES (e.g. test logs and timing profile). Paths for files that are already uploaded to the remote cache are converted. `--incompatible_remote_build_event_upload_respect_no_cache` is deprecated in favour of this new flag. Fixes bazelbuild#16151. Closes bazelbuild#16299. PiperOrigin-RevId: 476865036 Change-Id: I4c506f7447a41e8e64a4ed0785e7f20a40ea3b84
Seems that when an action fails, the stderr will be found under a path something like |
Made a PR for uploading stdout and stderr for actions as well #17110 |
Description of the bug:
Some test target outputs are still uploaded to the cache even when
--incompatible_remote_build_event_upload_respect_no_cache
and--modify_execution_info='.*=+no-remote'
are set. rules_apple tests upload the binary and the zip, andswift_test
has the runner uploaded (which it shouldn't), but not the binary...What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
The following will repro the bug:
Resulting in bytestream/upload for the test outputs:
The following will somewhat repro the bug:
Resulting in bytestream/upload for the test runner, but not the binary:
Which operating system are you running Bazel on?
macOS 12.4
What is the output of
bazel info release
?release 5.3.0
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
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: