Skip to content

add chroot env package download timing, optimize ubuntu minimal raw user template#487

Open
samueltaripin wants to merge 3 commits intomainfrom
optimization_debug
Open

add chroot env package download timing, optimize ubuntu minimal raw user template#487
samueltaripin wants to merge 3 commits intomainfrom
optimization_debug

Conversation

@samueltaripin
Copy link
Contributor

@samueltaripin samueltaripin commented Mar 18, 2026

Merge Checklist

All boxes should be checked before merging the PR

  • [/ ] The changes in the PR have been built and tested
  • [/ ] Documentation has been updated to reflect the changes (or no doc update needed)
  • [/ ] Ready to merge

Description

  1. add chroot env package download timing
  2. optimize ubuntu minimal raw template

Any Newly Introduced Dependencies

How Has This Been Tested?

new build timing for ubuntu minimal raw in TGL NUC
Build:
image

Rebuild:
image

@samueltaripin samueltaripin requested a review from yockgen March 18, 2026 02:57
@samueltaripin samueltaripin requested a review from a team as a code owner March 18, 2026 02:57
Copilot AI review requested due to automatic review settings March 18, 2026 02:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds timing instrumentation for chroot environment package downloads so the CLI can report that phase separately, and updates the Ubuntu 24.04 minimal raw example template to a more explicit/bootable raw layout.

Changes:

  • Add a new “Chroot Package Download” timing stage, plumbed from providers → chroot builder → CLI timing display.
  • Extend ImageTemplate with chroot package download timing fields and adjust stage-gap calculations accordingly.
  • Update ubuntu24-x86_64-minimal-raw.yml with a concrete disk layout, EFI grub bootloader config, and package set adjustments.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/utils/display/display.go Adds new timing stage to the build timing table output.
internal/utils/display/display_test.go Updates timing table tests for the new stage/parameters.
internal/config/config.go Tracks chroot package download duration and adjusts derived timing gaps.
internal/chroot/chrootenv.go Plumbs the build template into the chroot environment/builder.
internal/chroot/chrootbuild/chrootbuild.go Stores build template and finishes the chroot download timer after package download.
internal/provider/azl/azl.go Passes the build template to the chroot env before initialization (for timing).
internal/provider/elxr/elxr.go Same as above for ELXR provider.
internal/provider/emt/emt.go Same as above for EMT provider.
internal/provider/rcd/rcd.go Same as above for RCD provider.
internal/provider/ubuntu/ubuntu.go Same as above for Ubuntu provider.
cmd/os-image-composer/build.go Includes the new chroot package download duration in timing display.
internal/provider/azl/azl_test.go Mock formatting adjustment to satisfy interface usage in tests.
internal/provider/elxr/elxr_test.go Mock formatting adjustment to satisfy interface usage in tests.
internal/provider/rcd/rcd_test.go Mock formatting adjustment to satisfy interface usage in tests.
internal/provider/ubuntu/ubuntu_test.go Mock formatting adjustment to satisfy interface usage in tests.
internal/image/isomaker/isomaker_test.go Minor mock comment/formatting adjustment.
internal/image/imageos/imageos_test.go Mock formatting adjustment to satisfy interface usage in tests.
image-templates/ubuntu24-x86_64-minimal-raw.yml Reworks the Ubuntu minimal raw template with explicit disk + bootloader + packages.
Comments suppressed due to low confidence (1)

internal/utils/display/display_test.go:138

  • The hidden-stage assertions are currently coupled to the table formatting (e.g., searching for "| Package Download "), which makes the test brittle if spacing/formatting changes. Prefer asserting on the stage labels themselves (e.g., "Package Download", "Image Conversion") rather than including the pipe/padding.
	hiddenStages := []string{"| Package Download ", "| Image Conversion "}
	for _, stage := range hiddenStages {
		if strings.Contains(logs, stage) {
			t.Fatalf("expected zero-duration stage %q to be hidden", stage)
		}

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.

2 participants