falcondev-oss / github-actions-cache-server

Self-hosted GitHub Actions cache server implementation. Compatible with official 'actions/cache' action
https://gha-cache-server.falcondev.io
MIT License
92 stars 4 forks source link

zstd unsupported format #35

Closed gvisca closed 2 months ago

gvisca commented 2 months ago

Hi,

First of all, thanks a lot for this project !

I deployed the docker image in kubernetes and patched the github runner dll as per the documentation but I have an error when downloading the cache.

Cache Size: ~301 MB (315428937 B)
/usr/bin/tar -xf /home/runner/_work/_temp/75d19c53-1f9f-4482-aee3-cd7d4ade5818/cache.tzst -P -C /home/runner/_work/web/web --use-compress-program unzstd
zstd: /*stdin*\: unsupported format 
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error is not recoverable: exiting now
Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
Cache not found for input keys: playwright-browsers-9079783247, playwright-browsers

The upload part works as expected as I have the file in the filesystem

❯ kex pod/gha-cache-server-0 sh
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
/app # ls /data/storage
playwright-browsers-9076986797-d8627df57661357140bbbad1d1d71386c9dec3b5c1683317e77baa9b197cb839

I also tried Minio as backend but I have the same error. Would you have any idea of what could be wrong ?

Thanks a lot

Tycale commented 2 months ago

Hi,

I was just about to create the exact same issue but with gzip.. !

gzip: stdin: not in gzip format
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error is not recoverable: exiting now

Downgrading to version 2.0.0 solved the issue on my side. I deleted the volumes to be sure.

Best regards,

gvisca commented 2 months ago

Same here, downgrading to 2.0.0 made the trick !

Run actions/cache@v4

Cache Size: ~301 MB (315210019 B)
/usr/bin/tar -xf /home/runner/_work/_temp/e4ba19e3-7aa2-420d-bdff-ac275c99090e/cache.tzst -P -C /home/runner/_work/web/web --use-compress-program unzstd
Cache restored successfully
Cache restored from key: playwright-browsers-9081918794

I made some tests with the latest version and it works for smaller files but not for 300MB file

Thanks @Tycale

LouisHaftmann commented 2 months ago

Thanks for reporting this issue! I'll take a look.

LouisHaftmann commented 2 months ago

Should be fixed in version v2.1.2

Tycale commented 2 months ago

Thanks for this fix/release, I will try tomorrow ! 👍🏻

gvisca commented 2 months ago

Thanks @LouisHaftmann it works like a charm