cache icon indicating copy to clipboard operation
cache copied to clipboard

Restore does not fall back to gzip if zstd is present

Open luk-lo opened this issue 6 months ago • 3 comments

When actions/cache/restore detects the presence of zstd on the path, it uses that to calculate the cache version it looks for. This leads to cache misses when the only available cache was created without zstd present.

In this case, the restore action should calculate the version again for gzip compression and try getting a cache with that version. When restore can handle both gzip and zstd compression, it should not limit the restorable cache version to only zstd.

luk-lo avatar Jun 05 '25 15:06 luk-lo

@luk-lo same on our end, but you can try this workaround: apt-get update apt-get -y remove zstd

k-madejski avatar Jun 20 '25 10:06 k-madejski

I don't think issuing an apt-get will work on Windows where all runner images also have zstd, except for the new arm runners. ;-)

Vampire avatar Jul 02 '25 22:07 Vampire

The issue basically is a duplicate of https://github.com/actions/toolkit/issues/543 which I requested years ago already and that was rejected. :-(

Vampire avatar Jul 02 '25 22:07 Vampire