Skip to content

fix: quote --features arg for arm64 TL image definitions#8222

Open
aadhar-agarwal wants to merge 1 commit intomainfrom
aadagarwal/fix-quote-issue
Open

fix: quote --features arg for arm64 TL image definitions#8222
aadhar-agarwal wants to merge 1 commit intomainfrom
aadagarwal/fix-quote-issue

Conversation

@aadhar-agarwal
Copy link
Copy Markdown
Contributor

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 #

Inline az calls per branch instead of building a command string,
which broke --features quoting for multi-value TrustedLaunch args.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_STRING concatenation with inline az sig image-definition create calls per conditional branch.
  • Ensances --features handling 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"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants