fix: quote --features arg for arm64 TL image definitions#8222
Open
aadhar-agarwal wants to merge 1 commit intomainfrom
Open
fix: quote --features arg for arm64 TL image definitions#8222aadhar-agarwal wants to merge 1 commit intomainfrom
aadhar-agarwal wants to merge 1 commit intomainfrom
Conversation
Inline az calls per branch instead of building a command string, which broke --features quoting for multi-value TrustedLaunch args.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SIG image-definition creation logic in the VHD builder to avoid constructing an az command string, fixing quoting/argument handling for multi-value --features (notably for ARM64 Trusted Launch definitions).
Changes:
- Replaces
TARGET_COMMAND_STRINGconcatenation with inlineaz sig image-definition createcalls per conditional branch. - Ensances
--featureshandling for ARM64 Trusted Launch by passing the intended multi-value features as a single argument.
Comment on lines
+455
to
+466
| az sig image-definition create \ | ||
| --resource-group ${AZURE_RESOURCE_GROUP_NAME} \ | ||
| --gallery-name ${SIG_GALLERY_NAME} \ | ||
| --gallery-image-definition ${SIG_IMAGE_NAME} \ | ||
| --publisher microsoft-aks \ | ||
| --offer ${SIG_GALLERY_NAME} \ | ||
| --sku ${SIG_IMAGE_NAME} \ | ||
| --os-type ${OS_TYPE} \ | ||
| --hyper-v-generation ${HYPERV_GENERATION} \ | ||
| --location ${AZURE_LOCATION} \ | ||
| --architecture Arm64 \ | ||
| --features "DiskControllerTypes=SCSI,NVMe SecurityType=TrustedLaunch" |
There was a problem hiding this comment.
The az sig image-definition create invocation is duplicated across each branch, which increases the chance of future drift (e.g., adding/changing a common flag in one path but not others). Consider building a shared argument list (e.g., a bash array with the common flags) and then appending only the branch-specific --architecture/--os-state/--features args before executing the command once.
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.
Inline az calls per branch instead of building a command string, which broke --features quoting for multi-value TrustedLaunch args.
Aligning with https://dev.azure.com/msazure/CloudNativeCompute/_git/aks-rp/pullrequest/15226615
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #