Make `run-task` and `docker-image` hashes optional in cache names
还没有人认领这个 Issue。
评估
调研方向
Start at src/taskgraph/transforms/task.py around line 519 and trace how run-task and docker-image hashes enter cache names. Resolve the default behavior, interpolation format, cache-type risk, and backward-compatibility approach described in the issue. Done means projects and individual caches can choose whether to include either hash without losing cache correctness.
由索引模型根据 Issue 内容生成。
描述
Currently Taskgraph adds both the hash of run-task and the docker-image tasks to cache names (if those things are being used):
https://github.com/taskcluster/taskgraph/blob/e5565787fc8d546cbb906c6efe6702420e6891f0/src/taskgraph/transforms/task.py#L519
This ensures correctness, it almost guarantees that we won't get errors due to different versions of tools being used across the same set of files. However, it comes at the cost of more cache misses!
For example, in Gecko we typically have a ton of tasks coming in for any given docker-image. Furthermore, pools tend to only run tasks with certain images, so this feature makes a lot of sense.
On the other hand, mozilla-vpn-client has only a single pool that runs a wide array of tasks with docker-images. Further, pushes come in infrequently so workers aren't very long lived. This means we almost never have cache hits.
Another point is the type of cache. Checkout caches tend to be more susceptible (especially with Mercurial) to this, but something like a dotfile cache might not be (maybe?). The point is different kinds of caches have different levels of risk for this.
I propose that instead of automatically adding the run-task and docker-image hashes to all cache names, we use them as values that can be interpolated into the cache name. I.e, a cache name could be checkouts-{run_task}-{docker_image} and these values would be included in the hash name. Or it could just be checkouts and then they wouldn't. This allows individual projects, and even individual caches within a project, to set up cache names however is best for that context.
There's definitely an open question around whether one or both of these hashes should be included by default. Also how hard we should try to preserve backwards compatibility.
- 主要语言
- Python
- 星标
- 26
- 派生
- 55
- 平均合并
- 2 天 6 分钟
- 30 天内合并 PR
- 15
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
taskcluster/taskgraph 的其他 Issue
-
难度 5/5 一周以上 新手友好度 20/100
taskcluster/taskgraph#952 ·
-
难度 4/5 3-5 天 新手友好度 35/100
taskcluster/taskgraph#915 ·
-
feature
难度 3/5 1-2 天 新手友好度 35/100
taskcluster/taskgraph#911 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
taskcluster/taskgraph#882 ·
-
难度 5/5 一周以上 新手友好度 35/100
taskcluster/taskgraph#865 · 1 条评论 ·
查看 taskcluster/taskgraph 的全部 Issue
相似的 Issue
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#30750 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
good first issue
难度 1/5 1 小时以内 新手友好度 90/100