Support Windows-hosted Bazel builds with Linux remote execution - #30121
Draft
dzbarsky wants to merge 14 commits into
Draft
Support Windows-hosted Bazel builds with Linux remote execution#30121dzbarsky wants to merge 14 commits into
dzbarsky wants to merge 14 commits into
Conversation
This was referenced Jul 3, 2026
rickeylev
added a commit
to rickeylev/rules_python
that referenced
this pull request
Jul 3, 2026
…t windows building (bazel-contrib#3890) The legacy self-executable zip action invokes `cat` through `run_shell`. The action does not declare `cat`, and a Windows-hosted Bazel invocation cannot use that action reliably when the selected execution platform is Linux. Run the existing `exe_zip_maker` through `actions_run` instead. This selects the helper and Python runtime from the execution configuration, preserves the prelude-plus-zip output format, and removes the ambient shell utility dependency. A news entry documents the fix. The Bazel integration that motivated this fix is [bazelbuild/bazel#30121](bazelbuild/bazel#30121). --------- Co-authored-by: Richard Levasseur <richardlev@gmail.com>
github-actions Bot
pushed a commit
to bazel-contrib/rules_python
that referenced
this pull request
Jul 3, 2026
…t windows building (#3890) The legacy self-executable zip action invokes `cat` through `run_shell`. The action does not declare `cat`, and a Windows-hosted Bazel invocation cannot use that action reliably when the selected execution platform is Linux. Run the existing `exe_zip_maker` through `actions_run` instead. This selects the helper and Python runtime from the execution configuration, preserves the prelude-plus-zip output format, and removes the ambient shell utility dependency. A news entry documents the fix. The Bazel integration that motivated this fix is [bazelbuild/bazel#30121](bazelbuild/bazel#30121). --------- Co-authored-by: Richard Levasseur <richardlev@gmail.com> (cherry picked from commit 1d99f70) Work towards #3867
copybara-service Bot
pushed a commit
that referenced
this pull request
Jul 10, 2026
## Summary Replace the `builtins_bzl.zip` shell `genrule` with a dedicated `builtins_zip` Starlark rule. This focused change is extracted from [#30121](#30121) for independent review. ## Motivation The existing `genrule` discovers its source root with shell commands and invokes `zip_builtins.sh`, which depends on shell path handling. `builtins_zip` declares the zipper tool and source inputs directly, preserving the `builtins_bzl/<relative path>` archive layout without shell path handling. ## Build API Changes No. ## Validation - `buildifier -mode=check src/main/starlark/builtins_bzl/BUILD src/builtins_zip.bzl` - `bazel build --jobs=2 //src/main/starlark/builtins_bzl:builtins_bzl_zip` - compared `unzip -Z1` output to the sorted `**/*.bzl` source list; entries matched exactly - `bazel aquery` confirmed `_zipper` is an execution-configured declared tool and all archive mappings are correct ## Release Notes RELNOTES: None Closes #30123. PiperOrigin-RevId: 945822546 Change-Id: I493f53dcd6422cb52300cb859d92c1d498534b41
dzbarsky
force-pushed
the
zbarsky/windows
branch
7 times, most recently
from
August 6, 2026 05:11
105826d to
f1ea28d
Compare
dzbarsky
force-pushed
the
zbarsky/windows
branch
from
August 13, 2026 20:59
f1ea28d to
7bbb0ac
Compare
dzbarsky
force-pushed
the
zbarsky/windows
branch
2 times, most recently
from
August 17, 2026 04:19
58c7505 to
4b008e5
Compare
dzbarsky
force-pushed
the
zbarsky/windows
branch
from
August 17, 2026 04:43
4b008e5 to
34983c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
A Bazel invocation hosted on Windows could select Linux remote execution but still pass Windows host paths to actions, launch Unix scripts as Windows executables, or depend on undeclared Unix utilities. These failures prevented
//src:bazelfrom building reliably and broke automatic XML generation for remotely executed shell tests that did not writejunit.xml.Build API Changes
No.
Validation
git diff --check origin/master...HEADpython3 -m json.tool MODULE.bazel.lockpython3 -m json.tool maven_install.jsonwindows-remote-exec.ymlworkflow exercises the original Windows-host/Linux-execution failure mode in CIThe
rules_pythonexecutable-zip fix is also proposed upstream inbazel-contrib/rules_python#3890.
Release Notes
RELNOTES: None