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

remoting: support {chroot} in remote execution context #17519

Closed
tdyas opened this issue Nov 9, 2022 · 1 comment · Fixed by #21810
Closed

remoting: support {chroot} in remote execution context #17519

tdyas opened this issue Nov 9, 2022 · 1 comment · Fixed by #21810

Comments

@tdyas
Copy link
Contributor

tdyas commented Nov 9, 2022

The Pants local and Docker command runners support substituting the string {chroot} in an argument or environment variable with the absolute path of the execution sandbox. This is done via the apply_chroot function.

Pants should support the same substitution in remote execution as well. This will require use of a wrapper script since the remote execution environment's paths will not be known until the build action is actually invoked. A wrapper script for other purposes (append-only caches) was added by #17290 and thus it should be relatively straightforward to do this substitution.

@tdyas
Copy link
Contributor Author

tdyas commented Dec 30, 2024

Partial solution in #21803 for program arguments.

tdyas added a commit that referenced this issue Dec 31, 2024
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.
tdyas added a commit that referenced this issue Jan 3, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant