Handle plateform args comming from cloned template#188
Open
AtaxyaNetwork wants to merge 3 commits intovatesfr:mainfrom
Open
Handle plateform args comming from cloned template#188AtaxyaNetwork wants to merge 3 commits intovatesfr:mainfrom
AtaxyaNetwork wants to merge 3 commits intovatesfr:mainfrom
Conversation
gCyrille
reviewed
Jan 26, 2026
| err = c.GetClient().VM.SetPlatform(c.GetSessionRef(), instance, config.PlatformArgs) | ||
| // If user didn't set platform args, use existing ones from the template | ||
| platformArgs := config.PlatformArgs | ||
| if platformArgs == nil { |
Collaborator
There was a problem hiding this comment.
At this point config.PlatformArgs == nil means it can be != nil but with a lenght of zero. i.e. it's empty. In that cas we VM.SetPlatform with no plaform args. Is it expected?
…aults - Use len(platformArgs) == 0 instead of nil check to also handle explicit empty platform_args config - Remove spurious \n from ui.Say (ui.Say adds its own newline) - Replace inaccurate comment with accurate one - Remove hardcoded platform arg defaults from xva builder (consistent with iso builder; step_create_instance now inherits from template for both)
nathanael-h
approved these changes
Mar 13, 2026
Member
|
@gCyrille do you wanna re-review? |
gCyrille
approved these changes
Mar 16, 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.
Before, when creating an image, platform args was either defined by the user, or arbitrary default args was used.
Now, platform args from the template are reused to build the image for the user. This make creating windows image (which need viridian and other things) easier.
User can still override platform args if they want
Fix #155
Also, output is telling us when existing platform args are used: