Home > database >  Unable to deploy basic example HttpRequest1 to Azure Function using VSCODE Python
Unable to deploy basic example HttpRequest1 to Azure Function using VSCODE Python

Time:06-09

Afternoon Everyone,

First time here and I'm in a real pickle. I can not figure out why the deployment is failing to Azure Functions. I have scoured the web to figure this out and I am really stumped. Please let me know if you have any ideas or suggestions!

This is the error output given by VS Code. Using Python venv 3.8.8

14:32:52 eTendersTests: Starting deployment...
14:32:57 eTendersTests: Creating zip package...
14:32:57 eTendersTests: Zip package size: 2.44 kB
14:33:01 eTendersTests: Fetching changes.
14:33:02 eTendersTests: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/f670fa18-4068-42c0-925b-752b66739c18.zip (0.00 MB) to /tmp/zipdeploy/extracted
14:33:04 eTendersTests: Updating submodules.
14:33:05 eTendersTests: Preparing deployment for commit id '95126602-7'.
14:33:05 eTendersTests: PreDeployment: context.CleanOutputPath False
14:33:05 eTendersTests: PreDeployment: context.OutputPath /home/site/wwwroot
14:33:05 eTendersTests: Repository path is /tmp/zipdeploy/extracted
14:33:05 eTendersTests: Running oryx build...
14:33:05 eTendersTests: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -p packagedir=.python_packages/lib/site-packages
14:33:07 eTendersTests: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
14:33:07 eTendersTests: You can report issues at https://github.com/Microsoft/Oryx/issues
14:33:07 eTendersTests: Oryx Version: 0.2.20210120.1, Commit: 66c7820d7df527aaffabd2563a49ad57930999c9, ReleaseTagName: 20210120.1
14:33:07 eTendersTests: Build Operation ID: |Yui9lstuThc=.75fae38b_
14:33:07 eTendersTests: Repository Commit : 95126602-7dce-46da-be06-41ab4abf3a44
14:33:07 eTendersTests: Detecting platforms...
14:33:07 eTendersTests: Detected following platforms:
14:33:07 eTendersTests:   python: 3.9.7
14:33:07 eTendersTests: Version '3.9.7' of platform 'python' is not installed. Generating script to install it...
14:33:08 eTendersTests: Source directory     : /tmp/zipdeploy/extracted
14:33:08 eTendersTests: Destination directory: /home/site/wwwroot
14:33:08 eTendersTests: Downloading and extracting 'python' version '3.9.7' to '/tmp/oryx/platforms/python/3.9.7'...
14:33:08 eTendersTests: Downloaded in 0 sec(s).
14:33:08 eTendersTests: Verifying checksum...
14:33:09 eTendersTests: Extracting contents...
14:33:12 eTendersTests: Done in 4 sec(s).
14:33:12 eTendersTests: Python Version: /tmp/oryx/platforms/python/3.9.7/bin/python3.9
14:33:12 eTendersTests: Running pip install...
14:33:13 eTendersTests: [04:33:13 0000] Collecting azure-functions
14:33:13 eTendersTests: [04:33:13 0000]   Downloading azure_functions-1.11.2-py3-none-any.whl (206 kB)
14:33:13 eTendersTests: [04:33:13 0000] Installing collected packages: azure-functions
14:33:13 eTendersTests: [04:33:13 0000] Successfully installed azure-functions-1.11.2
14:33:14 eTendersTests: WARNING: You are using pip version 20.2.3; however, version 22.1.2 is available.
14:33:14 eTendersTests: You should consider upgrading via the '/tmp/oryx/platforms/python/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.
14:33:14 eTendersTests: Done in 2 sec(s).
14:33:14 eTendersTests: Preparing output...
14:33:14 eTendersTests: Copying files to destination directory '/home/site/wwwroot'...
14:33:14 eTendersTests: Done in 0 sec(s).
14:33:15 eTendersTests: Removing existing manifest file
14:33:15 eTendersTests: Creating a manifest file...
14:33:15 eTendersTests: Manifest file created.
14:33:15 eTendersTests: Done in 6 sec(s).
14:33:15 eTendersTests: Running post deployment command(s)...
14:33:15 eTendersTests: Generating summary of Oryx build
14:33:15 eTendersTests: Deployment Log file does not exist in /tmp/oryx-build.log
14:33:15 eTendersTests: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
14:33:15 eTendersTests: Triggering recycle (preview mode disabled).
14:33:15 eTendersTests: Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
14:33:15 eTendersTests: To check our service limit, please visit https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
14:33:15 eTendersTests: Creating placeholder blob for linux consumption function app...
14:33:15 eTendersTests: Malformed SCM_RUN_FROM_PACKAGE when uploading built content.
14:33:15 eTendersTests: Generating summary of Oryx build
14:33:15 eTendersTests: Deployment Log file does not exist in /tmp/oryx-build.log
14:33:15 eTendersTests: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
14:33:15 eTendersTests: Deployment Failed.
14:33:24 eTendersTests: Deployment failed.
14:35:55 eTendersTests: Starting deployment...
14:35:58 eTendersTests: Creating zip package...
14:35:58 eTendersTests: Zip package size: 2.44 kB
14:36:00 eTendersTests: Fetching changes.
14:36:01 eTendersTests: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/5d3f2d78-9904-453e-9e73-c833f30cacf4.zip (0.00 MB) to /tmp/zipdeploy/extracted
14:36:03 eTendersTests: Updating submodules.
14:36:04 eTendersTests: Preparing deployment for commit id '5adc9561-c'.
14:36:04 eTendersTests: PreDeployment: context.CleanOutputPath False
14:36:04 eTendersTests: PreDeployment: context.OutputPath /home/site/wwwroot
14:36:04 eTendersTests: Repository path is /tmp/zipdeploy/extracted
14:36:04 eTendersTests: Running oryx build...
14:36:04 eTendersTests: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -p packagedir=.python_packages/lib/site-packages
14:36:06 eTendersTests: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
14:36:06 eTendersTests: You can report issues at https://github.com/Microsoft/Oryx/issues
14:36:06 eTendersTests: Oryx Version: 0.2.20210120.1, Commit: 66c7820d7df527aaffabd2563a49ad57930999c9, ReleaseTagName: 20210120.1
14:36:06 eTendersTests: Build Operation ID: |yJLJ95 U9fQ=.b4d71421_
14:36:06 eTendersTests: Repository Commit : 5adc9561-c840-47cb-83a4-9ff9451595ed
14:36:06 eTendersTests: Detecting platforms...
14:36:08 eTendersTests: Detected following platforms:
14:36:08 eTendersTests:   python: 3.9.7
14:36:08 eTendersTests: Version '3.9.7' of platform 'python' is not installed. Generating script to install it...
14:36:08 eTendersTests: Source directory     : /tmp/zipdeploy/extracted
14:36:08 eTendersTests: Destination directory: /home/site/wwwroot
14:36:08 eTendersTests: Downloading and extracting 'python' version '3.9.7' to '/tmp/oryx/platforms/python/3.9.7'...
14:36:09 eTendersTests: Downloaded in 1 sec(s).
14:36:09 eTendersTests: Verifying checksum...
14:36:09 eTendersTests: Extracting contents...
14:36:13 eTendersTests: Done in 5 sec(s).
14:36:13 eTendersTests: Python Version: /tmp/oryx/platforms/python/3.9.7/bin/python3.9
14:36:13 eTendersTests: Running pip install...
14:36:14 eTendersTests: [04:36:14 0000] Collecting azure-functions
14:36:14 eTendersTests: [04:36:14 0000]   Downloading azure_functions-1.11.2-py3-none-any.whl (206 kB)
14:36:14 eTendersTests: [04:36:14 0000] Installing collected packages: azure-functions
14:36:14 eTendersTests: [04:36:14 0000] Successfully installed azure-functions-1.11.2
14:36:15 eTendersTests: WARNING: You are using pip version 20.2.3; however, version 22.1.2 is available.
14:36:15 eTendersTests: You should consider upgrading via the '/tmp/oryx/platforms/python/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.
14:36:15 eTendersTests: Done in 2 sec(s).
14:36:15 eTendersTests: Preparing output...
14:36:15 eTendersTests: Copying files to destination directory '/home/site/wwwroot'...
14:36:15 eTendersTests: Done in 0 sec(s).
14:36:15 eTendersTests: Removing existing manifest file
14:36:15 eTendersTests: Creating a manifest file...
14:36:15 eTendersTests: Manifest file created.
14:36:15 eTendersTests: Done in 7 sec(s).
14:36:16 eTendersTests: Running post deployment command(s)...
14:36:16 eTendersTests: Generating summary of Oryx build
14:36:16 eTendersTests: Deployment Log file does not exist in /tmp/oryx-build.log
14:36:16 eTendersTests: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
14:36:16 eTendersTests: Triggering recycle (preview mode disabled).
14:36:16 eTendersTests: Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
14:36:16 eTendersTests: To check our service limit, please visit https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
14:36:16 eTendersTests: Creating placeholder blob for linux consumption function app...
14:36:16 eTendersTests: Malformed SCM_RUN_FROM_PACKAGE when uploading built content.
14:36:16 eTendersTests: Generating summary of Oryx build
14:36:16 eTendersTests: Deployment Log file does not exist in /tmp/oryx-build.log
14:36:16 eTendersTests: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
14:36:16 eTendersTests: Deployment Failed.
14:36:33 eTendersTests: Deployment failed.

CodePudding user response:

Uninstalled all python versions, VS Code, restarted.

Reinstall VSCODE, Python 3.9 (exactly) and created a new Function App (via VS CODE) and deployed.

CodePudding user response:

Deployment Log file does not exist in /tmp/oryx-build.log 14:36:16 eTendersTests: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build 14:36:16 eTendersTests: Deployment Failed. 14:36:33 eTendersTests: Deployment failed.

The Output Terminal error message shows that you may missed some packages in your project.

Make sure you are included all packages in your azure project. Recheck your requirement.txt file once before deploying you have included all necessary packages.

Restart your visual studio once if still you are not able to deploy your azure functions.

Results

enter image description here

  • Related