Skip to content

{Compute} az vm/vmss list-versions/show: Support extension image release metadata - #34018

Open
William (william051200) wants to merge 7 commits into
Azure:devfrom
william051200:extension-image
Open

{Compute} az vm/vmss list-versions/show: Support extension image release metadata#34018
William (william051200) wants to merge 7 commits into
Azure:devfrom
william051200:extension-image

Conversation

@william051200

@william051200 William (william051200) commented Sep 2, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vm extension image list-versions cmd vm extension image list-versions added parameter expand
⚠️ 1006 - ParaAdd vmss extension image list-versions cmd vmss extension image list-versions added parameter expand

Related command

az vm list-versions
az vm show
az vmss list-versions
az vmss show

Description

Resolve #33896

aaz Azure/aaz#1078

Testing Guide

I have added test case in azure-cli\src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py: test_vm_vmss_extension_image
But not able to run due to 2026-04-01 is not ready in the resource provider yet

History Notes

[Compute] az vm/vmss list-versions: Add new parameter --expand to support extension image release metadata


This checklist is used to make sure that common guidelines for a pull request are followed.

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.

🟡 Changes recommended

The newly added live-only test has brittle assertions and direct indexing that can fail on valid-but-empty/null service responses, causing false failures.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the AAZ-generated VM/VMSS extension image list-versions and show commands to use the 2026-04-01 Compute RP API version and surface the newly added extension image release/execution metadata (including support for $expand=properties on list-versions), along with a new live-only scenario test.

Changes:

  • Bump API version to 2026-04-01 for VM/VMSS extension image list-versions and show.
  • Add --expand properties to list-versions and pass it through as $expand=properties.
  • Extend response schemas to include release metadata fields and extension feature metadata; add a new live-only test covering the new fields.
File summaries
File Description
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py Adds a live-only test validating the new release/feature metadata surface area.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/extension/image/_list_versions.py Updates to 2026-04-01, adds --expand, and extends list response schema for new metadata fields.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vm/extension/image/_show.py Updates to 2026-04-01 and extends show response schema for new metadata fields.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/extension/image/_list_versions.py Updates to 2026-04-01, adds --expand, and extends list response schema for new metadata fields.
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/extension/image/_show.py Updates to 2026-04-01 and extends show response schema for new metadata fields.
Review details

Suppressed comments (1)

src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:2596

  • The test indexes image['extensionFeatureMetadata']['extensionFeatureTags'] directly and then asserts the list is non-empty and that each tag's key/value are truthy. If the RP returns extensionFeatureMetadata as missing/null or returns an empty extensionFeatureTags array (still a valid shape), this will raise or fail the test even though the response includes the required property.
            feature_tags = image['extensionFeatureMetadata']['extensionFeatureTags']
            self.assertTrue(feature_tags)
            self.assertTrue(all(tag.get('key') and tag.get('value') for tag in feature_tags))
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment on lines +2591 to +2593
for field in ('releaseNotes', 'releaseCategory', 'urgencyLevel', 'runProfile'):
self.assertTrue(image.get(field))

@yonzhan

Copy link
Copy Markdown
Collaborator

Compute

@william051200
William (william051200) requested a review from a team as a code owner September 3, 2026 06:49
@william051200

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compute] Add VM extension image release metadata support

4 participants