azure-functions-core-tools
azure-functions-core-tools copied to clipboard
Here's the azure CLI we are using to publish to a function app. func azure functionapp publish function_app_name --python --build remote We have a situation where requirements.txt was missing credentials for the extra-index-url. Expectedly the function build failed. How ever the cli still returned a zero exit code. We are expecting it to return non zero code as the build failed.
Related command: func azure functionapp publish function_app_name --python --build
Describe the bug:
We have a situation where requirements.txt was missing credentials for the extra-index-url. Expectedly the function build failed. How ever the cli still returned a zero exit code. We are expecting it to return non zero code as the build failed To Reproduce Upon running the below command func azure functionapp publish function_app_name --python --build When there was build failure, it was still exiting with zero Exit code.
Expected behavior: We have a situation where requirements.txt was missing credentials for the extra-index-url. Expectedly the function build failed. How ever the cli still returned a zero exit code. We are expecting it to return non zero code as the build failed Environment summary Here are the logs from one such deployment provided by Cx. Stdout from azure publish: Local python version '3.7.13' is different from the version expected for your deployed Function App. This may result in 'ModuleNotFound' errors in Azure Functions. Please create a Python Function App for version 3.7 or change the virtual environment on your local machine to match 'python|3.9'. Getting site publishing info... Creating archive for current directory... Performing remote build for functions project. Deleting the old .python_packages directory Uploading 14.21 KB []Remote build in progress, please wait... Updating submodules. Preparing deployment for commit id 'a1f71fac-8'. PreDeployment: context.CleanOutputPath False PreDeployment: context.OutputPath /home/site/wwwroot Repository path is /tmp/zipdeploy/extracted Running oryx build... Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -p packagedir=.python_packages/lib/site-packages Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues Oryx Version: 0.2.20210120.1, Commit: 66c7820d7df527aaffabd2563a49ad57930999c9, ReleaseTagName: 20210120.1 Build Operation ID: |ns+W35DoPpA=.5b6b2754_ Repository Commit : a1f71fac-8cc6-4531-a8fa-1828f5665d31 Detecting platforms... Detected following platforms: python: 3.9.7 Source directory : /tmp/zipdeploy/extracted Destination directory: /home/site/wwwroot Python Version: /tmp/oryx/platforms/python/3.9.7/bin/python3.9 Running pip install... [08:27:36+0000] Looking in indexes: https://pypi.org/simple, https://vinayak.mali:****@cognite.jfrog.io/cognite/api/pypi/functions-test/simple Failed to retrieve remote build status, please visit https://function8593153690587966.scm.azurewebsites.net/api/deployments
Additional context: This might be considered as a design change as it's not returning non Zero code, instead it's returning Zero code even when there was build failed.