A cache hit whose outputs can't be restored exits 0 and is reported as a hit
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- build-system, cli
研究方向
Reproduce the failure with vp run build after deleting the task archive under node_modules/.vite/task-cache/, then inspect the cache-hit restoration and task-summary paths used by vp run --last-details. Done means a failed restore produces a non-zero exit, is shown as a task failure rather than a cache hit, and does not leave the broken cache entry for later runs.
由索引模型根據 Issue 內容生成。
描述
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-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
- Run a cached task that has output files, such as
vp run build. - Delete its
.tar.zstarchive undernode_modules/.vite/task-cache/. - Run
vp run buildagain and check the exit code, then runvp 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.
- 主要語言
- Rust
- 星號
- 468
- 分支
- 42
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 43
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
voidzero-dev/vite-task 的其他 Issue
-
fspy misses Bun file reads on Linux (glibc), so cached tasks replay stale output可能已有人在做 @wan9chi 今天認領。 未關閉fspy
voidzero-dev/vite-task#777 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
remote cache
難度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#768 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
voidzero-dev/vite-task#738 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 78/100
voidzero-dev/vite-task#719 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/vite-task#717 ·
維護者通常 1 天內回覆
查看 voidzero-dev/vite-task 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
aws-samples/sample-pacer#76 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
axodotdev/cargo-dist#2523 ·
維護者通常 2 天內回覆