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 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 68/100
trezor/trezor-firmware#7997 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
smol-machines/smolvm#1489 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复