Skip to content

cache.saveCache fails for ubuntu-16.04 with zstd enabled #462

Closed

Description

@svartalf

Describe the bug

cache.saveCache does not work for ubuntu-16.04 runner, because of the wrong arguments passed to zstd CLI utility.

To Reproduce

ubuntu-16.04 log:

##[debug]Checking zstd --version
##[debug]*** zstd command line interface 64-bits v1.3.1, by Yann Collet ***
##[debug]Reserving Cache
##[debug]Resource Url: https://artifactcache.actions.githubusercontent.com/AaeRKueYTJn4WPKwvkhaJ6oa7IeFHpBzq8k8zgGOgH0PDfVyFw/_apis/artifactcache/caches
##[debug]Cache ID: 31
##[debug]implicitDescendants 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/install/install/target/actions-rs-install/sccache'
##[debug]Matched: target/actions-rs-install/sccache
##[debug]Cache Paths:
##[debug]["target/actions-rs-install/sccache"]
##[debug]Archive Path: /home/runner/work/_temp/fa26d111-0ed0-4633-8777-669233bfbd28/cache.tzst
/bin/tar --use-compress-program zstd -T0 --long=30 -cf cache.tzst -P -C /home/runner/work/install/install --files-from manifest.txt
Incorrect parameters
Usage : 
      zstd [args] [FILE(s)] [-o file] 

FILE    : a filename 
          with no FILE, or when FILE is - , read standard input
Arguments : 
 -#     : # compression level (1-19, default:3) 
 -d     : decompression 
 -D file: use `file` as Dictionary 
 -o file: result stored into `file` (only if 1 input file) 
 -f     : overwrite output without prompting and (de)compress links 
--rm    : remove source file(s) after successful de/compression 
 -k     : preserve source file(s) (default) 
 -h/-H  : display help/long help and exit 
##[error]Tar failed with error: The process '/bin/tar' failed with exit code null

Expected behavior

Same code on ubuntu-18.04:

##[debug]Checking zstd --version
##[debug]*** zstd command line interface 64-bits v1.3.3, by Yann Collet ***
##[debug]Reserving Cache
##[debug]Resource Url: https://artifactcache.actions.githubusercontent.com/AaeRKueYTJn4WPKwvkhaJ6oa7IeFHpBzq8k8zgGOgH0PDfVyFw/_apis/artifactcache/caches
##[debug]Cache ID: 32
##[debug]implicitDescendants 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/install/install/target/actions-rs-install/sccache'
##[debug]Matched: target/actions-rs-install/sccache
##[debug]Cache Paths:
##[debug]["target/actions-rs-install/sccache"]
##[debug]Archive Path: /home/runner/work/_temp/064d6c69-5401-4e98-a09d-c7c60d2e53c6/cache.tzst
/bin/tar --use-compress-program zstd -T0 --long=30 -cf cache.tzst -P -C /home/runner/work/install/install --files-from manifest.txt
##[debug]File Size: 4829269
##[debug]Saving Cache (ID: 32)
##[debug]Upload cache

Additional context

Cache library version:

"@actions/cache": "^0.1.0"

Activity

  1. svartalf commented on May 17, 2020

    @svartalf
    Author

    I'm also having similar issue with windows-2019 OS, but instead of failing with an error about incorrect arguments it just hangs:

    2020-05-17T08:26:46.1223602Z ##[debug]Checking zstd --version
    2020-05-17T08:26:46.2315010Z ##[debug]*** zstd command line interface 64-bits v1.4.0, by Yann Collet ***
    2020-05-17T08:26:46.2315970Z ##[debug]Reserving Cache
    2020-05-17T08:26:46.2321197Z ##[debug]Resource Url: https://artifactcache.actions.githubusercontent.com/AaeRKueYTJn4WPKwvkhaJ6oa7IeFHpBzq8k8zgGOgH0PDfVyFw/_apis/artifactcache/caches
    2020-05-17T08:26:46.3033414Z ##[debug]Cache ID: 40
    2020-05-17T08:26:46.3065476Z ##[debug]implicitDescendants 'false'
    2020-05-17T08:26:46.3103900Z ##[debug]followSymbolicLinks 'true'
    2020-05-17T08:26:46.3104473Z ##[debug]implicitDescendants 'false'
    2020-05-17T08:26:46.3106684Z ##[debug]omitBrokenSymbolicLinks 'true'
    2020-05-17T08:26:46.3107021Z ##[debug]Search path 'd:\a\install\install\target\actions-rs-install\sccache'
    2020-05-17T08:26:46.3221366Z ##[debug]Matched: target\actions-rs-install\sccache
    2020-05-17T08:26:46.3225917Z ##[debug]Cache Paths:
    2020-05-17T08:26:46.3231206Z ##[debug]["target\\actions-rs-install\\sccache"]
    2020-05-17T08:26:46.3249163Z ##[debug]Archive Path: d:\a\_temp\1ca9f5a4-71ad-49d8-baeb-b74f4eb5344c\cache.tzst
    2020-05-17T08:26:46.3270773Z [command]C:\windows\System32\tar.exe --use-compress-program "zstd -T0 --long=30" -cf cache.tzst -P -C d:/a/install/install --files-from manifest.txt
    2020-05-17T09:10:40.0505540Z ##[debug]Re-evaluate condition on job cancellation for step: 'Install sccache'.
    2020-05-17T09:10:40.1100951Z ##[error]The operation was canceled.
    2020-05-17T09:10:40.1110220Z ##[debug]System.OperationCanceledException: The operation was canceled.
    2020-05-17T09:10:40.1110402Z ##[debug]   at System.Threading.CancellationToken.ThrowOperationCanceledException()
    2020-05-17T09:10:40.1110617Z ##[debug]   at GitHub.Runner.Sdk.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
    2020-05-17T09:10:40.1110906Z ##[debug]   at GitHub.Runner.Common.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
    2020-05-17T09:10:40.1111142Z ##[debug]   at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
    2020-05-17T09:10:40.1111334Z ##[debug]   at GitHub.Runner.Worker.Handlers.NodeScriptActionHandler.RunAsync(ActionRunStage stage)
    2020-05-17T09:10:40.1111482Z ##[debug]   at GitHub.Runner.Worker.ActionRunner.RunAsync()
    2020-05-17T09:10:40.1111638Z ##[debug]   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
    

    Note the timestamps, I cancelled the workflow after waiting for ~50 minutes.

  2. joshmgross commented on May 18, 2020

    @joshmgross
    Contributor

    We have actions/cache#316 and actions/cache#301 tracking these issues.

  3. aiqiaoy commented on May 18, 2020

    @aiqiaoy
    Contributor

    For the ubuntu 16.04 issue: actions/cache#316 (comment)

  4. self-assigned this
    on May 18, 2020
  5. aiqiaoy commented on May 19, 2020

    @aiqiaoy
    Contributor

    @svartalf Fix is in master. I'm gonna release a 0.2.0 later today.

  6. aiqiaoy commented on May 20, 2020

    @aiqiaoy
    Contributor

    @svartalf 0.2.1 is released with the actual fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions