GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cache-Hit output is null · Issue #1448 · actions/cache

Cache-Hit output is null #1448

New issue
Copy link
New issue
Copy link
Closed
Closed
Cache-Hit output is null#1448
Copy link
Assignees
joshmgross

Description

@MarcoJanecki
MarcoJanecki
opened on Aug 12, 2024
Issue body actions

Hey guys! :)

We are currently trying to implement caching for Docker layers using the v4 Action.

We encountered the problem, that the outputs are always empty (i.e. outputs.cache-hit == null). We already investigated into almost every edge case and became stuck.

If I interpret the documentation correctly, such a missing output should never occur (should always be either true or false?)

Those are the respective steps from our Github Workflow:

- name: Docker layers caching
        id: cache-docker
        uses: actions/cache@v4
        continue-on-error: true
        with:
          fail-on-cache-miss: true
          path: /tmp/docker-cache
          key: ${{ runner.os }}-docker-${{ hashFiles('docker/docker-compose.yaml') }}
  
      - name: Check cache hit
        run: |
           echo "Cache hit: ${{ toJson(steps.cache-docker.outputs.cache-hit) }}"
           echo "Output hit: ${{ toJson(steps.cache-docker.outputs) }}"
           echo "Output hit: ${{ toJson(steps.cache-docker.outcome) }}"
           echo "Cache hit is true: ${{ steps.cache-docker.outputs.cache-hit == 'true'}}"
           echo "Cache hit is false: ${{ steps.cache-docker.outputs.cache-hit == 'false'}}"

Output step "Docker layers caching":

Run actions/cache@v4
  with:
    fail-on-cache-miss: true
    path: /tmp/docker-cache
    key: Linux-docker-768b87720c2e53c457935d1efe1ba2781796490829eaecdc0667cbfa08bcd50e
    enableCrossOsArchive: false
    lookup-only: false
    save-always: false
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: Linux-docker-768b87720c2e53c457935d1efe1ba2781796490829eaecdc0667cbfa08bcd50e

Output step "Check cache hit":

Run echo "Cache hit: null"
Cache hit: null
Output hit: {}
Output hit: failure
Cache hit is true: false
Cache hit is false: false

Are we essentially doing something wrong?

Any help is appreciated! Thanks in advance! :)

Activity

  1. joshmgross commented on Aug 14, 2024

    @joshmgross
    joshmgross
    on Aug 14, 2024
    Contributor
    More actions

    This should be fixed by #1404, which will be released in the next version update.

    Reacted by MarcoJanecki
  2. joshmgross
    self-assigned this
    on Aug 14, 2024
  3. joshmgross commented on Oct 3, 2024

    @joshmgross
    joshmgross
    on Oct 3, 2024
    Contributor
    More actions

    This will be included in 4.1.0 - #1464

  4. joshmgross commented on Oct 7, 2024

    @joshmgross
    joshmgross
    on Oct 7, 2024
    Contributor
    More actions

    https://github.com/actions/cache/releases/tag/v4.1.0

  5. joshmgross
    closed this as completedon Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @joshmgross
    joshmgross

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.