Support data disk for shared image gallery transformer#4521
Open
lubaihua33 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for including data disk VHDs when creating a Shared Image Gallery (SIG) image version via the azure_sig transformer, and adjusts the ARM/Bicep template to emit null for dataDisks when no data disks are specified.
Changes:
- Extend
azure_sigtransformer configuration to accept either a string VHD URI (back-compat) or an object that can also carry data disk VHD URIs. - Validate existence of both OS and data disk blobs and pass data disk sources into SIG image version creation.
- Update ARM/Bicep templates so
dataDisksbecomesnull(omitted) whendata_disksis empty.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lisa/sut_orchestrator/azure/transformers.py | Accepts structured VHD inputs (OS + data disks), resolves/copies VHD URIs, and validates blob existence before SIG creation. |
| lisa/sut_orchestrator/azure/common.py | Adds optional data_vhd_paths and populates storageProfile.dataDiskImages when creating a SIG image version. |
| lisa/sut_orchestrator/azure/autogen_arm_template.json | Emits null for dataDisks when no data disks are specified (generated output). |
| lisa/sut_orchestrator/azure/arm_template.bicep | Implements the conditional dataDisks: null behavior in source Bicep. |
Comment on lines
4
to
7
| import re | ||
| from dataclasses import dataclass, field | ||
| from pathlib import PurePosixPath | ||
| from typing import Any, Dict, List, Optional, Type, Union, cast |
Comment on lines
+736
to
+738
| def _resolve_vhd_sources( | ||
| self, runbook: SigTransformerSchema | ||
| ) -> tuple[str, List[str]]: |
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
LiliDeng
previously approved these changes
Jun 10, 2026
dc43fed to
bc69490
Compare
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
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.
Description
Related Issue
Type of Change
Checklist
Test Validation
Test has been passed with the following runbook:
Tests have been passed with the following image with data disk:
ibm-usa-ny-armonk-hq-6275750-ibmcloud-aiops 2023-03-27-twas-single-server-base-image 2023-03-27-twas-single-server-base-image 9.0.20250429