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

Allow overriding Buf version in PATH #72

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Allow overriding Buf version in PATH #72

merged 1 commit into from
Oct 9, 2024

Conversation

emcfarlane
Copy link
Collaborator

This avoids requiring the version of Buf found in the PATH to match the resolved. Fallback to installing a new explicit version in the toolcache.

Fixes #71

This avoids requiring the version of Buf found in the PATH to match the
resolved. Fallsback to installing the specified in the toolcache.

This comment has been minimized.

@emcfarlane emcfarlane requested a review from paul-sachs October 8, 2024 16:48
@emcfarlane emcfarlane merged commit 4a2a5f7 into main Oct 9, 2024
37 checks passed
@emcfarlane emcfarlane deleted the ed/pathOverride branch October 9, 2024 14:46
@emcfarlane emcfarlane mentioned this pull request Oct 9, 2024
@nicksnyder
Copy link
Member

Does this mean a second install overwrites the first install? Is this going to solve the problem for the user or do we need to be stamping the version number in the binary name so we can have multiple binaries installed at once?

@emcfarlane
Copy link
Collaborator Author

@nicksnyder adding more binaries to the tool cache is stored by version/arch (see the cachePath). So installing multiple will work as intended. The current environment PATH will always be updated by prepending the latest installed. So buf will resolve to the first version found in the PATH. Node installs in this way and adds the binary to the path (see the function setupNodeJs in the node action).

For the users issue, they will install multiple versions of buf extending the PATH environment for the current run. On a new instantiation of a worker, the PATH will not include the toolcache location of the multiple buf versions. The action, buf-action, will then resolve the version found in the toolcache and add that to the PATH. This cache is the speed benefit the user was requesting support for.

@nicksnyder
Copy link
Member

Cool, thanks for clarifying

emcfarlane added a commit that referenced this pull request Oct 9, 2024
Prepare a new release to add fix for #72 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to cache more than one version of buf
3 participants