-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
bazel: disable sandboxing for local development #79785
Comments
Will this be worth it though? One of the nice benefits of Bazel is that it uses a canned build environment, which is managed and deterministic, such that engineers/dev-inf don't have to wrangle with build env problems. I think this would save a non-trivial amount of engineering time. Then again, maybe we could make it configurable. PS: not a big deal for me personally, since I build on a Linux gceworker. Of course, the one time when I did have to build on macOS, it failed precisely because I never build on macOS so my build env isn't maintained. But I think it's worth considering. |
It's worth understanding what build env problems actually arise when disabling sandboxing. The measured overhead I've seen is easily >10% of build time, which adds up. It'll be easy to re-enable sandboxing of course, just a matter of |
Well, anecdotally it takes e.g. new hires a day to get their first CRDB build. Pretty sweet if they could just do a |
My understanding of disabled-sandboxing-mode is that we can still specify exactly what compilers/toolchains to use, and |
Ah, I misunderstood then -- my bad. Thanks for clarifying! |
We have marked this issue as stale because it has been inactive for |
Is your feature request related to a problem? Please describe.
Sandboxing on MacOS have measurable overhead, we bazelbuild/bazel#8230; it comes from
symlinks being much slower to create.
Describe the solution you'd like
Disabling sandboxing for local development (still enabling it for CI). It should help speed up bazel builds noticeably.
Describe alternatives you've considered
Rolling out
sandboxfs
from https://bazel.build/docs/sandboxing, but that seems a lot more experimental and harder to manage.Additional context
An earlier attempt to disable sandboxing (#79360) was reverted (#79577) after running into opaque build errors. The current theory is that it's due to misconfigured toolchains (see internal chat). I don't think it applies on the M1s; I've been running without sandboxing for weeks now and saw no issues (
build --spawn_strategy=local --strategy=Genrule=sandboxed --strategy_regexp='Action pkg/ui'=sandboxed
in my.bazelrc.user
).Epic CRDB-8036
Jira issue: CRDB-15915
Epic CRDB-17171
The text was updated successfully, but these errors were encountered: