Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

A cache hit whose outputs can't be restored exits 0 and is reported as a hit

未關閉
#767 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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 內容生成。

描述

remote cache

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

  1. Run a cached task that has output files, such as vp run build.
  2. Delete its .tar.zst archive under node_modules/.vite/task-cache/.
  3. 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.

主要語言
Rust
星號
468
分支
42
平均合併
1 天 10 小時
30 天內合併 PR
43

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

voidzero-dev/vite-task 的其他 Issue

查看 voidzero-dev/vite-task 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。