actions / actions/cache

Restore action doesn't actually fail workflow even when fail-on-cache-miss is true

Open
#1,369 2 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

If your issue is relevant to this repository, please delete this text and continue to create this issue. Thank you in advance.

I'm using v4.0.0 of the Restore action, and I've noticed consistently that if there's a cache miss, that the step of the workflow errors, but it does not fail the job/workflow

I get this all the time
Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set.

But then the job proceeds just fine and after it's done I see a checkmark in the "workflow summary" page for that job.

I would expect that it should fail the job right at that step as soon as the cache miss occurs

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

Reproduce the cache miss with the v4.0.0 Restore action and fail-on-cache-miss enabled in a GitHub Actions workflow. Inspect the Restore action's error handling and verify that a cache miss causes the workflow job to fail at that step, rather than continuing to a successful checkmark.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.