-
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
Add flag --experimental_remote_build_event_upload #16299
Add flag --experimental_remote_build_event_upload #16299
Conversation
0aaa633
to
feb0282
Compare
+ " profile). Paths for blobs that are already uploaded to the remote cache are" | ||
+ " converted. Default to 'all'.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to mention the paths here? And if so, can the explanation be expanded, since what are they being converted to, and what does it have to do with uploading? (I know the answers to these, but thinking more for the documentation.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated doc.
"--incompatible_remote_build_event_upload_respect_no_cache has been deprecated in favor" | ||
+ " of --experimental_remote_build_event_upload.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So does --experimental_remote_build_event_upload=minimal
also imply --incompatible_remote_build_event_upload_respect_no_cache
? This deprecation should probably mention the minimal
value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So does
--experimental_remote_build_event_upload=minimal
also imply--incompatible_remote_build_event_upload_respect_no_cache
?
No. I think with --experimental_remote_build_event_upload=minimal
, there is no need for incompatible_remote_build_event_upload_respect_no_cache
, right?
Updated message to mention minimal
.
feb0282
to
a55ad95
Compare
@brentleyjones can you give this patch a try with your use cases? I think it's good enough but I might miss something. |
+ " profile). file:// scheme is used for the paths of local files and bytestream://" | ||
+ " scheme is used for paths of (already) uploaded files. Default to" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to mention the path behavior of all
? Or adjust it to be agnostic of the setting (since the previous sentence already states what is or is not being uploaded)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@coeuvre Will do. |
a55ad95
to
53f75b4
Compare
Do you want to mention in the PR description that this fixes #16151? (I'm still testing that though.) |
I tested as well and works well for our use case and what we were seeing. |
Looks like this is working for us as well. I tested both on 5.3 without this flag to reproduce that |
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
@coeuvre @meteorcloudy This has been great in our usage. Can we have the name become non-experimental, and the default changed to |
SGTM. |
@meteorcloudy I don't think anything related to the implementation has changed in 7.0, the "it's worked great" has been 6.1.1 for me. Since a name change isn't a breaking change, can I include that part in 6.2? So I would do two PRs, one to change the name (and cherry-pick that) and one to flip the value (for 7.0 only)? I'm fine either way, I just want people to discover and use this great feature 😊. |
SGTM, and I believe we have the For example, bazel/src/main/java/com/google/devtools/build/lib/packages/semantics/BuildLanguageOptions.java Line 201 in 9f2cc56
|
When I set To reproduce this, you'll need to enable
Build with old flagthen build
The event contains
Build with new flag
and then add the flag
The event contains
The reference doesn't exist
So in sum,
Edit 1: this is bazel 6.2.1
to suspend upload of the linking result. |
Oh no, after #16999, BES always uses bytestream. |
You can use |
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 tobytestream://...
. 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 #16151.