Self-hosted platform: no command clears the local install record after its database is gone
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- postgresql, typescript
研究方向
閱讀 docs/guide/platform/installation/uninstall.md,尤其是第 92 行附近的說明和「Remove retained resources」清單。記錄當資料庫永久遺失時,如何清除本機安裝記錄及相鄰的復原檔案和密鑰檔案,接著說明如何手動移除保留的 Cloudflare 資源。復原步驟清楚且與現有資源清單一致時,即為完成。
由索引模型根據 Issue 內容生成。
描述
Problem
If the platform PostgreSQL database is deleted or can no longer be reached, the local
installation record stays, and no Void command can clear it. The installation name stays
blocked on this machine.
database deleted / unreachable
│
▼
void platform uninstall <id> ──▶ needs the database lifecycle lock first ──▶ fails
void platform install --resume ──▶ reads the saved checkpoint from the database ──▶ fails
void platform install (same name) ──▶ "Installation <id> already uses this name.
Resume it with void platform install --resume" ──▶ loop
A user can still pick a new name, so this is a cleanup dead end, not a full block. The Cloudflare
resources of that installation also stay, and uninstall cannot list them.
Repro (code reading; base 23ddc6e35)
- Install a platform (or stop an install after the database claim).
- Delete the PostgreSQL database at the provider.
- Run
void platform uninstall <id>: it stops at the database lock. - Run
void platform install --name <same-name>: refused, points to--resume. - Run
void platform install --resume --name <id>: it stops at the database read.
Cause
- Every lifecycle command, uninstall included, takes the database lifecycle lock before any change:
packages/void/src/cli/platform-management.ts:591-606(acquirePlatformDatabaseLifecycleLock).
uninstall --planreads project Zero Trust state and projects from the database:
platform-management.ts:311-323. - A non-draft resume reads the authoritative manifest from the database first:
packages/void/src/cli/platform-lifecycle.ts:476-486(readPlatformDatabaseLifecycleManifest). - The name check blocks any record that is not
uninstalled:
packages/void/src/cli/platform-registry.ts:256-268. docs/guide/platform/installation/uninstall.md:92says uninstall stops when the database cannot
be reached, with no next step. Deleting~/.void/platforms/<account>/<id>.jsonis only mentioned
for after a finished uninstall (uninstall.md:38).
Options
- Docs only: say that when the database is gone for good, the user can delete
~/.void/platforms/<account>/<id>.json(and the.recovery.enc/.secrets.encnext to it),
then remove the Cloudflare resources by hand (the list in "Remove retained resources").
Smallest; no code risk. - A
void platform forget <id>command that removes only the local record after a typed
confirmation, prints the recorded Cloudflare resources first, and refuses while the database
is reachable. Needs CLI help, docs and interactive hints. - Let
uninstall --purge-resourcesrun without the database when the user passes an explicit
flag (for example--database-gone). Largest: the database lock and the Zero Trust guard exist
to stop races with the API, so this needs a careful design of what is still safe to delete.
Recommendation: option 1 now; option 2 if users hit it more than once.
🤖 Generated with Claude Code
- 主要語言
- TypeScript
- 星號
- 402
- 分支
- 32
- 平均合併
- 13 小時 14 分鐘
- 30 天內合併 PR
- 73
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
voidzero-dev/void 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
voidzero-dev/void#463 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
voidzero-dev/void#459 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 53/100
voidzero-dev/void#472 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
voidzero-dev/void#471 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 55/100
voidzero-dev/void#470 ·
維護者通常 1 天內回覆
查看 voidzero-dev/void 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 90/100
chrisparsons83/flexspotff#215 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
vitest-dev/vitest#11633 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆