Remote execution from windows host to linux executor
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
I would like windows users to be able to build and test changes on linux via remote execution. The desired workflow is that there's a `remote` config in the repository `.bazelrc` file that provides all the necessary flags to enable remote execution and describe that the desired execution and target platforms are linux (despite the client being on windows).
### Which category does this issue belong to?
_No response_
### What underlying problem are you trying to solve with this feature?
Large organizations that have a primarily linux software stack but have less-technical contributors that run on windows should be able to use Bazel to empower people to to work on the machine they're familiar with and run tests in a remote execution cluster on a supported platform.
I tried setting this up myself and I ran into the following before concluding that supporting this was not something I could do with any changes to my repository and that Bazel would need to be updated to support this:
1. `bazel_tools` is platform specific. When I run on windows, I get a `bazel_tools` repository that has a ton of `.exe` files in it and is missing files needed for linux
2. In `bazel_tools` there's some old reliance on `--host_cpu` that seems to select windows branches. These should simply be `@platform` targets.
3. Bazel assumes if the client is windows that the java runtime must be `bin/java.exe`. This is wrong and the execution should instead be checked. https://github.com/bazelbuild/bazel/blob/6.3.2/src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntime.java#L46 is likely the root cause.
### Which operating system are you running Bazel on?
windows, macos
### What is the output of `bazel info release`?
6.3.2
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start with src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntime.java and the platform-specific bazel_tools behavior described in the issue. Trace how a Windows client selects host and execution platforms and how a repository .bazelrc could provide the remote-execution flags; done means Windows users can build and test against Linux execution and target platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, distributed-systems, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100