actions / actions/cache

gzip: stdin: not in gzip format. ( Cache restore not working)

Open
#1,596 3 comments 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

Steps to reproduce error

name: Caching venv

on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Cache venv
      id: cache-venv
      uses: actions/cache@v4
      with:
        path: .venv
        key: ${{ runner.os }}-venv

Test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: restore Cache venv
      id: cache-venv-restore
      uses: actions/cache/restore@v4
      with:
        path: .venv
        key: ${{ runner.os }}-venv


Error:
gzip: stdin not in gzip format
Child returned status 1
Warning: failed to restore failed with exit code 2
Cache not found for input keys ***

Note: cache is created but restore fails

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 reproducing the workflow using actions/cache@v4 and actions/cache/restore@v4 from the issue, comparing the cache creation and restore steps. Trace the restore action's handling of the generated cache and the gzip error. Done means a cache created by the first job restores successfully in the Test job without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.