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

cache action is missing zstd #257

Closed
rgarrigue opened this issue May 25, 2020 · 9 comments
Closed

cache action is missing zstd #257

rgarrigue opened this issue May 25, 2020 · 9 comments
Labels
area/runner Relating to errors in the runner stale

Comments

@rgarrigue
Copy link

rgarrigue commented May 25, 2020

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.

@cplee cplee added the area/runner Relating to errors in the runner label May 26, 2020
@grische
Copy link

grische commented Jun 20, 2020

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
...

@jsoref
Copy link
Contributor

jsoref commented Jun 24, 2020

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

@rgarrigue rgarrigue changed the title cache action is missing ztsd cache action is missing zstd Jun 25, 2020
@rgarrigue
Copy link
Author

@jsoref here you go

@simeonpashley
Copy link

simeonpashley commented Jul 20, 2020

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

@tdtm
Copy link

tdtm commented Sep 18, 2020

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

@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the stale label Nov 18, 2020
@grische
Copy link

grische commented Nov 18, 2020

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

@github-actions github-actions bot removed the stale label Jan 19, 2021
catthehacker pushed a commit to catthehacker/docker_images that referenced this issue Jan 19, 2021
@github-actions
Copy link
Contributor

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

@rgarrigue
Copy link
Author

Fixed I guess ? catthehacker/docker_images@822abaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runner Relating to errors in the runner stale
Projects
None yet
Development

No branches or pull requests

6 participants