-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
support {chroot}
for program arguments in remote execution
#21803
Conversation
Some(_) => "/bin/bash", // the array features need bash and not just plain old /bin/sh | ||
_ => "/bin/sh", |
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.
These paths (and others) ideally would be discovered in the remote execution environment, but the REAPI client is what runs those programs in the remote execution environment in the first place. Maybe we should make these configurable in the future?
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.
Or an alternate solution like download BusyBox and use its ash
shell (possibly only if array variables are supported).
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.
Hm, interesting approach. Definitely seems expedient.
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.
Looks good, comments are minor; only the release notes one needs adjustment before merging, the other is optional.
Some(_) => "/bin/bash", // the array features need bash and not just plain old /bin/sh | ||
_ => "/bin/sh", |
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.
Hm, interesting approach. Definitely seems expedient.
…ution (#21810) As described in #17519, remote execution environments did not substitute the `{chroot}` marker with the path to the execution sandbox as is done with local and Docker environments. #21803 added this support for program arguments. This PR completes the feature and implements that support for environment variables. Closes #17519.
As reported in #17519, remote environments do not currently support the
{chroot}
replacement marker supported by the local and Docker environments. With local and Docker environments, Pants will replace any{chroot}
marker with the absolute path of the sandbox directory if it appears in a program argument or environment variable.This PR is a partial solution and implements
{chroot}
replacement for prorgram arguments used in remote execution. It by extends the existing wrapper script used for append-only caches to also support{chroot}
replacements.This PR does not try to implement
{chroot}
replacement for environment variables. That will need to come after I figure out a good way to do that.