Skip to content

{Compute} az sig create/update and az sig image-version delete/list-soft-deleted: Support soft-delete policy, bypass-delete and recycle-bin listing - #34107

Merged
Julie Zhu (yanzhudd) merged 16 commits into
Azure:devfrom
william051200:soft-delete
Sep 24, 2026

Conversation

@william051200

@william051200 William (william051200) commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
❌ 1 ️✔️ 130/130
❌AzureCLI-BreakingChangeTest
❌vm
rule cmd_name rule_message suggest_message
❌ 1007 - ParaRemove sig share wait cmd sig share wait removed parameter expand please add back parameter expand for cmd sig share wait
❌ 1007 - ParaRemove sig share wait cmd sig share wait removed parameter select please add back parameter select for cmd sig share wait
❌ 1007 - ParaRemove sig wait cmd sig wait removed parameter expand please add back parameter expand for cmd sig wait
❌ 1007 - ParaRemove sig wait cmd sig wait removed parameter select please add back parameter select for cmd sig wait
⚠️ 1006 - ParaAdd sig create cmd sig create added parameter soft_delete_grace_period
⚠️ 1006 - ParaAdd sig create cmd sig create added parameter soft_delete_retention_period
⚠️ 1006 - ParaAdd sig image-version delete cmd sig image-version delete added parameter bypass_soft_delete
⚠️ 1001 - CmdAdd sig image-version list-soft-deleted cmd sig image-version list-soft-deleted added
⚠️ 1004 - CmdPropRemove sig image-version undelete cmd sig image-version undelete removed property is_preview
⚠️ 1006 - ParaAdd sig update cmd sig update added parameter soft_delete_grace_period
⚠️ 1006 - ParaAdd sig update cmd sig update added parameter soft_delete_retention_period

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

Related command

az sig create/ update
az sig image-version delete/ list-soft-deleted
az sig image-version show-shared/ list-shared/ show-community/ list-community - Surface new response properties consumptionEndTime and imageState
az sig image-version undelete - Removed is_preview

Description

Resolve #34074

aaz Azure/aaz#1096

Testing Guide

Refer to azure-cli\src\azure-cli\azure\cli\command_modules\vm\tests\latest\test_vm_commands.py: test_gallery_soft_delete_policy_and_recycle_bin

History Notes

[Compute] az sig create/update: Add new parameters --soft-delete, --soft-delete-retention-period and --soft-delete-grace-period to support soft-delete policy
[Compute] az sig image-version delete: Add new parameter --bypass-soft-delete to support bypass-delete
[Compute] az sig image-version list-soft-deleted: Add new command to support soft-delete recycle-bin listing


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

Copilot AI lite review requested due to automatic review settings September 21, 2026 03:52
@william051200
William (william051200) requested a review from a team as a code owner September 21, 2026 03:52
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi William (@william051200),
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

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.

Copilot review overview

🟡 Changes recommended

show-community remains on the old schema/API, and existing scenario recordings still use pre-change API versions.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds Azure Compute Gallery soft-delete policy, recycle-bin listing, bypass deletion, and updated shared/community image-version response schemas.

Changes:

  • Adds retention/grace-period options and API 2026-03-03 support.
  • Adds list-soft-deleted and --bypass-soft-delete.
  • Updates generated shared/community response fields and adds scenario coverage.
File Description
test_vm_commands.py Adds soft-delete and recycle-bin scenario coverage.
operations/​sig.py Preserves gallery location updates and validation.
sig/​image_version/​_show_shared.py Adds new shared-version response fields.
sig/​image_version/​_list_soft_deleted.py Adds recycle-bin listing operation.
sig/​image_version/​_list_shared.py Updates shared-version listing schema/API.
sig/​image_version/​_list_community.py Updates community-version listing schema/API.
sig/​image_version/​_delete.py Adds bypass-soft-delete query support.
sig/​image_version/​__init__.py Registers the new command.
sig/​_wait.py Updates gallery polling API/schema.
sig/​_update.py Adds soft-delete policy update options.
sig/​_show.py Updates gallery response API/schema.
sig/​_create.py Adds soft-delete policy creation options.

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

Comment on lines +37 to +39
"version": "2026-03-03",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/galleries/{}", "2025-03-03"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/galleries/{}", "2026-03-03"],
Comment on lines +213 to +216
properties.image_state = AAZStrType(
serialized_name="imageState",
flags={"read_only": True},
)
Comment on lines +210 to +213
properties.consumption_end_time = AAZStrType(
serialized_name="consumptionEndTime",
flags={"read_only": True},
)
@yonzhan

Copy link
Copy Markdown
Collaborator

Compute

@william051200

Copy link
Copy Markdown
Member Author

Waiting for CRP rollout on 2 Oct

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-observability-squad.

@yanzhudd
Julie Zhu (yanzhudd) merged commit c967893 into Azure:dev Sep 24, 2026
53 checks passed
@william051200
William (william051200) deleted the soft-delete branch September 24, 2026 04:44
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 Azure Compute Gallery soft-delete policy, recycle-bin, and bypass-delete support

5 participants