[VM] fix az vmss extension set not updating existing extension - #33752
[VM] fix az vmss extension set not updating existing extension#33752Aditya Pujara (a0x1ab) with Copilot wants to merge 2 commits into
az vmss extension set not updating existing extension#33752Conversation
|
Hi Copilot, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
az vmss extension set not updating existing extension
Live test results —
|
There was a problem hiding this comment.
CI Review Summary — PR #33752
Live test (Tester): ✅ Passed — dispatch_live_test_workflow ran the targeted live test for the changed test file(s) against this PR's head commit and it succeeded.
CI checks: 2 failed, 12 still pending, 70 passed (out of 84 total).
Failed checks
- Test Homebrew Formula — https://github.com/Azure/azure-cli/runs/88397257389
- Build Rpm Packages Red Hat Universal Base Image 9 ARM64 — https://github.com/Azure/azure-cli/runs/88391383327
Please investigate these two failures. If they are caused by this PR's changes (e.g. packaging manifest/spec files, module metadata, or version pins touched by the fix), correct them. If they look like transient/environmental infrastructure failures unrelated to the az vmss extension set fix in this PR (e.g. Homebrew formula sync or RPM build infra issues), please double-check nothing in the diff (setup.py, HISTORY.rst, or packaging config) inadvertently affected them, then note that assessment so a re-run can be requested.
Posted by agent-assist (autonomous bug-fix pipeline).
|
Copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33752 (review) and push a fix. Posted by agent-assist (autonomous bug-fix pipeline). |
Investigated both failures:
Both failures are pre-existing infrastructure flakes. A re-run of those two checks should resolve them. |
|
VM |
|
This issue has been fixed. |
|
🔔 Routing this PR to @Azure/act-observability-squad. |
Related command
az vmss extension setDescription
Since v2.88.0,
az vmss extension setthrows(BadRequest) Multiple VMExtensions per handler not supportedwhen the extension already exists, instead of updating it.Root cause:
set_vmss_extensionfilters out the existing extension before appending the updated one. The filter used the keytype_properties_typeto match the extension type — a key that is never present in the dict returned byget_vmss_by_aaz(the correct key istype, becauseVMSSShow._outputclears the read-only outertypeand client-flattensproperties.typeastype). Since the filter always evaluated toTrue, no extension was ever removed, and appending the new one created a duplicate handler, triggering the API error.Fix: Change the filter key from
type_properties_type→type.A unit test is added to
test_custom_vm_commands.pyto prevent regression.Testing Guide
Unit test (no live environment needed):
History Notes
[VM]
az vmss extension set: Fix updating an existing extension — previously threwBadRequest: Multiple VMExtensions per handler not supportedinstead of replacing the extension.This 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.