-
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
UX: make --remote_download_output=minimal download the necessary files when invoking bazel run
#11920
Comments
In #12015 (comment), @allada said:
|
Though the documentation says that the |
I think the problem here is that Your use case We had a case where we execute ~50k jobs + ~2k tests remotely and nothing locally. The problem is that we needed the |
I'm using |
I see, but since you are running
You can do this with automatically in a |
I explicitly flagged this issue as a UX one because I don't believe it makes sense to let people run commands that will inherently not work. If |
Thanks @allada, adding the following to my
I agree with what the issue description says - the current behavior is confusing for me, the end user. If, for whatever reason, it will not be fixed, it'd be great to at least detect this situation and explain how to fix it rather than just let the build fail with "file not found" errors. Thank you for helping to understand what is going on and helping to fix it. |
i just ran into this too, and had to set I would have expected Bazel to download all runfiles for a runnable target. To me, "minimal" means "only what is required", and not "nothing". and for a (I do understand the explanation with the |
@tommyknows, I have seen this happen before when we had a custom data_runfiles = ctx.runfiles(files = [...])
if ctx.attr.data:
for item in ctx.attr.data:
data_runfiles = data_runfiles.merge(ctx.runfiles(files = item[DefaultInfo].files.to_list()))
data_runfiles = data_runfiles.merge(item[DefaultInfo].data_runfiles)
...
return [DefaultInfo(files = ..., data_runfiles = data_runfiles)] It took us quite some time to get this figured out, but at the end of the day doing some fancy |
With If I have a
I would have expected that |
I'm encountering the same behavior as described by @tommyknows and @rmohr: |
@coeuvre how hard would this be to get fixed? |
IIUC, there are two problems here:
I agree both issues should be fixed. I am looking into the solutions. |
…tputs=all`. This leads to warnings if people set BwtB settings themselves. They will just have to work around bazelbuild/bazel#11920 on their own. This also allows us to immediately benefit if that is eventually fixed.
Also stop setting `run:rules_xcodeproj_generator --remote_download_outputs=all`. This leads to warnings if people set BwtB settings themselves. They will just have to work around bazelbuild/bazel#11920 on their own. This also allows us to immediately benefit if that is eventually fixed.
Also stop setting `run:rules_xcodeproj_generator --remote_download_outputs=all`. This leads to warnings if people set BwtB settings themselves. They will just have to work around bazelbuild/bazel#11920 on their own. This also allows us to immediately benefit if that is eventually fixed.
@coeuvre Any chance that this gets into 6.0? |
I will try to cherry-pick this into 6.0. |
@bazel-io flag |
@bazel-io fork 6.0.0 |
Always use `ToplevelArtifactsDownloader` when building without the bytes. It checks the combination of current command (e.g. `build`, `run`, etc.) and download mode (e.g. `toplevel`, `minimal`) to decide whether download outputs for the toplevel targets or not. Also in the `RunCommand`, we wait for the background downloads before checking the local filesystem. Fixes bazelbuild#11920. Closes bazelbuild#16545. PiperOrigin-RevId: 487181884 Change-Id: I6b1a78a0d032d2cac8093eecf9c4d2e76f90380f
Always use `ToplevelArtifactsDownloader` when building without the bytes. It checks the combination of current command (e.g. `build`, `run`, etc.) and download mode (e.g. `toplevel`, `minimal`) to decide whether download outputs for the toplevel targets or not. Also in the `RunCommand`, we wait for the background downloads before checking the local filesystem. Fixes #11920. Closes #16545. PiperOrigin-RevId: 487181884 Change-Id: I6b1a78a0d032d2cac8093eecf9c4d2e76f90380f
Description of the problem / feature request:
When using remote build exection, calling
bazel run sometarget --remote_download_output=minimal
doesn't make sense: Bazel will not dowload all the files required to runsometarget
.I propose changing the behaviour of
--remote_download_output=minimal
to download files needed to run an action that is called withbazel run
.Feature requests: what underlying problem are you trying to solve with this feature?
I'm trying to improve the user experience of Bazel.
Not downloading the files needed to run a target passed to
bazel run
is never something that a user wants to do.Any other information, logs, or outputs that you want to share?
I think the behavior would still be consistent with the meaning of
--remote_download_output=minimal
. The documentation says:I believe it is fair to consider
sometarget
a local action when callingbazel run sometarget
.The text was updated successfully, but these errors were encountered: