Excessive Logging from New-AzureRmResourceGroupDeployment
New-AzureRmResourceGroupDeployment constantly spews: Checking deployment status in 5 seconds
In azurestack BVTs, there are many template deployments, typically running up to an hour.
this creates a large amount of command line spew and makes it hard to find the useful output from the cmdlet.
@ravbhatnagar , Can we remove this excessive logging for every 5 seconds and do some kind of backoff logging? or do this only when verbose preference is set?
@ravbhatnagar ping
This is a request for not just Azure Stack.
This is not specific to Azure Stack.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.
This is a good suggestion, but this is not something we are likely to get to soon. This might be a good item for external contribution.
:bell: Routing this issue to @act-identity-squad.
Thanks for your patience here — apologies for the very long wait. This was recently picked up as an outstanding open issue for the ARM Deployments team to review, and the good news is it looks resolved.
Picking up @bganapa's original 2018 suggestion (gate it behind verbose and/or add backoff) and @alex-frankel's 2020 note that it'd be a good contribution — both of those landed. In current Az.Resources the polling line is emitted via WriteVerbose, and the poll interval now backs off rather than firing every 5 seconds:
// ResourceClient.cs (WaitDeploymentStatus)
WriteVerbose(string.Format("Checking deployment status in {0} seconds.", counter / 1000));
...
counter = counter + 5000 > 60000 ? 60000 : counter + 5000; // 5s, 10s, 15s ... capped at 60s
I verified this at runtime on Az.Resources 9.0.3:
- running
New-AzResourceGroupDeploymentwithout-Verbose→ the "Checking deployment status…" line doesn't appear in any stream, so there's no more spew in normal output; and - running with
-Verbose→ it shows up only on the verbose stream, and the interval grows over time.
So both the noise (now verbose-only) and the cadence (now backing off to a 60s cap) are addressed. I'll close this as resolved.
If you'd like could you confirm it looks right on a current module in your Azure Stack BVT runs? Happy to reopen if you still see excessive output without -Verbose.