Repository navigation
{VM} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version - #34232
{VM} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version#34232William (william051200) wants to merge 2 commits into
az sig image-version show-shared/list-shared/show-community/list-community: Revert API version#34232Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Existing scenario recordings retain the newer API version and cannot match requests from the reverted commands.
1 open finding
What changed in this PR
Reverts the shared and community image-version commands to earlier Compute APIs, addressing #34229.
Changes:
- Restores show commands to
2022-01-03and list commands to2023-07-03. - Removes newer response fields and empty argument validators.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/image_version/_show_shared.py | Reverts shared-version show API and schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/image_version/_show_community.py | Reverts community-version show API and schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/image_version/_list_shared.py | Reverts shared-version list API and schema. |
| src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/image_version/_list_community.py | Reverts community-version list API and schema. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| parameters = { | ||
| **self.serialize_query_param( | ||
| "api-version", "2026-03-03", | ||
| "api-version", "2022-01-03", |
X Engineering Agent ReportReview — Comments The four generated commands now request the pre-upgrade API versions (list: Upstream CI53 completed checks succeeded; no upstream CI failure requires classification. Test validation
The changed community tests assert image-version name/location/uniqueId and VM image references, but do not exercise #34229's failing Before merge, the VM owner should verify that exact shared-gallery scenario and confirm the expected version list. Focused rerun: Repository policy findings
Risk assessment — 43/100 · MediumThe Medium rating is driven by public CLI behavior, generated output.
Posted by x-engineering-agent (Reviewer) |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
az sig image-version show-shared/list-shared/show-community/list-community: Revert API versionaz sig image-version show-shared/list-shared/show-community/list-community: Revert API version
az sig image-version show-shared/list-shared/show-community/list-community: Revert API versionaz sig image-version show-shared/list-shared/show-community/list-community: Revert API version
az sig image-version show-shared/list-shared/show-community/list-community: Revert API versionaz sig image-version show-shared/list-shared/show-community/list-community: Revert API version
There was a problem hiding this comment.
Upstream CI successful
The supplied current-head snapshot reports 53/53 completed checks successful, with no failures or pending checks. CI was not re-read. This is a human review-only COMMENT, not an approval.
Test validation
- Agent live test: Not run; this is a review-only PR. Check author-provided test evidence and upstream CI separately.
- Regression coverage: For
vm: 1 focused test file(s) and 4 recording file(s) changed. Scenario coverage is unverified; review the issue's required conditions, test setup, and assertions before approval. No linked issue was found in the PR timeline; inspect the source issue and its required scenario manually.
Repository policy findings
- Release artifact validator (blocking) —
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/image_version/_list_community.py:25: Customer-visible Azure CLI behavior is not marked for generated release notes in the PR metadata.
Remediation: Start the PR title with[Component]and describe the customer-facing change there. For multiple or overriding notes, use the PR description'sHistory Notessection.
Verify: Run the PR title/content check and confirm the metadata is accepted for automatic history generation.
Focused verification before merge
The {VM} title and empty History Notes omit this customer-visible rollback from generated release notes. Use [VM] with customer wording describing restored shared/community image-version queries, then verify the title/content check.
Production inspection confirms both list requests use 2023-07-03 and both show requests use 2022-01-03; the handlers send those requests and deserialize through the reverted output schemas. The current-head recordings now match those request versions. No additional source defect was confirmed.
Issue #34229 was read separately despite the timeline lookup above finding none. Its exact regression is tenant-shared WINDOWSSERVER.1P in eastus2, definition 2025-datacenter-azure-edition-smalldisk. Existing src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:8278-8289 checks a created gallery in westus without --shared-to tenant; community cases at :9488-9498 and :9543-9556 check created images in SwedenCentral/DenmarkEast. Their name/location/uniqueId and VM image-reference checks do not verify the reported tenant/region conditions or complete legacy output parity. Please verify that exact az sig image-version list-shared --gallery-unique-name WINDOWSSERVER.1P --location eastus2 --gallery-image-definition 2025-datacenter-azure-edition-smalldisk --shared-to tenant succeeds and returns the expected versions, and add focused regression evidence. _list_shared.py:141 does forward sharedTo, so this is unverified coverage, not evidence that the flag is ignored.
Recording limitation: under src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/, test_shared_gallery.yaml:5695,5753 and test_create_vm_with_shared_gallery_image.yaml:4966 change only request query versions, retaining prior responses. Community recordings were refreshed at test_community_gallery_operations.yaml:4310,4366 and test_create_vm_with_community_gallery_image.yaml:4304,4360. Have the author verify old-API response/schema parity and, if needed, re-record the two shared cases; focused playback rerun: azdev test test_shared_gallery test_create_vm_with_shared_gallery_image test_community_gallery_operations test_create_vm_with_community_gallery_image. No tests or live dispatch were run by the Agent.
Risk assessment
43/100 · Medium
The Medium rating is driven by public CLI behavior, generated output.
- Change scope: 9 changed files, 5277 changed lines (
+2116/-3161), including 4 production files. - Affected components:
vm - Risk drivers: public CLI behavior (+18); generated output (+12)
- Regression evidence: Changed regression tests are included, reducing risk.
- Confidence: High because changed-line patches were available for every production file.
- Required review: Owning-squad review is recommended for
vmbefore merge.
Posted by x-engineering-agent (Reviewer)

🤖 PR Validation — ️✔️ All clear
Related command
az sig image-version show-shared/list-shared/show-community/list-communityDescription
Resolve #34229
aaz Azure/aaz#1129
CRP API version 2026-03-03 is not ready, reverting back to older version.
Testing Guide
History Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.