Skip to content

ci: fix the Namespace run and reuse builds only from reviewed runs - #169

Merged
maralcbr merged 3 commits into
integration/aurorafrom
ci/namespace-fixes
Oct 21, 2026
Merged

maralcbr merged 3 commits into
integration/aurorafrom
ci/namespace-fixes

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Summary

Three fixes from the first full kernel CI run on Namespace (39520480419), plus closing the remaining build-reuse gap now that a review is required.

 lookup-build.py: trusted_run(run)
   event in {push, merge_group, schedule, workflow_dispatch
-           , pull_request}
+  head_branch is integration/aurora
+     (merge_group: gh-readonly-queue/integration/aurora/…)
-  path in {kernel-ci.yml, kernel-ci-label.yml}
+  path is kernel-ci.yml
   repository and head repository are this one
  • drm/apple: initialise the works the announce test's teardown drains: the announce KUnit fixture never set up dimensions_wq, typec_relink_wq, hdmi_settle_wq or hdmi_recheck_wq, so every teardown hit WARN_ON(!work->func) in __flush_work(). Under KVM, printing that WARN to the emulated serial console made announce_unbind_running_hotplug_test miss its 1 s wait. The fixture now initialises them, and the known warnings come out of kunit-expected.json.
  • ci: install depmod before inspecting the packages: the Namespace image has no kmod, so inspect-package.py failed after a good build.
  • ci: reuse builds only from reviewed runs: PR runs, including ci:build runs and manual runs of other branches, run unreviewed workflow files, so a writer's CI-only PR could plant a package that the next merge reuses, skips KUnit and boot for, and attests. Reuse now comes only from kernel-ci.yml on integration/aurora and its merge queue branches. The cost is that the queue builds again after a ci:build run (about 12 min on Namespace).

Evidence

  • Before: 39520480419, on Namespace: package failed with No such file or directory: 'depmod', and KUnit failed with announce_unbind_running_hotplug_test (wait_for_completion_timeout(&t->paused, HZ) == 0) after a __flush_work WARN.
    After: 39546961219, a manual run of this branch on Namespace: all green in 11 min. Package took 9 min, KUnit 3 min (all 1,399 cases match kunit-expected.json, with no announce-test splats left) and boot 1 min.
  • tools/aurora-ci unit tests: 110 pass, including new cases. A writer's PR run, a labelled build, a manual run or push of another branch, or a queue for another branch is rejected, and the lookup falls back to an older reviewed artifact.

Merge Danger

Door: two-way

Blast Radius: CI-only

The kernel change is in a KUnit test file only. Reverting restores the old reuse rule.

dcp_comp_unbind() starts with disable_work_sync(&dcp->dimensions_wq), and
dcp_disable_typec_work() disables typec_relink_wq, hdmi_settle_wq and
hdmi_recheck_wq. The external announce test fixture never initialised
those four, so each teardown hit WARN_ON(!work->func) in __flush_work().
kunit-expected.json listed the warnings as known.

Under KVM the warning is not harmless: in
announce_unbind_running_hotplug_test the teardown thread prints it, with
a register dump, to the emulated serial console before it reaches the
test point the case waits one second for, and the case times out.

Initialise the four works in the fixture, as probe does, and drop the
warnings from kunit-expected.json.

Signed-off-by: Marcelo Alcantara <[email protected]>
inspect-package.py resolves every module symbol with depmod. GitHub's
Ubuntu image ships kmod; Namespace's does not, so on KERNEL_CI_RUNNER the
package job built the kernel and then failed with "No such file or
directory: 'depmod'". Install kmod when depmod is missing.

Signed-off-by: Marcelo Alcantara <[email protected]>
lookup-build.py accepted artifacts from pull request runs on branches of
this repository, on the grounds that pushing a branch here needs write
access. With a review required before merging, write access no longer
lands code alone: a pull request runs its own copy of the workflow files
before anyone reviews it, and so does a manual run of a branch. A
writer's CI-only pull request could upload a kernel-package-<key> and a
kernel-verified-<key> under the key of the current tree, and the next
merge with that tree would reuse the package, skip KUnit and the boot
test, and attest it.

Accept an artifact only from a kernel-ci.yml run on a push, schedule or
manual run of integration/aurora, or from the merge queue's branches for
it. ci:build runs still report, but the merge queue builds again.

Signed-off-by: Marcelo Alcantara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant