Repository navigation
az network application-gateway wait --custom with != JMESPath expression returns immediately instead of blocking #32961
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Activity
- addedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on Mar 12, 2026 - addedcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.Networkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...
on Mar 12, 2026 Thank you for opening this issue, we will look into it.
- addedAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
on Mar 12, 2026 - changed the title
[-]az network application-gateway wait --custom "provisioningState!='Updating'" returns immediately while address-pool update is still in progress[/-][+]az network application-gateway wait --custom with != JMESPath expression returns immediately instead of blocking[/+]on Mar 12, 2026 - removedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on Mar 12, 2026
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
az network application-gateway wait --custom "provisioningState!='Updating'"returns immediately (~2 seconds) even while the gateway'sprovisioningStateisUpdating. The JMESPath!=expression does not evaluate correctly — it always passes, regardless of the actual state.The built-in
--updatedflag works correctly and blocks for the full duration of the operation. This meansprovisioningStateis accurate, but--customwith a!=expression fails to evaluate it properly.Side-by-side proof during the same gateway update operation:
--custom "provisioningState!='Updating'"Updating--updatedUpdatingaz appgw show --query provisioningStateUpdating"Updating"Impact: This bug makes it impossible to use
--customas a pre-flight check to coordinate concurrent updates. We used this in CI/CD pipelines to avoidCanceledAndSupersededDueToAnotherOperationerrors when multiple pipelines update different backend pools on the same gateway. Because--customalways returned immediately, every pipeline blew through the wait and collided.Related command
Errors
No error is raised —
--customsilently returns a false positive. The downstream consequence is that a second pipeline submits while the first is still in progress, causing:Issue script & Debug output
Reproduction requires two terminals and one App Gateway.
Terminal 1 — trigger a real pool update (must make an actual change):
Terminal 2 — while Terminal 1 is running (~10 seconds in), run the
--customwait:Terminal 3 — for comparison, run
--updatedat the same time:Our test results (PowerShell, local machine polling every 2 seconds):
We ran a monitoring script that polled
az appgw show --query provisioningStateevery 2 seconds while triggering a pipeline that calledaz address-pool update. Theshowcommand correctly returnedUpdatingfor ~59 seconds during the operation.We then ran a second test that detected
Updatingvia theshowpoll, immediately launched--custom "provisioningState!='Updating'", and it returned in ~2 seconds whileshowstill reportedUpdating:In a separate test,
--updatedblocked correctly for ~47 seconds until the operation completed.Debug output from the
--customcall shows it performs a GET, receives the full gateway JSON, and exits with code 0 after a single poll — suggesting the JMESPath expression evaluates to a truthy value even whenprovisioningStateequalsUpdating.Expected behavior
az network application-gateway wait --custom "provisioningState!='Updating'"should block whileprovisioningStateisUpdatingand only return once the condition is actually true (i.e., whenprovisioningStatechanges toSucceeded).The
!=JMESPath expression should evaluate tofalsewhen the property equals the compared value, just as the==expression (used internally by--updated) correctly evaluates tofalsewhen the property does not match.Environment Summary
Both versions exhibit the same behavior.
Additional context
Workaround: Use
--updatedinstead of--custom "provisioningState!='Updating'". The--updatedflag correctly checksprovisioningState=='Succeeded'internally and blocks for the full duration of an in-progress operation.This bug may not be specific to Application Gateway — any resource where
--customuses a!=JMESPath expression againstprovisioningStatemay be affected. We have not tested other resource types.Related issues:
CanceledAndSupersededDueToAnotherOperationduring concurrent App Gateway updates