Bound Azure Pipelines selector history and publish cost
还没有人认领这个 Issue。
评估
调研方向
从 src/AzurePipelines/PipelineCachingCacheClient.cs 中的 GetSelectors(...).ToHashSetAsync 以及关于限制存储的 selector 数量的 TODO 开始。跟踪带时间戳的 selector key、manifest 和路径集下载的处理方式,然后为 selector 变化、去重、驱逐、有界的 manifest 大小以及远程请求添加测试。完成的标准是:保留和发布工作仍保持有界,同时保留的 selector 仍能提供预期的缓存命中。
由索引模型根据 Issue 内容生成。
描述
Summary
The Azure Pipelines cache backend carries forward every selector ever observed for a weak fingerprint and republishes the complete set on each new selector.
Impact
For a recurring weak fingerprint whose path set or strong selector changes over time, each miss fetches the prior selector manifest, downloads every unique historical path set, writes temporary files, and republishes the full set. Publish work grows linearly with selector history rather than remaining bounded. Azure retention and selector deduplication limit some scenarios, but a long-lived cache universe can still accumulate substantial sequential remote I/O.
Evidence
src/AzurePipelines/PipelineCachingCacheClient.cs calls GetSelectors(...).ToHashSetAsync, adds the current selector, then iterates all selectors and republishes them. The implementation already contains TODO: limit the number of selectors we store. Timestamped selector keys carry the newest set across builds.
Suggested fix
Introduce a bounded retention policy for selectors per weak fingerprint, preserving the most useful/recent entries. Avoid downloading historical path-set content that will not be retained. Add instrumentation or tests demonstrating bounded manifest size and remote requests.
Acceptance criteria
- Selector count and manifest size remain bounded under repeated selector churn.
- Existing selectors still provide expected cache hits within the retention policy.
- Publishing a new selector performs bounded remote work.
- Tests cover churn, deduplication, and eviction behavior.
- 主要语言
- C#
- 星标
- 64
- 派生
- 24
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/MSBuildCache 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
microsoft/MSBuildCache#154 ·
-
难度 4/5 3-5 天 新手友好度 48/100
microsoft/MSBuildCache#167 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
microsoft/MSBuildCache#159 ·
-
难度 4/5 3-5 天 新手友好度 25/100
microsoft/MSBuildCache#155 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
microsoft/MSBuildCache#149 · 3 条评论 ·
查看 microsoft/MSBuildCache 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
难度 2/5 1-3 小时 新手友好度 72/100
azurenoops/spin_agent#975 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
难度 2/5 1-3 小时 新手友好度 92/100
dotnet/AspNetCore.Docs#37699 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
SubtitleEdit/subtitleedit#15108 · 1 条评论 ·