Test-products retention is unbounded in practice (100 bundles / 3 days, no config knob) — can fill a disk
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- tooling
调研方向
先阅读 utils/test-products-lifecycle.js,包括 pruneManagedTestProductsDirectory 及其 TEST_PRODUCTS_MAX_AGE_MS 和 TEST_PRODUCTS_MAX_COUNT 常量,然后跟踪 utils/workspace-filesystem-lifecycle.js 中的调用方。确定应如何公开保留设置,以及总大小限制与数量/时间限制应如何相互作用;完成的标准是,可配置的清理能够防止文档所述的磁盘增长场景,并且现有的生命周期行为仍得到覆盖。
由索引模型根据 Issue 内容生成。
描述
Version: 2.7.0
Problem
Each test_sim / test_* run stages a full .xctestproducts bundle (a Binaries/ copy of the built test products) under ~/Library/Developer/XcodeBuildMCP/workspaces/<workspace>/test-products/. In one of the repos I work on, each bundle is ~6.6 GB.
pruneManagedTestProductsDirectory only removes bundles that are either:
- older than 3 days (
TEST_PRODUCTS_MAX_AGE_MS), or - in excess of 100 retained (
TEST_PRODUCTS_MAX_COUNT),
and the sweep only runs while the server is active (1h cooldown). At ~6.6 GB/bundle that permits roughly 660 GB before count-based GC ever triggers. In practice, 20 runs over two days silently consumed 66 GB and contributed to filling my disk.
Root cause
These limits are hardcoded in utils/test-products-lifecycle.js:
const TEST_PRODUCTS_MAX_AGE_MS = 3 * 24 * 60 * 60 * 1e3;
const TEST_PRODUCTS_MAX_COUNT = 100;
and the caller in utils/workspace-filesystem-lifecycle.js only ever passes maxAgeMs (the log max-age, also 3 days) — never maxCount. There is no env/config surface to tune count, age, or a total-size cap, unlike XCODEBUILDMCP_DERIVED_DATA_PATH for derived data.
Request
Expose retention controls, e.g.:
XCODEBUILDMCP_TEST_PRODUCTS_MAX_COUNTXCODEBUILDMCP_TEST_PRODUCTS_MAX_AGEXCODEBUILDMCP_TEST_PRODUCTS_MAX_TOTAL_BYTES
and/or lower the defaults given bundles are multi-GB (e.g. keep only the newest N per workspace). A total-size budget would be the most robust guard against filling the disk between the age/count thresholds.
- 主要语言
- TypeScript
- 星标
- 6.4k
- 派生
- 320
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/XcodeBuildMCP 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/XcodeBuildMCP#520 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
getsentry/XcodeBuildMCP#495 ·
-
难度 4/5 3-5 天 新手友好度 35/100
getsentry/XcodeBuildMCP#537 ·
-
难度 4/5 3-5 天 新手友好度 45/100
getsentry/XcodeBuildMCP#535 ·
-
难度 5/5 一周以上 新手友好度 28/100
getsentry/XcodeBuildMCP#534 ·
查看 getsentry/XcodeBuildMCP 的全部 Issue
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100