Skip to content

{VM} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version - #34232

Open
William (william051200) wants to merge 2 commits into
Azure:devfrom
william051200:revert-version
Open

William (william051200) wants to merge 2 commits into
Azure:devfrom
william051200:revert-version

Conversation

@william051200

@william051200 William (william051200) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

az sig image-version show-shared/list-shared/show-community/list-community

Description

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.

@william051200
William (william051200) requested a review from a team as a code owner October 16, 2026 02:54
Copilot AI balanced review requested due to automatic review settings October 16, 2026 02:54
@william051200 William (william051200) added the Request X Engineering Agent Ask the agent to triage this issue or review this PR label Oct 16, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Auto-Assign Auto assign by bot label Oct 16, 2026

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

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-03 and list commands to 2023-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

x-engineering-agent Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

X Engineering Agent Report

Review — Comments

William (@william051200)

The four generated commands now request the pre-upgrade API versions (list: 2023-07-03; show: 2022-01-03), consistent with the rollback requested in #34229. Upstream CI succeeded, but the release-note metadata finding below still needs correction, and the reported regression is not yet verified.

Upstream CI

53 completed checks succeeded; no upstream CI failure requires classification.

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.

The changed community tests assert image-version name/location/uniqueId and VM image references, but do not exercise #34229's failing list-shared --shared-to tenant invocation against WINDOWSSERVER.1P in eastus2. The shared recording patches only replace request URI API versions while leaving the recorded responses unchanged. That supports playback compatibility, not a fresh service response or resolution of the reported NoRegisteredProviderFound error; the report quotes 2026-03-01, whereas this diff reverts 2026-03-03.

Before merge, the VM owner should verify that exact shared-gallery scenario and confirm the expected version list. Focused rerun: azdev test test_shared_gallery test_create_vm_with_shared_gallery_image test_community_gallery_operations test_create_vm_with_community_gallery_image --live; refresh the corresponding four files under src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/ from those runs rather than URI edits alone. This is author/maintainer validation guidance, not a claim that the Agent executed it. Also confirm expected output after the rollback removes consumptionEndTime/imageState, and removes artifactTags (plus community disclaimer) from the show schemas; existing identity assertions do not establish that response-field contract. Sovereign-cloud behavior and regeneration from the linked AAZ source were not independently verified.

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's History Notes section.
    Verify: Run the PR title/content check and confirm the metadata is accepted for automatic history generation.
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 vm before merge.

Posted by x-engineering-agent (Reviewer)

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@x-engineering-agent x-engineering-agent Bot changed the title {Compute} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version {VM} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version Oct 16, 2026
@william051200 William (william051200) changed the title {VM} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version {Compute} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version Oct 16, 2026
@x-engineering-agent x-engineering-agent Bot changed the title {Compute} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version {VM} az sig image-version show-shared/list-shared/show-community/list-community: Revert API version Oct 16, 2026
@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Agent reviewed this PR label Oct 16, 2026

@x-engineering-agent x-engineering-agent Bot 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.

William (@william051200)

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's History Notes section.
    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 vm before merge.

Posted by x-engineering-agent (Reviewer)

This branch has not been deployed

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

Labels

Auto-Assign Auto assign by bot Request X Engineering Agent Ask the agent to triage this issue or review this PR X Engineering Agent Reviewed Agent reviewed this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compute] az sig image-version show/list-shared and show/list-community: no changes required (correction to #34074)

3 participants