bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.21k stars 4.06k forks source link

Get rid of implicit fallback from sandbox to local execution #16522

Open larsrc-google opened 2 years ago

larsrc-google commented 2 years ago

Description of the bug:

Bazel has a legacy feature where local sandboxed execution can silently fall back to non-sandboxed if an action can't be run in a sandbox. This is a legacy behaviour that should now instead be controlled with setting strategies. This behaviour is currently enabled through the --incompatible_legacy_local_fallback. This flag defaults to true (old behaviour) and will be flipped to false in an upcoming release (probably 7.0). After that, the old code will be removed.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

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

larsrc-google commented 2 years ago

The old behavior has effectively quietly made dynamic_local_strategy default to worker,sandboxed,standalone, because anything that didn't support sandboxing would then do standalone instead. I'll make that explicit before I can flip the flag.

larsrc-google commented 2 years ago

On second thought, changing dynamic_local_strategy might be worse - without local lockfree, it would block the remote when it rather than just leave it to remote-only. That would be a subtle performance regression. Once we get local lockfree to be the standard, we can reasonably revisit the defaults.

github-actions[bot] commented 1 month ago

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.