-
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
experimental_strict_action_env doesn't do the right thing with remote builds #6392
Comments
@katre is this something where platforms can help? It seems that for cross compilation we'll need separate environment variables for host and execution platform? |
Yes, as @ulfjack said in the original TODO, eventually the PATH needs to be set from either the execution platform or the toolchain, so that it is correctly dependent on the actual execution system's properties. I'm not sure anyone has had any good thoughts on how to accomplish this, however. |
@EdSchouten is there anything specific you want to achieve here? At this time, Bazel cannot automatically detect the exec platform (it only talks to remote execution after creating the configuration). The best we can do, right now, is to have the user set a flag saying what the exec platform is, which is largely equivalent to setting |
In our case we want to do builds of software on Linux workers from Windows hosts. We currently see that if we pass in One idea might be to split up |
I see. Well, it's definitely problematic to mix up these things, but the proposal doesn't sound quite right either - there is no such distinction between local and remote (there is no spoon!). Are you sure that params passed to --action_env are passed to repository execute calls? That sounds completely wrong. |
@katre could you elaborate on this a bit please? Why is this hard to do? |
@buchgr The main steps that would be needed:
I'm not even sure what the set of places to change in the last step are, much less whether they each have access to an execution platform. There's a lot of design work needed for this feature. |
Assigning this to the Configurability team - this is nothing where Execution can help. (We just take whatever PATH the Spawn has in its environment and use that.) |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 3 years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
It's still a valid problem, but we also still don't have a solution and no one is looking into it. |
@bazelbuild/triage not stale |
Toolchains seem quite close to what is needed here, and would offer greater extensibility vs setting this on execution platforms. My thinking is... The thinking is such a toolchain would be added automatically to exec groups + the default, actions will automatically pick this up accordingly.
|
BazelRuleClassProvider.java
contains the following TODO:This issue causes Bazel to set
PATH
to sane default for, say, Windows, even when making use of a Linux-based remote build cluster. Users must currently pass--action_env=PATH=/bin:/usr/bin
in addition to--experimental_strict_action_env
to make Bazel functional when doing builds on Linux from a Windows host.In #6263, it was suggested that a separate bug for this is filed.
The text was updated successfully, but these errors were encountered: