When vp run gets a cache hit but can't restore the task's output files, for example because the cached archive was deleted or is corrupt, it prints an error, but:
- the run exits with code 0, so CI passes without the task's outputs;
- the summary line still says
cache hit;
vp run --last-details shows the task with ✓ as a cache hit, without the error.
The broken entry also stays in the cache, so every later run hits it and fails the same way until vp cache clean.
Remote caching makes this easier to reach. An entry from the remote cache is saved locally before its outputs are restored, so an archive that downloads but can't be restored leaves the same broken entry behind (#756).
Steps to reproduce
- Run a cached task that has output files, such as
vp run build.
- Delete its
.tar.zst archive under node_modules/.vite/task-cache/.
- Run
vp run build again and check the exit code, then run vp run --last-details.
$ … ◉ cache hit, replaying
✗ Cache lookup failed: failed to restore cached outputs from …/node_modules/.vite/task-cache/v18/….tar.zst; the archive may have been deleted or corrupted. Run `vp cache clean` to clear the cache.: No such file or directory (os error 2)
---
vp run: cache hit, 94ms saved.
The exit code is 0, and --last-details shows:
Statistics: 1 tasks • 1 cache hits • 0 cache misses
...
[1] my-package#build: $ … ✓
→ Cache hit - output replayed - 94ms saved
Expected: the run fails with a non-zero exit code, the summary reports the task as failed with its error, and later runs don't keep hitting the broken entry.
When
vp rungets a cache hit but can't restore the task's output files, for example because the cached archive was deleted or is corrupt, it prints an error, but:cache hit;vp run --last-detailsshows the task with ✓ as a cache hit, without the error.The broken entry also stays in the cache, so every later run hits it and fails the same way until
vp cache clean.Remote caching makes this easier to reach. An entry from the remote cache is saved locally before its outputs are restored, so an archive that downloads but can't be restored leaves the same broken entry behind (#756).
Steps to reproduce
vp run build..tar.zstarchive undernode_modules/.vite/task-cache/.vp run buildagain and check the exit code, then runvp run --last-details.The exit code is 0, and
--last-detailsshows:Expected: the run fails with a non-zero exit code, the summary reports the task as failed with its error, and later runs don't keep hitting the broken entry.