Act: cache action is missing zstd

Created on 25 May 2020  ·  7Comments  ·  Source: nektos/act

Hi there

I've the following .actrc

-P ubuntu-latest=nektos/act-environments-ubuntu:18.04

And running the following workflow

name: Tests

on:
  push:
    tags:
      - "*"

jobs:
  tests:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: [3.7]

    steps:
      - uses: actions/checkout@v2

      - name: Cache apt
        uses: actions/cache@master
        with:
          path: /var/cache/apt
          key: ${{ runner.os }}-apt
          restore-keys: |
            ${{ runner.os }}-apt

I've this error

[Tests/tests] ⭐  Run Cache apt
[Tests/tests]   ☁  git clone 'https://github.com/actions/cache' # ref=master
[Tests/tests]   🐳  docker cp src=/home/remy/.cache/act/actions-cache@master dst=/actions/
[Tests/tests]   ❓  ::save-state name=CACHE_KEY,::Linux-apt
[Tests/tests]   💬  ::debug::Resolved Keys:
[Tests/tests]   💬  ::debug::["Linux-apt","Linux-apt"]
[Tests/tests]   💬  ::debug::Checking zstd --version
[Tests/tests]   💬  ::debug::There was an error when attempting to execute the process 'zstd'. This may indicate the process failed to start. Error: spawn zstd ENOENT
[Tests/tests]   💬  ::debug::
[Tests/tests]   💬  ::debug::getCacheEntry - Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache.
[Tests/tests]   💬  ::debug::getCacheEntry - Attempt 2 of 2 failed with error: Cache Service Url not found, unable to restore cache.

I tried adding a step something like "apt install zstd" after enabling universe repo (on my ubuntu 19.10 there's a ztsd package in universe repo), no luck so far.

arerunner metstale

Most helpful comment

Can't we just rebuild the image and add zstd? Or get a 20.04 image with zstd?

All 7 comments

As actions/cache@v2 is the new default, the problems will be more frequent now.

It seems that the zstd binary is simply missing from the docker image. A simple workaround is to install sudo apt install zstd manually:

...
      - name: TEMPORARY act workaround
        run: sudo apt install zstd

      - name: Cache apt
        uses: actions/cache@v2
...

@rgarrigue can you please edit this issue's summary (and your comments) to change ztsd to zstd?

@jsoref here you go

A variation works for me, after initial errors "sudo: command not found" and "unable to locate package zstd"
NOTE: this fixes the "missing zstd" error, but not the related "Cache Service Url not found" issue

    runs-on: ubuntu-latest
    steps:
    - name: TEMPORARY act workaround
      run: apt update && apt install zstd

^I did the same but with -y option for both update and install.

Issue is stale and will be closed in 7 days unless there is new activity

Can't we just rebuild the image and add zstd? Or get a 20.04 image with zstd?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mheap picture mheap  ·  5Comments

seed-of-apricot picture seed-of-apricot  ·  6Comments

kochetkovIT picture kochetkovIT  ·  4Comments

ovitente picture ovitente  ·  6Comments

patoroco picture patoroco  ·  4Comments