Repository navigation
feat(ci): gate the size-diff job on UKI .efi sizes - #5111
Conversation
build-uki puts the UKIs in a FAT efiboot.img at the root of the ISO, so for every *-uki.iso the script now pulls that image out with xorriso, copies EFI/kairos out with mtools and reports each .efi on its own. Unlike the ISO table, this one gates. The script exits 1 after printing the report when a .efi is over 1024 MiB, or grew more than 10% against the same file in the baseline. Both limits are flags with documented defaults. --require-uki makes a run with no UKI ISO fail instead of passing quietly. iso-size-diff_test.sh builds small ISOs with the same layout and checks the pass, ceiling, growth, no-baseline and broken-ISO cases. Part of kairos-io#2347 Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
The size-diff job only downloaded the generic non-UKI ISOs, so a UKI growing out of bounds never showed up anywhere. Widen the artifact pattern on both the PR and the master side to pick up the -uki.iso.zip artifacts, install xorriso and mtools to read them, run the script's tests first, and pass --require-uki. The compare step now runs with an explicit bash shell, which turns on pipefail, so a failed UKI check is not swallowed by tee. Fixes kairos-io#2347 Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
The existing broken-ISO case only exercised a missing efiboot.img. A valid FAT image that lacks EFI/kairos (a different UKI layout, or a partial build) fails through the mcopy step instead, which was untested. Part of kairos-io#2347 Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>
test run Ran blob sha: Also ran, all clean: No QEMU verification needed — this change is CI tooling only (bash script + GitHub Actions YAML), no boot/install/upgrade/reset path touched. |
|
Picking this up for QA. |
QA Result: PASS
Summary: The UKI gate measures the real Notes, not blockers:
|
|
@copilot resolve the merge conflicts in this pull request |
master split the PR pipeline (kairos-io#5269): pr.yaml is now a smoke run that builds only the amd64 core ISO, and the full matrix with the UKI ISOs moved to pr-full.yaml. The UKI size gate goes with them into pr-full.yaml's size-diff job. pr.yaml keeps the script's own test so it still runs on every PR. Also picks up 70e24cf, which fixes the edgevpn bundle failure in the install test. Co-authored-by: Itxaka <itxakaserrano@gmail.com> Signed-off-by: itxaka-agent <itxaka-agent@users.noreply.github.com>

Adds a UKI size gate to the existing
size-diffCI job.Today
scripts/iso-size-diff.shonly measures the generic (non-UKI) ISO set, and only reports — it never fails the PR. This closes both gaps for UKI artifacts specifically:efiboot.imgfrom every*-uki.isowith xorriso, pullsEFI/kairos/*.efiout with mtools, and measures each.efi..efiexceeds--max-efi-mib(default 1024 MiB) or grows more than--max-efi-growth-pct(default 10%) against the same file in the last green master build. Both defaults are documented at the top of the script.--require-ukifails the job if no UKI ISO is found at all, so a renamed or missing artifact can't pass silently..github/workflows/pr-full.yaml: widened the artifact download pattern (PR and master baseline) to pick up-uki.iso.zip, addedxorriso/mtoolsinstall steps, and switched the compare step toshell: bashwith--require-ukiso a failing UKI check isn't swallowed bytee. The gate lives there because after #5269 the defaultpr.yamlsmoke run builds no UKI ISO.pr.yamlonly runs the new test script, so that still happens on every PR.scripts/iso-size-diff_test.shis new: 14 cases covering pass, ceiling, growth (with and without baseline),--require-uki, mixed generic+UKI sets, and two distinct broken-ISO shapes (missingefiboot.img, and anefiboot.imgpresent but missingEFI/kairos).Needs a maintainer call: the 1024 MiB / 10% thresholds are my best guess, not a measured number — I had no way to see real UKI sizes from this environment. Check them against the sizes this PR's own CI run reports, and tune
DEFAULT_MAX_EFI_MIB/DEFAULT_MAX_EFI_GROWTH_PCTat the top ofscripts/iso-size-diff.shif they're off.Fixes: #2347
Test run and lint evidence posted in a separate comment below.