{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
Conversation
|
Hi William (@william051200), |
microsoft-github-policy-service
Bot
requested review from
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
September 21, 2026 03:52
Copilot started reviewing on behalf of
William (william051200)
September 21, 2026 03:53
View session
Contributor
There was a problem hiding this comment.
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
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-03support. - Adds
list-soft-deletedand--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}, | ||
| ) |
Collaborator
|
Compute |
Member
Author
|
Waiting for CRP rollout on 2 Oct |
Contributor
|
🔔 Routing this PR to @Azure/act-observability-squad. |
Julie Zhu (yanzhudd)
approved these changes
Sep 24, 2026
JaysonTaiMicrosoft
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


🤖 PR Validation — ❌ Action needed
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
Related command
az sig create/ updateaz sig image-version delete/ list-soft-deletedaz sig image-version show-shared/ list-shared/ show-community/ list-community- Surface new response propertiesconsumptionEndTimeandimageStateaz sig image-version undelete- Removed is_previewDescription
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_binHistory Notes
[Compute]
az sig create/update: Add new parameters--soft-delete,--soft-delete-retention-periodand--soft-delete-grace-periodto support soft-delete policy[Compute]
az sig image-version delete: Add new parameter--bypass-soft-deleteto support bypass-delete[Compute]
az sig image-version list-soft-deleted: Add new command to support soft-delete recycle-bin listingThis 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.