Add support for no-local execution requirement
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
I saw "no-local" as an execution requirement here:
https://github.com/bazelbuild/bazel/blob/3be81016f463d7a19cef5f00fee89efdd887c1b6/src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java#L243
But I was told that this is only for the internal Blaze, not Bazel. Can we have support for "no-local" in Bazel as well?
### Which category does this issue belong to?
_No response_
### What underlying problem are you trying to solve with this feature?
Similar to "no-remote" or "no-sandbox", sometimes I need to ensure an action to be ALWAYS executed with some level of isolation. For me, this means this particular action can use process-wrapper, linux-sandbox, or RBE. This particular action writes to the source tree, so it can't use the local strategy to avoid it to actually write to the source tree.
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
8.3.1
### 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` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
https://github.com/bazelbuild/bazel/blob/3be81016f463d7a19cef5f00fee89efdd887c1b6/src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java#L243
Contributor guide
Research direction
Start with src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java at the referenced no-local entry, then trace how execution requirements select strategies. Compare the existing no-remote and no-sandbox behavior and find their tests; done means Bazel recognizes no-local and prevents the local strategy while allowing the isolated strategies described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100