azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az cli doesnt return status with web apps, processes never finish

Open Joseluismantilla opened this issue 1 year ago • 9 comments

Describe the bug

When you use az-cli for web apps deployments or swap slots, az cli never finishes these processes, the version that worked is 2.59.

Related command

az webapp deployment slot swap --name ${web_app_name} --resource-group ${resource_group_name} --slot ${slot_name} or az webapp deploy -n "${web_app_name}" -g "${resource_group_name}" --type zip --src-path "output.zip" --slot "${slot_name}"

Errors

The command shows a timeout since it never returns the status of the operation against the Azure resource, even with 30 minutes as a timeout it never shows anything, with version 2.59 it carries out the deployment in 3 minutes or less, but with 2.60 or 2.61 takes forever and the communication is lost against the Web app resource --I wasted time to figured out.

Issue script & Debug output

AMERROR: Timeout reached while tracking deployment status, however, the deployment operation is still on-going.

Expected behavior

Successful deployments or status code from the WebApp Azure API.

Environment Summary

{ "azure-cli": "2.61.0", "azure-cli-core": "2.61.0", "azure-cli-telemetry": "1.1.0", "extensions": {} }

Additional context

No response

Joseluismantilla avatar May 27 '24 17:05 Joseluismantilla

Thank you for opening this issue, we will look into it.

yonzhan avatar May 27 '24 17:05 yonzhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

+1 I also met this question

Lijiaoa avatar May 28 '24 07:05 Lijiaoa

All of our Function App (az functionapp deployment source config-zip) and Web App (az webapp deployment source config-zip) deployments are broken in Azure DevOps with Azure CLI > 2.59. Errors after 18 minutes.

Rolling Azure CLI back to 2.59 has fixed deployments for us.

image

tullydwyer avatar May 28 '24 23:05 tullydwyer

Exactly, that's the issue and the workaround I explained above.

Joseluismantilla avatar May 28 '24 23:05 Joseluismantilla

+1 Any idea when "latest" will fix this issue?

bjornar-skavdal avatar May 29 '24 08:05 bjornar-skavdal

Any update?

Joseluismantilla avatar May 31 '24 19:05 Joseluismantilla

The new version of the Azure CLI 2.61, has changed a default flag in these calls (i.e. az webapp deploy).

The "--track-status" flag was previously false, this has now been set to true Ref: https://github.com/Azure/azure-cli/pull/28921

As part of a breaking change documented here, https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-conceptual/release-notes-azure-cli.md

A fix for this, is to set --track-status false, i.e. az webapp deploy ........ --track-status false

I couldn't find any documentation of how to handle the track-status and drop out of it. It looks like it should just drop out when it's finished so there might still be a bug in the actual tracking however the issue has come up from the default. Ref: https://azure.github.io/AppService/2024/01/10/Deployment-Status-API-CLI.html

jamesbarrow avatar Jun 04 '24 04:06 jamesbarrow

Guys, the issue still persists, the idea is not that the deployment works, but also the swap process from az cli, I just saw that a deployment failed by CLI but it worked in Azure, there is no timeout option for swap either, I'm not requesting the timeout property because this bug is not for that, I'm saying that the swap option with the az 2.61 version sometimes work, sometimes loses the track.

Joseluismantilla avatar Jun 11 '24 18:06 Joseluismantilla

Now it's solved by adding the --track-status false, the azure-cli version 2.62 is faster, we can close it!

Joseluismantilla avatar Aug 02 '24 15:08 Joseluismantilla