Repository navigation
[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). |
|
@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). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
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
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Live test results —
|
There was a problem hiding this comment.
Review
Upstream CI passed. No PR-related defect was found; the failed live test is a preview-access prerequisite, not the filter-normalization change. Live cross-filter transitions remain unverified; this is not an all-clear for human approval.
Upstream CI
All 50/50 checks passed at 122930a22c59d52f4656999c97734ff7ec73d531; the current-head snapshot last completed at 2026-10-09T10:40:41Z.
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.
Live failure - not PR-related: Job 113777176689 reports 1 failed, 22 passed in 57.17s and stops after the first failure. VMSSUpdateZonePlacementPolicyTest::test_vmss_update_zone_placement_policy fails during its initial vmss create, before reaching vmss update. The service returns BadRequest:
Setting Placement on Virtual Machine Scale Sets is only allowed for preview customers.
Scenario evidence and limitation: I inspected the body-linked issue #34063 separately from the timeline lookup. The change at custom.py:5158-5166 removes the persisted opposite filter when only one filter is supplied. The submitted unit assertions exercise the complete handler arguments and generated outgoing placement body in both directions, including populated, empty and null persisted filters. This is author-supplied regression evidence, not proof of live service acceptance.
The scenario-file change is comments only. The existing tests/latest/recordings/test_vmss_update_zone_placement_policy.yaml contains independent include-only and exclude-only PUTs, not cross-filter transitions. No recording changed in this PR; neither the recording nor the failed Agent run proves live switching.
Next action: The workflow/subscription owner should arrange Compute VMSS Placement preview access and rerun the failed Agent workflow; no CLI source change is requested to resolve that environment failure. Before human approval, verify include-to-exclude and exclude-to-include transitions and their resulting placement output in src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py::VMSSUpdateZonePlacementPolicyTest::test_vmss_update_zone_placement_policy, adding transition assertions and refreshing the recording above as needed. Confirm the outgoing body omits the previous filter. If preview access remains unavailable, escalate to the Compute preview and issue-sentinel workflow owners rather than treating the existing independent PUTs as transition coverage.
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.