kbuild: skip building kselftest when not required by jobfilter (speed up bisection)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 50/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
- 领域
- build-system, ci-cd
调研方向
从 src/lava_callback.py 中的 get_jobfilter() 开始,然后检查 config/jobs.yaml 和 config/scheduler.yaml,沿着事件链接追踪 kselftest 测试到其构建作业。将其与 kernelci/kbuild.py 中当前的过滤逻辑进行比较。完成的标准是:请求的 kselftest 作业保留所需的构件,而不相关的二分构建跳过 kselftest。
由索引模型根据 Issue 内容生成。
描述
Goal
To speed up bisection, do not build kselftest when it isn't needed by the requested jobs (kselftest builds are expensive and dominate bisection turnaround).
This was originally attempted in #2729, but that approach needs more design work before it can land — see below. Converting to an issue to track the proper solution.
Current attempt (#2729)
In kernelci/kbuild.py, when a jobfilter is present, kselftest is disabled unless <build-name>-kselftest literally appears in the filter:
if node['jobfilter'] and self._kfselftest is True:
kselftest_name = node['name'] + "-kselftest"
if kselftest_name not in node['jobfilter']:
self._kfselftest = False
Why this isn't enough
-
Downstream tests are invisible to the build.
kbuild.pyruns in the build container and only receivesnode+params+ a flatjobfilterlist of strings. It has no knowledge of which tests consume kselftest artifacts. So a jobfilter containing a kselftest test (but not the kselftest build name) would silently produce a build without kselftest, and the test would fail mysteriously. The dependency knowledge lives in kernelci-pipeline:- test → needs-kselftest is identifiable from
config/jobs.yaml(test_method: kselftest,kcidb_test_suite: kselftest.*) - build → test link is the
eventfield inconfig/scheduler.yaml
- test → needs-kselftest is identifiable from
-
Possible naming bug. Dedicated kselftest build variants are already named
kbuild-...-kselftest(e.g.config/jobs.yaml,scheduler.yaml). For such a node,node['name'] + "-kselftest"becomeskbuild-...-kselftest-kselftest, which never matches the filter — so kselftest would be disabled on the very build meant to produce it (this is exactly the bisection-of-a-kselftest-test path). Needs verification against realnode['name']values.
Proposed direction
Move the decision to kernelci-pipeline, which already has self._configs loaded and builds the jobfilter in get_jobfilter() (src/lava_callback.py):
- When any requested job in the jobfilter resolves to a kselftest test (
test_method == 'kselftest'), auto-enable kselftest on the corresponding build (e.g. set akselftest: enableparam on the build node, or ensure the kselftest-enabled build name is in the filter). - Otherwise, leave kselftest off so bisection builds stay fast.
The one non-trivial piece is reverse-resolving the scheduler graph (test → triggering build-node event → build job), since the build job doesn't inherently know its downstream tests. This is an in-memory config walk, not new infrastructure.
Closes #2729 (superseded by this issue).
- 主要语言
- Python
- 星标
- 120
- 派生
- 108
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 21
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kernelci/kernelci-core 的其他 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 72/100
kernelci/kernelci-core#2591 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 25/100
kernelci/kernelci-core#3234 ·
维护者通常 1 天内回复
-
Make Kubernetes job network readiness checks bounded and deployment-independent可能重新可做 @Aniket1260 于 37 天前认领,目前没有进行中的 PR。 未关闭good first issue techdebt
难度 5/5 一周以上 新手友好度 35/100
kernelci/kernelci-core#3197 · 3 条评论 ·
维护者通常 1 天内回复
-
chromeos techdebt
难度 5/5 一周以上 新手友好度 35/100
kernelci/kernelci-core#3196 ·
维护者通常 1 天内回复
-
kubernetes runners missing logs and test naming wrong可能重新可做 @nuclearcat 于 69 天前认领,目前没有进行中的 PR。 未关闭
kernelci/kernelci-core#3170 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
查看 kernelci/kernelci-core 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 64/100
agrc/palletjack#208 ·
-
status/needs-triage type/bug
难度 2/5 1-3 小时 新手友好度 85/100
PKU-YuanGroup/OpenAI4S#218 ·
维护者通常 1 天内回复
-
Test Leakage可能已有人在做 @garland3 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
sandialabs/atlas-ui-3#1030 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
aws-samples/sample-ai-persona#151 ·
维护者通常 1 天内回复