Cache miss for existing cache
I'm getting constant cache misses for caches I can see in the interface.
My cache save step in workflow (a):
- name: Save Slack thread to cache
uses: actions/cache/save@v4
id: slack-thread-id
with:
path: /tmp/slack_thread_id
key: slack-thread-id-${{ github.event.pull_request.number }}
My cache restore step in workflow (b):
- name: Restore Slack thread ID
uses: actions/cache/restore@v4
id: slack-thread-id
with:
fail-on-cache-miss: true
path: /tmp/slack_thread_id
key: slack-thread-id-${{ github.event.issue.number }}
Both steps report the same key (e.g. slack-thread-id-16), and I can see that cache in the GH web interface. However, I still get Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: slack-thread-id-16.
I'm seeing the same problem since last week. The cache actions are completely broken now.
It's possible that this only started happening after I manually deleted a cache in the UI. Now no cache can ever be restored even if it was just created.
Cache saved with key: yarn-420aa51b4a097ba60fe4c7b5732a41114a4bbcb509b862828f4fd01a6e556cf0-188552fc3fcf9ed13a45613a825b968d14f7585bb2d7cdc81b35ecc270120666 https://github.com/aio-libs/aiohttp-admin/actions/runs/15345637158/job/43181129640?pr=937#step:16:4
Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: yarn-420aa51b4a097ba60fe4c7b5732a41114a4bbcb509b862828f4fd01a6e556cf0-188552fc3fcf9ed13a45613a825b968d14f7585bb2d7cdc81b35ecc270120666 https://github.com/aio-libs/aiohttp-admin/actions/runs/15345637158/job/43181209023?pr=937#step:9:19
They recently shutdown services for v3 as well, so not like we can try an older version to see if it's not broken..
Seeing something similar:
Warning: Failed to restore: getCacheEntry failed: connect ETIMEDOUT 52.152.245.137:443
Issue is present on selfhosted runners.
That's a completely different error. Probably you've failed to update the actions to v4. Old versions have been shutdown now.
Turns out I was using another action that had a transitive dependency on the cache action, which was not yet updated to v4.
Apparently the older version took precedence over my separate declaration of the raw, updated cache action.
After updating the action with the transitive dependency, my issue is fixed.
Sorry if this didn’t contribute to the issue!
My issue seems to have fixed itself now. I reverted part of the CI change and it worked, then made the same change again and it's still working...
Nevermind. I've realised now the issue is that I changed the paths in the cache action, but not in the restore action. Seems the conflict results in the misleading error that the cache key can't be restored..