actions / actions/cache

No space left on device during creating the tar file

Open
#1,658 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Some error like this:

Post job cleanup.
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/owner/repo --files-from manifest.txt --use-compress-program zstdmt
zstd: error 70 : Write error : cannot write block : No space left on device 
/usr/bin/tar: cache.tzst: Wrote only 4096 of 10240 bytes
/usr/bin/tar: Child returned status 70
/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

Currently the CI job fails then.

I'm not sure about the best solution.

  • #1281 / #1282 suggests to add --remove-files. But I'm not sure whether that's the best idea.
  • Use some temp filesystem to store the tar file which has enough space.
  • Just ignore the error, make it a warning instead, and proceed. Or make this configurable. I'm totally fine if this is just a warning.

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 by tracing the cache archive creation that invokes the shown /usr/bin/tar and zstd command, then reproduce the failure with a full filesystem. Compare the proposed --remove-files, temporary-filesystem, and warning-only approaches; done requires an agreed policy, implementation, and coverage for the no-space condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.