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

Ensure PATH to shims are absolute for the protobuf buf linter. #17367

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

kaos
Copy link
Member

@kaos kaos commented Oct 27, 2022

Fixes #17363

@kaos kaos added the category:bugfix Bug fixes for released features label Oct 27, 2022
@kaos kaos requested a review from jyggen October 27, 2022 03:06
@kaos kaos merged commit f9e4c7a into pantsbuild:main Oct 27, 2022
@kaos kaos deleted the issue/17363-buf-shims-path branch October 27, 2022 11:09
@@ -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)},
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Contributor

@tdyas tdyas Oct 27, 2022

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATH=${PATH//\{chroot\}/$(pwd)}

tdyas pushed a commit that referenced this pull request Oct 27, 2022
… `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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buf 1.9 isn't compatible with the buf backend
4 participants