Skip to content

Support data disk for shared image gallery transformer - #4521

Merged
LiliDeng merged 2 commits into
mainfrom
baihua/sig_datadisk
Jun 30, 2026
Merged

Support data disk for shared image gallery transformer#4521
LiliDeng merged 2 commits into
mainfrom
baihua/sig_datadisk

Conversation

@lubaihua33

@lubaihua33 lubaihua33 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Test has been passed with the following runbook:

transformer:
  - type: azure_sig
    enabled: $(enable_transformer_to_sig)
    vhd:
      vhd_path: "$(vhd_path)"
      data_vhd_paths: $(data_vhd_paths)
    gallery_resource_group_name: $(gallery_rg_name)
    gallery_name: $(gallery_name)
    gallery_image_location:
      - $(location)
    gallery_image_hyperv_generation: $(hyperv_generation)
    gallery_image_name: $(gallery_image_name)
    gallery_image_architecture: $(gallery_image_architecture)
    gallery_image_fullname: $(gallery_image_fullname)
    gallery_image_securitytype: $(gallery_image_securitytype)
    rename:
      azure_sig_url: shared_gallery
  # This is to change vhd value to "" in case of ARM since vhd has
  # high priority than shared_gallery
  - type: script
    enabled: $(enable_transformer_to_sig)
    scripts:
      - name: vhd
        variables:
          - vhd
        script: "str('')"
    rename:
      script_vhd: vhd
testcase:
  - criteria:
      name: $(test_case_name)
variable:
  - name: data_vhd_paths
    value:
      - data_vhd:
          lun: 3
          url: "https://azcertifytestvhdwestus3.blob.core.windows.net/vhds/microsoft-ads_linux-data-science-vm_linuxdsvm_21_data.vhd"
      - data_vhd:
          lun: 5
          url: "https://azcertifytestvhdwestus3.blob.core.windows.net/vhds/microsoft-ads_linux-data-science-vm_linuxdsvm_21_os.vhd"

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

Copilot AI review requested due to automatic review settings June 9, 2026 11:10

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 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_sig transformer 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 dataDisks becomes null (omitted) when data_disks is 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 thread lisa/sut_orchestrator/azure/transformers.py Outdated
Comment thread lisa/sut_orchestrator/azure/transformers.py Outdated
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 35.807

LiliDeng
LiliDeng previously approved these changes Jun 10, 2026
@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 53.243

Copilot AI review requested due to automatic review settings June 29, 2026 07:09
@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 34.036

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread lisa/sut_orchestrator/azure/transformers.py Outdated
Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/common.py Outdated
@lubaihua33
lubaihua33 force-pushed the baihua/sig_datadisk branch from 87fbd5e to e6b1bfb Compare June 30, 2026 02:48
@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 28.326

@lubaihua33
lubaihua33 force-pushed the baihua/sig_datadisk branch from e6b1bfb to 8e90d3e Compare June 30, 2026 03:16
Copilot AI review requested due to automatic review settings June 30, 2026 03:16

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/common.py
@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 48.738

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/transformers.py
Comment thread lisa/sut_orchestrator/azure/transformers.py
@LiliDeng
LiliDeng merged commit af829ad into main Jun 30, 2026
63 checks passed
@LiliDeng
LiliDeng deleted the baihua/sig_datadisk branch June 30, 2026 08:32
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