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

Hardlink sandbox for Mac OS #24157

Open
matthewjh opened this issue Oct 31, 2024 · 1 comment
Open

Hardlink sandbox for Mac OS #24157

matthewjh opened this issue Oct 31, 2024 · 1 comment
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Local-Exec Issues and PRs for the Execution (Local) team type: feature request

Comments

@matthewjh
Copy link

matthewjh commented Oct 31, 2024

Description of the feature request:

The hardlink sandbox, toggled via experimental_use_hermetic_linux_sandbox, is a step forward in ensuring the hemeticity of build actions and tests as tools are no longer able to "accidentally" follow symlinks out of the sandbox to pick up files outside of the source set specified. This also means tools don't have to be hacked, patched, or reconfigured in error-prone and unsound ways to respect Bazel's sandbox.

It would be great to extend this feature beyond Linux to MacOS. In our case, all our developers use Macs whereas our CI uses Linux. It is unfortunate that, due to the lack of hardlink sandbox on the former, the development environment behaves differently - in both subtle and significant ways - to the CI.

Which category does this issue belong to?

No response

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

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

@matthewjh matthewjh changed the title Hardlink sandbox for Max OS Hardlink sandbox for Mac OS Oct 31, 2024
@brentleyjones
Copy link
Contributor

When using hardlinks on macOS (which the sandboxfs implementation did at one point), you can run into issues of Gatekeeper randomly killing your process: https://developer.apple.com/forums/thread/663456 and https://jmmv.dev/2020/01/osxfuse-hardlinks-dladdr.html

@iancha1992 iancha1992 added the team-Local-Exec Issues and PRs for the Execution (Local) team label Oct 31, 2024
@tjgq tjgq added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Local-Exec Issues and PRs for the Execution (Local) team type: feature request
Projects
None yet
Development

No branches or pull requests

7 participants