actions / actions/toolkit

actions/cache assumes zstdmt to be installed

Open
#1,726 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
actions/cache assumes zstdmt is installed without checking.

https://github.com/actions/toolkit/blob/81a73aba8bedd532f6eddcc41ed3a0fad8b1cfeb/packages/cache/src/internal/tar.ts#L241

I'm using actions/cache@v4 on Ubuntu 20.04 as a self-managed runner.

zstd --version -> *** zstd command line interface 64-bits v1.5.0, by Yann Collet ***

zstd --long -> (�/�$

/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner8/runner/_work/ourrepo/ourrepo --files-from manifest.txt --use-compress-program zstdmt
/bin/sh: 1: zstdmt: not found
/usr/bin/tar: cache.tzst: Wrote only 4096 of 10240 bytes
/usr/bin/tar: Child returned status 127
/usr/bin/tar: Error is not recoverable: exiting now
Warning: Failed to save: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/cache/src/internal/tar.ts around the linked line 241 and reproduce the cache-save failure on the reported Ubuntu 20.04 self-hosted runner, where zstd is present but zstdmt is not. Trace how the tar command selects its compression program, then verify that saving a cache no longer fails when only zstd is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.