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

setup-node can't use zstd compression in Ubuntu 22.04 runners #800

Closed
2 of 5 tasks
bateleurX opened this issue Jul 7, 2023 · 5 comments · Fixed by #804
Closed
2 of 5 tasks

setup-node can't use zstd compression in Ubuntu 22.04 runners #800

bateleurX opened this issue Jul 7, 2023 · 5 comments · Fixed by #804
Assignees
Labels
bug Something isn't working

Comments

@bateleurX
Copy link

Description:
setup-node can't manipulate zstd cache archives in Ubuntu 22.04 runners.
actions/cache ver 3.0.4 that is used by setup-node has a bug(actions/toolkit#1353) that blocks zstd usage on Ubuntu 22.04 runners.

Update dependent npm package actions/cache to versions >=3.1.4 to use zstd archive in Ubuntu 22.04 runners.

Action version:
v3.7.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
pnpm 8.6.0

Repro steps:
Create pnpm cache with following workflow

runs:
  steps:
    - uses: pnpm/action-setup@v2
    - uses: actions/setup-node@v3
      with:
        node-version-file: '.node-version'
        cache: pnpm
    - run: pnpm install --frozen-lockfile
      shell: bash

Expected behavior:
Cache archive should be compressed in zstd.

Actual behavior:
Cache archive is compressed in gzip.

Post job cleanup.
Post job cleanup.
/usr/bin/tar --posix -z -cf cache.tgz --exclude cache.tgz -P -C /home/runner/work/abcde/abcde --files-from manifest.txt
Cache Size: ~208 MB (217621075 B)
Cache saved successfully
Cache saved with the key: node-cache-Linux-pnpm-1234567890abcdef
Post job cleanup.
Pruning is unnecessary.
@bateleurX bateleurX added bug Something isn't working needs triage labels Jul 7, 2023
@dusan-trickovic
Copy link

Hello, @bateleurX ! Thank you for reporting this issue, we will investigate it and see what can be done :)

@dmitry-shibanov
Copy link
Contributor

Hello @bateleurX. We've merged the pull request with updating toolkit/cache to the latest version. Could you please try to use actions/setup-node@main to confirm that it works as expected ?

@bateleurX
Copy link
Author

Hello @dmitry-shibanov
I tried using actions/setup-node@main and noticed that zstd is used. Thank you for your correspondence!

Post job cleanup.
Post job cleanup.
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/abcde/abcde --files-from manifest.txt --use-compress-program zstdmt
Cache Size: ~209 MB (218734115 B)
Cache saved successfully
Cache saved with the key: node-cache-Linux-pnpm-1234567890abcdef
Post job cleanup.
Pruning is unnecessary.

@dmitry-shibanov
Copy link
Contributor

Thank you for your response @bateleurX. I will keep the issue opened until the new version of setup-node is released.

@dusan-trickovic dusan-trickovic linked a pull request Jul 12, 2023 that will close this issue
2 tasks
@dmitry-shibanov
Copy link
Contributor

dmitry-shibanov commented Aug 15, 2023

Hello @bateleurX. The new version of setup-node was released. For now I'm going to close the issue. If you have any concerns feel free to ping us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants