Skip to content

Layer Cache not found #19

@NoamDev

Description

@NoamDev

I use the action with the following code in order to make sure that PRs' cache do not affect master:

    - uses: satackey/action-docker-layer-caching@6b09a11416d285a6bf2a9d1ce2484c878f7c985e
      with:
        key: dlc_${{ github.ref }}_{hash}
        restore-keys: |
          dlc_refs/heads/master_
          dlc_${{ github.ref }}_

However, when the action run on a new PR, I get the following error:

Run satackey/action-docker-layer-caching@6b09a11416d285a6bf2a9d1ce2484c878f7c985e
  with:
    key: dlc_refs/pull/32/merge_{hash}
    restore-keys: dlc_refs/heads/master_
  dlc_refs/pull/32/merge_
  
    concurrency: 4
Received 14363 of 14363 (100.0%), 0.7 MBs/sec
Cache Size: ~0 MB (14363 B)
/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/6c9bf4f4-3bb5-420a-9886-8bdb81eed2d9/cache.tzst -P -C /home/runner/work/ridewithto_cloudrun/ridewithto_cloudrun
Error: Layer cache not found: {"id":"bfc566732015e74554c940abfdedb5ca215be6a392cad0f189b171298527cc09"}
##[error]Error: Layer cache not found: {"id":"bfc566732015e74554c940abfdedb5ca215be6a392cad0f189b171298527cc09"}
    at LayerCache.restoreSingleLayerBy (/home/runner/work/_actions/satackey/action-docker-layer-caching/6b09a11416d285a6bf2a9d1ce2484c878f7c985e/dist/ttsc-dist/main.js/index.js:33173:19)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 1)
    at async LayerCache.restoreLayers (/home/runner/work/_actions/satackey/action-docker-layer-caching/6b09a11416d285a6bf2a9d1ce2484c878f7c985e/dist/ttsc-dist/main.js/index.js:33162:58)
    at async LayerCache.restore (/home/runner/work/_actions/satackey/action-docker-layer-caching/6b09a11416d285a6bf2a9d1ce2484c878f7c985e/dist/ttsc-dist/main.js/index.js:33140:42)
    at async main (/home/runner/work/_actions/satackey/action-docker-layer-caching/6b09a11416d285a6bf2a9d1ce2484c878f7c985e/dist/ttsc-dist/main.js/index.js:43988:
25)

Changing the key prefix from dlc to something works, but it's not a practical workaround..

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions