Repository navigation
refactor(image): extract reusable image builder - #415
Merged
reuben olinsky (reubeno) merged 1 commit intoOct 29, 2026
Merged
reuben olinsky (reubeno) merged 1 commit into
reuben olinsky (reubeno) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The image-building helper extraction has no active review issues.
No open issues 🎉
What changed in this PR
Extracts image-building logic into reusable core helpers, preparing for reuse across image and component commands while preserving CLI behavior and diagnostics.
Changes:
- Moves image building, architecture types, image lookup, and associated tests into
core/imagebuilder. - Updates image commands to call the extracted helpers directly.
- Moves file-existence validation into
fileutilswith focused diagnostic tests.
| File | Description |
|---|---|
internal/utils/fileutils/file.go |
Exposes shared file-existence validation. |
internal/utils/fileutils/file_test.go |
Tests validation outcomes and access-error diagnostics. |
internal/app/azldev/core/imagebuilder/lookup_test.go |
Relocates image-lookup tests to the core package. |
internal/app/azldev/core/imagebuilder/build.go |
Houses reusable build logic, architecture types, and image lookup. |
internal/app/azldev/core/imagebuilder/build_internal_test.go |
Moves existing build tests into the new package. |
internal/app/azldev/cmds/image/test.go |
Uses shared lookup and file-validation helpers. |
internal/app/azldev/cmds/image/build.go |
Retains CLI wiring and delegates building to the core package. |
internal/app/azldev/cmds/image/boot.go |
Uses core image lookup while preserving diagnostics. |
internal/app/azldev/cmds/image/boot_test.go |
Removes lookup tests relocated to the core package. |
Review effort: Balanced
Nan Liu (liunan-ms)
approved these changes
Oct 28, 2026
Move image building and its tests into core/imagebuilder without changing CLI behavior. Call owning helpers directly from image commands and move unchanged generic file validation into fileutils, preserving diagnostics and existing test coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
reuben olinsky (reubeno)
force-pushed
the
refactor/extract-image-builder
branch
from
October 28, 2026 23:55
616e6d7 to
dbfcbc6
Compare
This was referenced Oct 29, 2026
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.
Move image building and its tests into core/imagebuilder without changing CLI behavior or any meaningful code changes.
Call owning helpers directly from image commands and move unchanged generic file validation into fileutils, preserving diagnostics and existing test coverage.
This is part of a sequence of work to enable better code reuse within image and component commands, specifically for building and testing.