azure-cli: Bad Request 400 with command 'az functionapp deployment source config-zip' for Linux function apps
Describe the bug
On running the command az functionapp deployment source config-zip -g myResourceGroup -n <app_name> --src <zip_file_path>
the Azure CLI returns sometimes a Bad Request 400 error on Linux function apps.
To Reproduce
az group create --name myResourceGroup --location westeurope
az storage account create --name <storage_name> --location westeurope --resource-group myResourceGroup --sku Standard_LRS
az functionapp create --resource-group myResourceGroup --consumption-plan-location westeurope --name <APP_NAME> --storage-account <STORAGE_NAME> --runtime <language> --os-type Linux
az functionapp deployment source config-zip -g myResourceGroup -n <APP_NAME> --src <ZIP_FILE_PATH>
Only sometimes a Bad Request error happens and it seems to be only for Linux function apps. However the function will be correctly deployed and works afterwards.
Edit1:
ERROR: Operation failed with status: 'Bad Request'. Details: 400 Client Error: Bad Request for url: https://management.azure.com/subscriptions/XXX/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/<APP_NAME>/syncfunctiontriggers?api-version=2018-11-01
Expected behavior Return no error, everything seems fine.
Environment summary Azure CLI 2.0.73 from docker image mcr.microsoft.com/azure-cli:2.0.73
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 15 (2 by maintainers)
Same thing here. And just a bit bore, the function that was working fine without any change started to return a 503 not available. The portal was displaying a ‘The function runtime cannot be started’. I found nothing to make it work after that. I got randomly a 400 or 401 error while trying to upload the zip again.
That was 18 months ago. The project was terminated for other reasons more than a year ago.
For more general feedback, my experience with Azure CLI tools wasn’t great and there was no support available.
Also, none of the Azure services we used worked correctly, the documentation was wrong and useless, and the support agents were not able to help with anything. I sincerely hope the platform has improved in the last year and a half, but I have no intention of using or recommending it for any further projects.