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

Changing the PATH changes the tar command used by the cache #642

Open
dhadka opened this issue Nov 18, 2020 · 0 comments
Open

Changing the PATH changes the tar command used by the cache #642

dhadka opened this issue Nov 18, 2020 · 0 comments
Labels
bug Something isn't working cache

Comments

@dhadka
Copy link
Member

dhadka commented Nov 18, 2020

In actions/cache#465, the user's workflow was modifying the PATH while installing some custom software. This changed the tar implementation found when searching the PATH because it added C:/Program Files/Git/usr/bin. This broke caching since the cache action expected to use "BSD tar with GZip" during the restore step but would save the cache using "GNU tar with Zstd".

There is already work underway to always use GNU tar (when available), but even this could potentially run into issues if:

  1. The user modifies the PATH env var and removes all tar implementations
  2. The system starts without GNU tar but the user installs it in a subsequent step.

It therefore seems like we need the cache to "lock onto" a particular version of tar. My thinking is to record the tar implementation in the state which can then be used in the post step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cache
Projects
None yet
Development

No branches or pull requests

2 participants
@dhadka and others