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

Hotfix Zstd breaking due to version change in runners #1353

Merged
merged 16 commits into from Feb 20, 2023
Merged

Conversation

lvpx
Copy link
Contributor

@lvpx lvpx commented Feb 20, 2023

Summary

Currently zstd check is dependent on the text output of the zstd --version to include zstd command line interface. This text changed to *** Zstandard CLI (64-bit) v1.5.4, by Yann Collet *** breaking the check and @actions/cache always falling back to gzip compression.

Implementation

  • Set to use gzip if the version output string is empty which should be the case if zstd is not installed.
  • Introduced --quiet flag to zstd so moving on the zstd --version should output machine readable version parsable via SemVer instead of text.
  • Removed code that checks for version less than 1.3.2 as it was not working. Now we default to using zstd without --long as that is what currently happens.

Next Steps

Will have another PR that fixes use of zstd with --long as intended. This release should unblock zstd usage.

Issues

Fixes #1341

@lvpx lvpx requested a review from a team as a code owner February 20, 2023 13:13
…rking. Defaulting to zstd without long as that is what is always happening currently.
@lvpx lvpx requested a review from a team as a code owner February 20, 2023 13:44
@bishal-pdMSFT
Copy link
Contributor

Checks are failing. Please fix the unit tests.

try {
await exec.exec(`${app} --version`, [], {
await exec.exec(`${app}`, additionalArgs, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @pdotl!

Just saw this while looking at the PR. '${app}' seems a bit redundant. The first argument should be a string and app is already one. Maybe you can fix that when you address the zstd --long issue. It would be a bit much to open a separate PR for it 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure @cdce8p will take this up in the next PR.

Copy link
Contributor

@Phantsure Phantsure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to remove --long check entirely. --quiet would supress warnings but not clear how that would help in semver readable text

@cdce8p
Copy link
Contributor

cdce8p commented Feb 21, 2023

--quiet would supress warnings but not clear how that would help in semver readable text

Found this in the documentation for zstd

V, --version: display version number and exit. Advanced : -vV also displays supported formats. -vvV also displays POSIX support. -q will only display the version number, suitable for machine reading.

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

Successfully merging this pull request may close these issues.

cacheUtils.getCompressionMethod broke with zstd 1.5.4
4 participants