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

Caching with setup-go slower than latest actions/cache #372

Closed
2 of 5 tasks
pkwarren opened this issue Apr 28, 2023 · 2 comments
Closed
2 of 5 tasks

Caching with setup-go slower than latest actions/cache #372

pkwarren opened this issue Apr 28, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pkwarren
Copy link

Description:
While testing the caching of this action, I found that the actions/setup-go cache performs worse than the same cache created with the latest version of actions/cache. I believe this is due to the fact that the latest actions/cache now uses zstd instead of tgz as the default format.

I believe this is due to actions/setup-go pinning an older version of actions/cache:

"node_modules/@actions/cache": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.0.tgz",

For comparison:

setup-go (1m13s):

C:\Windows\System32\tar.exe --posix -z -cf cache.tgz --exclude cache.tgz -P -C D:/a/buf/buf --files-from manifest.txt

cache (39s):

"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/buf/buf --files-from manifest.txt --force-local --use-compress-program "zstd -T0"

Action version:
Specify the action version: v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
1.20.3

Repro steps:
Create a workflow which both uses the default actions/setup-go cache and an actions/cache step which backup the same paths.

Expected behavior:
Performance should be equivalent for both.

Actual behavior:
Performance of actions/setup-go is much slower.

@pkwarren pkwarren added bug Something isn't working needs triage labels Apr 28, 2023
@dsame
Copy link
Contributor

dsame commented May 2, 2023

Hello @pkwarren, thanks for you input. We wills start to investigate the issue.

@MaksimZhukov
Copy link
Contributor

Hello @pkwarren ! Thank you for sharing this!
We have released a new version of the action (v4.0.1) which includes new version of @actions/cache.
Feel free to contact us if you have any questions!

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

No branches or pull requests

4 participants