Changing the PATH changes the `tar` command used by the cache
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
In https://github.com/actions/cache/issues/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:
- The user modifies the PATH env var and removes all
tarimplementations - The system starts without
GNU tarbut 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the cache implementation that performs the restore and post steps, then read how it discovers tar and persists state between those steps. Reproduce the PATH changes described in the issue and verify that restore and save use the same tar implementation, including when tar is unavailable or installed later.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100