actions / actions/cache

cache/restore fails to hit if same paths given in different order

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

As can be seen in this run, restore will hit or miss depending on the order of the paths given.

Not seen on that workflow, but if you use actions/cache/save, it will complain that the cache already exists despite a restore having reported a missed cache, if both use different orders.

Not a good practice on the user side to use different orders, but I guess that the actions could do some sorting to avoid this kind of pitfall.

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 path-order difference from the linked workflow run, comparing restore behavior with actions/cache/save. Trace how each action represents the supplied paths and verify that equivalent path sets produce the same cache result. Done means reordered paths no longer cause a restore miss or an already-exists save failure.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.