Skip to content

fix: read simship image URLs for the 2025-gen2-tl sku - #9170

Merged
Tim Wright (timmy-wright) merged 1 commit into
mainfrom
shunlyu/fix-tl-sku-image-urls
Aug 11, 2026
Merged

fix: read simship image URLs for the 2025-gen2-tl sku#9170
Tim Wright (timmy-wright) merged 1 commit into
mainfrom
shunlyu/fix-tl-sku-image-urls

Conversation

@sinmentis

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

extract_windows_image_urls() in vhdbuilder/packer/produce-packer-settings-functions.sh matches WINDOWS_SKU exactly. When 2025-gen2-tl was added in #8768 this case statement wasn't updated, so the Trusted Launch SKU falls through to the default branch, prints Unsupported WINDOWS_SKU: 2025-gen2-tl and leaves windows_nanoserver_image_url and windows_servercore_image_url empty. The empty check right after it only echoes a warning, so the build degrades quietly instead of failing.

This only fires on the simship path (useContainerUrlsFromJson=true), which is why the Release_20260715.1 build passed. It bites anyone testing the TL SKU against a WCCT simship payload.

Trusted Launch consumes the same base VHD and the same container images as regular 2025-gen2. Both stages in .build-and-test-windows-vhds-template.yaml already pass the same $(WINDOWS_2025_GEN2_BASE_IMAGE_URL), $(WINDOWS_2025_NANO_IMAGE_URL), $(WINDOWS_2025_CORE_IMAGE_URL) and the same payload URL. Only the gallery image definition's security type and packer's security profile differ. So the existing branch is reused as is and no new payload keys are needed.

The PowerShell half of this path (windows-vhd-content-test.ps1) already matches on a *2025* wildcard, which is why only the bash half missed the SKU.

Verification

Sourced the function with a synthetic payload and compared origin/main against this branch, WINDOWS_SKU=2025-gen2-tl:

BEFORE  msg : Unsupported WINDOWS_SKU: 2025-gen2-tl
        base/nano/core: <EMPTY>

AFTER   base: https://sim/2025gen2-base.vhd
        nano: https://sim/nano2025.tar,https://sim/nano2022.tar
        core: https://sim/core2025.tar,https://sim/core2022.tar

Output is byte-identical to 2025-gen2. Unknown SKUs still hit the default branch and print Unsupported WINDOWS_SKU. shellcheck -S error is clean.

Which issue(s) this PR fixes:

N/A

extract_windows_image_urls matches WINDOWS_SKU exactly and had no
2025-gen2-tl branch, so the Trusted Launch sku fell through to the
default case, printed "Unsupported WINDOWS_SKU" and left the nanoserver
and servercore URLs empty. The empty check that follows only warns, so
the build degraded quietly instead of failing.

Trusted Launch consumes the same base VHD and container images as
2025-gen2 (both pipeline stages pass the same WINDOWS_2025_GEN2_BASE_IMAGE_URL
and the same payload URL), so the existing branch is reused as is and no
new payload keys are needed.

The PowerShell half of this path already matches on a *2025* wildcard,
which is why only the bash half missed the sku.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4c5187c2-a4d2-4936-9de2-af1dffd83835

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes the Windows VHD build “simship payload” path by ensuring extract_windows_image_urls() recognizes the 2025-gen2-tl SKU and extracts the same base/nano/core image URLs as 2025-gen2, instead of falling through to the unsupported default case.

Changes:

  • Update the WINDOWS_SKU case match to include 2025-gen2-tl in the existing 2025-gen2 branch.
  • Ensure 2025-gen2-tl reads WINDOWS_2025_GEN2_BASE_IMAGE_URL plus the existing 2025/2022 nano & core image URL keys from the simship JSON.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   12 suites   52s ⏱️
389 tests 389 ✅ 0 💤 0 ❌
392 runs  392 ✅ 0 💤 0 ❌

Results for commit aa7d288.

@timmy-wright
Tim Wright (timmy-wright) merged commit 5498a57 into main Aug 11, 2026
38 checks passed
@timmy-wright
Tim Wright (timmy-wright) deleted the shunlyu/fix-tl-sku-image-urls branch August 11, 2026 22:24
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.

3 participants