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
bazel: Set a sensible strict action environment. #43530
Conversation
@GrahamcOfBorg build bazel |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: bazel Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: bazel Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: bazel Partial log (click to expand)
|
a51a777
to
887bfc9
Compare
Rebased to master. @GrahamcOfBorg build bazel |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: bazel Partial log (click to expand)
|
Retriggering because of memory failure |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: bazel Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: bazel Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: bazel Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: hello Partial log (click to expand)
|
once more |
Failure on x86_64-linux (full log) Attempted: bazel Partial log (click to expand)
|
Ah, the string moved to |
Bazel either reuses the `PATH` from the client, or sets a hardcoded one. The former mode in problematic for build hermeticity. But the latter is crippled on NixOS, because the hardcoded value is `/bin:/usr/bin`. So we set the hardcoded value to match what `customBash` provides. This has the effect of aligning the environments for `ctx.actions.run` and `ctx.actions.run_shell`, which were previously distinct (bug).
887bfc9
to
dd6c83f
Compare
One more time! |
Failure on x86_64-darwin (full log) Attempted: bazel Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: bazel Partial log (click to expand)
|
Finally! \o/ |
Bazel either reuses the
PATH
from the client, or sets a hardcodedone. The former mode in problematic for build hermeticity. But the
latter is crippled on NixOS, because the hardcoded value is
/bin:/usr/bin
. So we set the hardcoded value to match whatcustomBash
provides. This has the effect of aligning theenvironments for
ctx.actions.run
andctx.actions.run_shell
, whichwere previously distinct (bug).
cc @uri-canva