add chroot env package download timing, optimize ubuntu minimal raw user template#487
Open
samueltaripin wants to merge 3 commits intomainfrom
Open
add chroot env package download timing, optimize ubuntu minimal raw user template#487samueltaripin wants to merge 3 commits intomainfrom
samueltaripin wants to merge 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
ImageTemplatewith chroot package download timing fields and adjust stage-gap calculations accordingly. - Update
ubuntu24-x86_64-minimal-raw.ymlwith 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)
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR
Description
Any Newly Introduced Dependencies
How Has This Been Tested?
new build timing for ubuntu minimal raw in TGL NUC

Build:
Rebuild:
