-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[sandbox] Run sandbox from common execroot #8849
Conversation
/cc @laszlocsomor I have ported one integration test, will send it in another PR later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future readers' sake, please add more information to the PR description about the motivation.
src/main/java/com/google/devtools/build/lib/sandbox/AbstractSandboxSpawnRunner.java
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/sandbox/DummySandboxedSpawn.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/sandbox/DummySandboxedSpawn.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/sandbox/DummySandboxedSpawn.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/sandbox/WindowsSandboxedSpawnRunner.java
Outdated
Show resolved
Hide resolved
I have added PR description, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Thanks!
Make sandboxed process run under main execroot instead of unique sandboxed execroot. This way, we do not need to copy/symlink input files before execution and clean up sandbox base after execution. Summary of how it works: - `windows-sandbox` blocks all file access under current directory (main execroot). - Declared input paths will be marked readable. - Declared output paths will be marked writable. - If sandboxed process tries to open file for read/write when the path is not marked with that permission, the operation will fail (e.g. `fopen` will return `nullptr`). Closes bazelbuild#8849. PiperOrigin-RevId: 257408096
Make sandboxed process run under main execroot instead of unique sandboxed execroot. This way, we do not need to copy/symlink input files before execution and clean up sandbox base after execution.
Summary of how it works:
windows-sandbox
blocks all file access under current directory (main execroot).fopen
will returnnullptr
).