projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.12k stars 652 forks source link

Zip deployment failed for runtime Python 3.8 using azure cli command az webapp up #3178

Closed blfuentes closed 6 months ago

blfuentes commented 4 years ago

Repro steps.

Create a simple web application using flask with python 3.8.x Create resource group, app service plan and web app that targets runtime python 3.8 run az webapp up --sku F1 -l < region > -n < name of the webapp > error appears on Zip deployment failed

Project structures.

github testing project repository

The log/error given by the failure.

Webapp XXXXXX-blf already exists. The command will deploy contents to the existing app. Updating runtime version from PYTHON|3.8 to python|3.7 Creating zip with contents of dir D:\dev\FlaskTesting ... Getting scm site credentials for zip deployment Starting zip deployment. This operation can take a while to complete ... Deployment endpoint responded with status code 202 Configuring default logging for the app, if not already enabled Zip deployment failed. {'id': 'd9ff6c84c00844bf9f988bd4c98c81d6', 'status': 3, 'status_text': '', 'author_email': 'N/A', 'author': 'N/A', 'deployer': 'Push-Deployer', 'message': 'Created via a push deployment', 'progress': '', 'received_time': '2020-07-05T09:10:02.1802651Z', 'start_time': '2020-07-05T09:10:02.3953194Z', 'end_time': '2020-07-05T09:10:18.7991349Z', 'last_success_end_time': None, 'complete': True, 'active': False, 'is_temp': False, 'is_readonly': True, 'url': 'https://XXXXXX-blf.scm.azurewebsites.net/api/deployments/latest', 'log_url': 'https://XXXXXX-blf.scm.azurewebsites.net/api/deployments/latest/log', 'site_name': 'XXXXXX-blf'}. Please run the command az webapp log deployment show -n XXXXXX-blf -g InsaneSpeech_rg_Linux_westeurope

{ "ClassName":"System.IO.FileNotFoundException", "Message":"No log found for 'latest'.", "Data":null, "InnerException":null, "HelpURL":null, "StackTraceString":" at Kudu.Core.Deployment.DeploymentManager.GetLogEntries(String id) in /tmp/KuduLite/Kudu.Core/Deployment/DeploymentManager.cs:line 111\n at Kudu.Services.Deployment.DeploymentController.GetLogEntry(String id) in /tmp/KuduLite/Kudu.Services/Deployment/DeploymentController.cs:line 432", "RemoteStackTraceString":null, "RemoteStackIndex":0, "ExceptionMethod":null, "HResult":-2147024894, "Source":"Kudu.Core", "WatsonBuckets":null, "FileNotFound_FileName":null, "FileNotFound_FusionLog":null }

Mention any other details that might be useful.

the command updates the runtime version to python 3.7 and fails. The second time I run the command (only if I leave the runtime in 3.7) the deployment works. If I set it back to python3.8 it continues failing I can automate the deployment with CI\CD on push with github actions and leave the runtime in python 3.8

jvano commented 6 months ago

Hi

If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure: https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano Azure App Service