[GH-ISSUE #257] cache action is missing zstd #176

Closed
opened 2026-03-01 21:40:55 +03:00 by kerem · 9 comments
Owner

Originally created by @rgarrigue on GitHub (May 25, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/257

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.

Originally created by @rgarrigue on GitHub (May 25, 2020). Original GitHub issue: https://github.com/nektos/act/issues/257 Hi there I've the following .actrc ``` -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 ``` And running the following workflow ```yaml 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.
kerem 2026-03-01 21:40:55 +03:00
Author
Owner

@grische commented on GitHub (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
...
<!-- gh-comment-id:647038384 --> @grische commented on GitHub (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 ... ```
Author
Owner

@jsoref commented on GitHub (Jun 24, 2020):

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

<!-- gh-comment-id:649123233 --> @jsoref commented on GitHub (Jun 24, 2020): @rgarrigue can you please edit this issue's summary (and your comments) to change `ztsd` to `zstd`?
Author
Owner

@rgarrigue commented on GitHub (Jun 25, 2020):

@jsoref here you go

<!-- gh-comment-id:649615667 --> @rgarrigue commented on GitHub (Jun 25, 2020): @jsoref here you go
Author
Owner

@simeonpashley commented on GitHub (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
<!-- gh-comment-id:660948111 --> @simeonpashley commented on GitHub (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 ```
Author
Owner

@tdtm commented on GitHub (Sep 18, 2020):

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

<!-- gh-comment-id:695008685 --> @tdtm commented on GitHub (Sep 18, 2020): ^I did the same but with `-y` option for both update and install.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 18, 2020):

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

<!-- gh-comment-id:729294151 --> @github-actions[bot] commented on GitHub (Nov 18, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@grische commented on GitHub (Nov 18, 2020):

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

<!-- gh-comment-id:730032271 --> @grische commented on GitHub (Nov 18, 2020): Can't we just rebuild the image and add zstd? Or get a 20.04 image with zstd?
Author
Owner

@github-actions[bot] commented on GitHub (Feb 19, 2021):

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

<!-- gh-comment-id:781725563 --> @github-actions[bot] commented on GitHub (Feb 19, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@rgarrigue commented on GitHub (Mar 26, 2021):

Fixed I guess ? github.com/catthehacker/docker_images@822abaf3e9

<!-- gh-comment-id:808085341 --> @rgarrigue commented on GitHub (Mar 26, 2021): Fixed I guess ? https://github.com/catthehacker/docker_images/commit/822abaf3e9020a761b20a5c259c7d043633e35a9
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#176
No description provided.