-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Ensure PATH to shims are absolute for the protobuf buf linter. #17367
Conversation
@@ -98,7 +99,7 @@ async def run_buf_format( | |||
output_files=request.files, | |||
description=f"Run buf format on {pluralize(len(request.files), 'file')}.", | |||
level=LogLevel.DEBUG, | |||
env={"PATH": binary_shims.bin_directory}, | |||
env={"PATH": os.path.join("{chroot}", binary_shims.bin_directory)}, |
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.
This won't work with remote execution without a wrapper script. (This is a general problem of {chroot}
not specific to buf
.)
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.
🤔
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.
Coincidentally, this should be solvable in remote execution once #17290 lands because that adds a wrapper script for remote execution to support append-only caches in the remote environment. Then solving the PATH
issue is just a matter of adding the additional shell code to substitute in the remote executor's input root path.
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.
PATH=${PATH//\{chroot\}/$(pwd)}
… `DirectoryDigest` (#17370) Modify `make_execute_request` to be async, take a `Store` as a parameter, and to return the input root to use. This is prework for #17290 which needs the ability to make a new input root digest if a wrapper script needs to be added to the input root. (It will also be useful for other wrapper script applications, such as to solve the issue at #17367 (comment) for remote execution.)
Fixes #17363