Skip to content
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

Should @local_config_platform//:host be marked no-remote-exec (or maybe even no-remote)? #22777

Open
EdSchouten opened this issue Jun 18, 2024 · 0 comments

Comments

@EdSchouten
Copy link
Contributor

EdSchouten commented Jun 18, 2024

Description of the feature request:

As of #22363, we have testing coverage in place for ensuring platforms as a whole can be marked no-remote-exec. This raises the question: should the default host platform be marked as such?

Think of it like this: the default host platform does not have any remote execution platform properties set up. This means that if such a platform were to be used for remote execution, it would likely just result in an error indicating that no workers exist having the empty set of platform properties. By marking it as no-remote-exec, we're essentially forcing the user to declare its own platform that has the right properties set.

Maybe we should even consider marking it no-remote. If a remote cache is shared between users running different operating systems, it isn't safe to upload actions that don't have platform properties set. But maybe that complicates the onboarding experience.

Which category does this issue belong to?

No response

What underlying problem are you trying to solve with this feature?

I've got a simple remote execution cluster that only has Linux workers, which I want to use from my Mac to speed up builds where possible. However, there are some actions that only run on macOS, which I want to run locally. So I declare two platforms:

platform(
    name = "remote_linux",
    constraint_values = [
        "@platforms//cpu:x86_64",
        "@platforms//os:linux",
    ],
    exec_properties = { ... },
)

platform(
    name = "local_fallback",
    exec_properties = {"no-remote-exec": "true"},
    parents = ["@local_config_platform//:host"],
)

And then call Bazel with --extra_execution_platforms=//:remote_linux,//:local_fallback. If @local_config_platform//:host itself were marked no-remote-exec, I could get rid of that second platform declaration.

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

7.x

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 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

@sgowroji sgowroji added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Jun 18, 2024
@tjgq tjgq added team-Configurability Issues for Configurability team and removed team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants