Azure / Azure/azure-cli

az functionapp deployment source config-zip keeps retrying even though deployment failed with 503 Service Unavailable

Open
#11,980 20 comments 3 reactions 0 assignees View on GitHub
act-observability-squad Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

On azure-cli 2.0.80 (did not try other versions), publishing code to a Linux Function App will cause the command to keep retrying even though publishing the code failed with 503 Service Unavailable:

```bash
$ az functionapp deployment source config-zip --resource-group example-61-linux --name functionappasdwq61 --timeout 180 --src function.zip
Setting ENABLE_ORYX_BUILD to false
Setting SCM_DO_BUILD_DURING_DEPLOYMENT to false
Getting scm site credentials for zip deployment
Starting zip deployment. This operation can take a while to complete ...
Deployment endpoint responded with status code 503
Deployment status endpoint https://functionappasdwq61.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://functionappasdwq61.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
[...]
```

My expectation was that the command would fail as soon as it notices that the deployment endpoint responds with status code 503, as there's no sense in retrying at that point.

(To be clear, this issue is not about the deployment failing with 503 Service Unavailable; it is about how Azure CLI handles the 503.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.