Should @local_config_platform//:host be marked no-remote-exec (or maybe even no-remote)?
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### 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:
```python
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_
Contributor guide
Assessment
This issue has not been assessed yet.