Migrate from JSON Build Specs to YAML Image Templates#26
Merged
Conversation
magerstam
reviewed
Jun 2, 2025
magerstam
reviewed
Jun 2, 2025
| } | ||
|
|
||
| // GetProviderName returns the provider name for the given template | ||
| func (t *ImageTemplate) GetProviderName() string { |
Contributor
There was a problem hiding this comment.
why hard-coding these in the code rather than putting the valid combinations in the json schema itself and validate against the schema?
Contributor
Author
There was a problem hiding this comment.
This is not for validation. Used in logging to get the provider name and, more importantly, for initializing the correct registered provider in executeBuild(). I still agree that this should not be hardcoded.
Would it be better to keep this mapping in a separate file?
magerstam
reviewed
Jun 2, 2025
magerstam
reviewed
Jun 2, 2025
magerstam
reviewed
Jun 2, 2025
Contributor
magerstam
left a comment
There was a problem hiding this comment.
few minor comments to address
magerstam
approved these changes
Jun 3, 2025
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
This PR migrates the Image Composer Tool from JSON build specifications to YAML image templates as the primary input format, simplifying the architecture and improving usability.
Key Changes
1. New YAML Template Format
ImageTemplatestruct withimage,target, andsystemConfigssectionsGetProviderName(),GetPackages(), etc.)2. Simplified Architecture
3. Provider Updates
*ImageTemplateInit()method signatures across provider interface4. Command Updates
5. Documentation & Tests
Usage
New command format: