[VM] Fix #34063: az vmss update: Clear the opposite zone placement filter when switching filters - #34164
Conversation
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
|
@Azure/x-engineering-agent Please fix the PR-induced playback regression: the new |
ae90ef5 to
56dde0c
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The narrow fix covers both transitions with focused regression tests and no unresolved findings; tests were not executed during review.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes #34063 by clearing the persisted opposite zone placement filter when az vmss update switches filters.
Changes:
- Removes the stale filter when only the opposite filter is supplied.
- Adds regression coverage for both transitions, unchanged placement, empty inputs, and mutually exclusive arguments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_custom_vm_commands.py | Adds focused zone placement update tests. |
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Clears the opposite placement filter when switching. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ment filter when switching filters
821f963 to
bc1e97a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Live test results —
|
There was a problem hiding this comment.
Review
No PR-related failure found at 754814a43922. Failure attribution: 0 PR-related, 1 not PR-related, 0 uncertain. No source change is requested for the live-test environment failure.
Upstream CI
All 50 current-head checks passed. The requested playback correction is present: test_vmss_update_zone_placement_policy no longer adds an unrecorded cross-filter command; its only remaining diff is explanatory comments. The existing cassette is unchanged.
Test validation
- Live test: Failed with conclusion
failure. Workflow run - Regression coverage: For
vm: 2 focused test 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 live-test result reports 22 passed, 1 failed. VMSSUpdateZonePlacementPolicyTest.test_vmss_update_zone_placement_policy fails at the initial vmss create in src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:15481 with: Setting Placement on Virtual Machine Scale Sets is only allowed for preview customers. This occurs before any az vmss update, so the failure is not PR-related. The failed recording was not published and must not replace the existing cassette.
I manually inspected the source scenario in #34063. TestVMSSUpdateZonePlacement in src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_custom_vm_commands.py exercises both persisted-filter switching directions, null/empty filters, preservation of unrelated state, and the real generated PUT serializer's omission of the opposite filter. That is focused unit/serialization evidence, not proof of a successful service-side transition. No additional source defect was confirmed by the seven review-tool checks and changed-line inspection.
For additional live evidence, the workflow owner can rerun vm.test_custom_vm_commands and vm.test_vmss_update_zone_placement_policy through the authorized live-test workflow using an already preview-eligible test environment, or document the preview limitation for the VM owning squad. Do not change shared subscription configuration or publish this failed run's src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_update_zone_placement_policy.yaml. Keep the existing recorded scenario unless a complete successful recording and playback can be obtained.
Risk assessment
16/100 · Low · High confidence
The Low rating is driven by public CLI behavior.
- Change scope: 3 changed files, 181 changed lines (
+180/-1), including 1 production file. - Affected components:
vm - Risk drivers: public CLI behavior (+18)
- 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)
Related command
az vmss updateDescription
Fixes #34063.
Clear the opposite zone placement filter when switching filters.
Testing Guide
az vmss update.src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_custom_vm_commands.py,src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py.History Notes
[VM]
az vmss update: Clear the opposite zone placement filter when switching filtersThis 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.