Skip to content

Remote execution from windows host to linux executor #19587

@UebelAndre

Description

@UebelAndre

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)area-WindowsWindows-specific issues and feature requeststeam-Remote-ExecIssues and PRs for the Execution (Remote) teamtype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions