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

Fix zstd version parsing [cache] #1345

Closed
wants to merge 2 commits into from
Closed

Fix zstd version parsing [cache] #1345

wants to merge 2 commits into from

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Feb 18, 2023

zstd 1.5.4 changed the --version output which broke the version parsing and subsequent cache restores across different OS versions (e.g. ubuntu-20.04 and ubuntu-22.04 as those use different zstd versions). facebook/zstd@9c93dd7

-*** zstd command line interface 64-bits v1.5.2, by Yann Collet ***
+*** Zstandard CLI (64-bit) v1.5.4, by Yann Collet ***

Use --quiet option to output machine readable version.
https://www.mankier.com/1/zstd#Options-Operation_Modifiers

Closes #1341
Closes actions/cache#1110
Closes actions/cache#1112

@lvpx
Copy link
Contributor

lvpx commented Feb 20, 2023

@cdce8p appreciate your PR for fixing this. However, I found the current semver version check is redundant as version is null. Please see here. So for all zstd command line strings, we are just calling ZstdWithoutLong. For now I've raised this PR to fix the issue introduced by zstd version change. I'll followup with enabling zstd --long in an upcoming release PR. For this reason closing your PR here. Appreciate the effort and also incorporated --quiet taking after your PR.

@lvpx lvpx closed this Feb 20, 2023
@cdce8p cdce8p deleted the fix-cache-zstd-version-parsing branch February 20, 2023 14:48
@cdce8p
Copy link
Contributor Author

cdce8p commented Feb 20, 2023

Thanks for picking this up @pdotl!

However, I found the current semver version check is redundant as version is null. Please see here. So for all zstd command line strings, we are just calling ZstdWithoutLong.

Yeah, noticed that as well as I was testing my fix. Turned out that zstd --long didn't even work on the ubuntu runners after the version parsing was fixed. The commands needed to be string escaped '"unzstd --long=30"' / '"zstdmt --long=30"'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants