Repository navigation
CI performance: get-deps: depend only on reachable Dockerfile stages - #6957
Conversation
The Dockerfile scanner treated a comment line ending in the escape character as the start of a continuation, so it folded the next instruction into the comment and dropped it. buildkit strips comment lines before it looks for a continuation, so that instruction is built. In the tree this hides pkg/qemu's COPY --from=uefi-build; no FROM is affected, so check-docker-hashes-consistency reports the same. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A native build of pillar, qemu or bsp-imx made Make build eve-cross-compilers first, although buildkit never builds the stage that uses it. When that image is not on Docker Hub for the host arch, Go Tests and Fuzz Tests compile the gcc cross toolchains for hours. get-deps now follows the FROM, COPY --from and RUN --mount from= references from the last stage, for the target arch on the build host's arch, and lists only the images those stages use. When a stage selection does not resolve, as for riscv64 pillar, it keeps every stage. The deps file is per host and target arch, and covers the host arch too for packages built for both. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6957 +/- ##
==========================================
+ Coverage 28.48% 28.76% +0.28%
==========================================
Files 540 551 +11
Lines 98258 100005 +1747
==========================================
+ Hits 27990 28769 +779
- Misses 67998 68774 +776
- Partials 2270 2462 +192 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Fork A/B test: on eriknordmark/eve, both branches carry two test-only commits, one that moves Go Tests and Fuzz Tests to
The PR side's Go Tests run is red because, after the pillar tests, |
|
Skipping the full evetest suite for this PR — it only changes CI/build tooling (Makefile dependency-graph generation in
The PR's own test plan instead validates the change via the An engineer can comment |
Description
A native build of pkg/pillar, pkg/qemu or pkg/bsp-imx made Make build
eve-cross-compilersfirst, although buildkit never builds the Dockerfilestage that uses it. When that image is missing from Docker Hub for the host
arch, Go Tests and Fuzz Tests compile the gcc cross toolchains for hours and
Fuzz Tests is cancelled at the 6 h limit (#6942, #6953).
get-depsnow follows theFROM,COPY --fromandRUN --mount from=references from the last stage, for the target arch on the build host's arch,
and lists only the images those stages use. When a stage selection does not
resolve (riscv64 pillar and qemu have no riscv64 stage), it keeps every stage
and says so. The deps file is per host and target arch,
pkg-deps-$(HOSTARCH)-$(ZARCH).mk, and also covers the host arch for thepackages in
PKGS_HOSTARCH.The first commit fixes the Dockerfile scanner, which took a comment ending in
\as a continuation and dropped the next instruction. buildkit does not. Inthe tree that hid pkg/qemu's
COPY --from=uefi-build; noFROMis affected,so
check-docker-hashes-consistencyoutput is unchanged.Generated deps change only by removals, each matching its Dockerfile:
cross-compilers from pillar, qemu and bsp-imx on native builds, and alpine from
optee-client (amd64, riscv64) and bpftrace (riscv64), whose final stage is
scratchthere. arm64 on amd64 is unchanged.How to test and validate this PR
On master both
make -nlines print 1. In CI, Go Tests and Fuzz Tests shouldnot build
eve-cross-compilerseven when its tag is not on Docker Hub.Changelog notes
None.
PR Backports
Checklist
I've provided a proper description
I've added the proper documentation
I've tested my PR on amd64 device
I've tested my PR on arm64 device
I've written the test verification instructions
I've set the proper labels to this PR
I've checked the boxes above, or I've provided a good reason why I didn't
check them. Build-tooling change only: no documentation or device testing
applies.
🤖 Generated with Claude Code