cache icon indicating copy to clipboard operation
cache copied to clipboard

zstd is required for cache restore (cache miss on Windows and on self-hosted runners)

Open rfay opened this issue 4 years ago • 3 comments

In v2, zstd is required for a cache restore.

That means that all self-hosted runners that don't have zstd installed will simply give a cache miss on trying to restore. No explanation.

There are a number of issues here:

  1. Since zstd is required, fail on cache restore if zstd is not found.
  2. Since gnu tar is required (apparently) to use zstd, fail if gnu tar is not found.
  3. Add the requirement of zstd to the README
  4. Don't output that it's a cache miss when it's not at all a cache miss but rather an inability to untar it.

rfay avatar May 06 '21 13:05 rfay

Requirement of posix compliant tar is in README. Would that not include zstd automatically? If not, then let me add that.

Phantsure avatar Apr 25 '22 07:04 Phantsure

Posix compliant tar doesn't mean that you've installed the zstd libraries - this is a separate package usually called zstd on Ubuntu and CentOS based distros.

sammcj avatar May 11 '22 04:05 sammcj

Since I had to go through this entire process again with a new runner, I added these notes to the GitHub Workflow:

This Windows self-hosted runner has to be set up with gnu tar and zstd.exe, or this step will fail to properly create the cache. Make sure gnu tar is the tar used here. System PATH should have C:\program files\gnu\usr\bin near top Get zstd.exe from https://github.com/facebook/zstd/releases - I put it into C:\program files\gnu\usr\bin so it would be in PATH See https://github.com/actions/cache/issues/580 Run the Windows action with debug enabled to be able to see which tar is in use, etc.

rfay avatar Jun 24 '22 18:06 rfay

👋 @rfay, We have added the zstd requirement to documentation when using self-hosted runners here. Closing this issue. Feel free to reopen if you have followup questions.

lvpx avatar Sep 07 '22 12:09 lvpx