Closed claitonbecoco closed 3 years ago
@claitonbecoco Sorry to hear you are facing this issue. Could you please let me know if your repo has any Conda based environment.yaml
file or .ipynb
files? My suspicion is these files are being detected and Oryx is trying to create a conda envirnoment which is failing. Could you try removing these files and try again? We are currently working on a fix related to this.
I do have *.ipynb files, but no environment.yaml files. The remote builds have been working with the .ipynb files for a while. However, I figured out the file that was breaking the build. It was a .ipynb file that had a file name with spaces in it. Once this file was added to the .funcignore file, the build passed again.
Thanks Kichalla and Ed. We just did a major clean up on all our files, basically removing any other files that are not the pure Python code for the function and that seems to do the trick. it is strange as these files were there for a good time, but only started to fail now. Happy to close this as we found a way around it. but if it works to test the new version you are working on I can leave it open too. Kind regards, Claiton
!00% my issue. Awful debugging! please add more details to these error messages!
Removing .ipynb files from the directory works like a charm. But, I don't know why this is the issue here. Anyway thanks for the answer, it definitely saved my time :) !!!!
I am having this same issue. I removed all .ipynb files and there are no .yaml files, and I am still getting the error. Why is this happening?
Here is my error:
func azure functionapp publish irgpt-app --build remote
Getting site publishing info...
[2024-03-28T20:23:25.039Z] Starting the function app deployment...
Creating archive for current directory...
Performing remote build for functions project.
Deleting the old .python_packages directory
Uploading 6.02 MB [#########################################################]
Remote build in progress, please wait...
Updating submodules.
Preparing deployment for commit id 'f4ecb54b-0'.
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.7 -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: |KjAe6gu/HYo=.82b5dc9c_ Repository Commit : f4ecb54b-0c08-4e47-b298-b5ed1f211686
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...
[20:23:40+0000] Collecting azure-functions
[20:23:40+0000] Using cached azure_functions-1.18.0-py3-none-any.whl (173 kB)
[20:23:42+0000] Collecting aiohttp==3.8.5
[20:23:42+0000] Using cached aiohttp-3.8.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
[20:23:42+0000] Collecting azure-common==1.1.28
[20:23:42+0000] Using cached azure_common-1.1.28-py2.py3-none-any.whl (14 kB)
[20:23:42+0000] Collecting azure-core==1.29.4
[20:23:42+0000] Using cached azure_core-1.29.4-py3-none-any.whl (192 kB)
[20:23:42+0000] Collecting azure-cosmos
[20:23:42+0000] Using cached azure_cosmos-4.6.0-py3-none-any.whl (243 kB)
[20:23:42+0000] Collecting azure-identity==1.14.0
[20:23:42+0000] Using cached azure_identity-1.14.0-py3-none-any.whl (160 kB)[20:23:42+0000] Collecting azure-search-documents==11.4.0b6
[20:23:42+0000] Using cached azure_search_documents-11.4.0b6-py3-none-any.whl (306 kB)
[20:23:42+0000] Collecting azure-storage-blob==12.14.1
[20:23:42+0000] Using cached azure_storage_blob-12.14.1-py3-none-any.whl (383 kB)
[20:23:42+0000] Collecting certifi==2023.7.22
[20:23:42+0000] Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
[20:23:42+0000] Processing /usr/local/share/pip-cache/wheels/40/75/01/e6c444034338bde9c7947d3467807f889123465c2371e77418/docx2txt-0.8-py3-none-any.whl
[20:23:43+0000] Collecting fastapi
[20:23:43+0000] Using cached fastapi-0.110.0-py3-none-any.whl (92 kB)
[20:23:44+0000] Collecting numpy==1.26.0
[20:23:44+0000] Using cached numpy-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
[20:23:44+0000] Collecting openai<1.0.0
[20:23:44+0000] Using cached openai-0.28.1-py3-none-any.whl (76 kB)
[20:23:44+0000] Collecting openpyxl==3.1.2
[20:23:44+0000] Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
[20:23:44+0000] Collecting pdf2image==1.16.3
[20:23:44+0000] Using cached pdf2image-1.16.3-py3-none-any.whl (11 kB)
[20:23:45+0000] Collecting protobuf==3.20.*
[20:23:45+0000] Using cached protobuf-3.20.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
[20:23:46+0000] Collecting pydantic>=2.0.0
[20:23:46+0000] Using cached pydantic-2.6.4-py3-none-any.whl (394 kB)
[20:23:46+0000] Processing /usr/local/share/pip-cache/wheels/dc/86/cd/00e66b80d3a8b17e191bec95a0b34a1dbfa46975f1ec0dd6be/pydotenv-0.0.7-py3-none-any.whl
[20:23:46+0000] Collecting pypdf==3.16.1
[20:23:46+0000] Using cached pypdf-3.16.1-py3-none-any.whl (276 kB)
[20:23:46+0000] Collecting PyPDF2
[20:23:46+0000] Using cached pypdf2-3.0.1-py3-none-any.whl (232 kB)
[20:23:48+0000] Collecting regex==2023.8.8
[20:23:48+0000] Using cached regex-2023.8.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (771 kB)
[20:23:49+0000] Collecting reportlab
[20:23:49+0000] Using cached reportlab-4.1.0-py3-none-any.whl (1.9 MB)
[20:23:49+0000] Collecting requests==2.31.0
[20:23:49+0000] Using cached requests-2.31.0-py3-none-any.whl (62 kB)
[20:23:49+0000] Collecting scikit-learn==1.3.1
[20:23:49+0000] Using cached scikit_learn-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.9 MB)
[20:23:50+0000] Collecting Spire.PDF
[20:23:50+0000] Using cached Spire.Pdf-10.2.0-py3-none-manylinux1_x86_64.whl (41.5 MB)
[20:23:50+0000] Processing /usr/local/share/pip-cache/wheels/18/c6/df/218144b7f237c069be2146d9d2a708e1afbf06935110b65282/startup-0.4.0-py3-none-any.whl
[20:23:50+0000] Collecting tiktoken==0.5.1
[20:23:50+0000] Using cached tiktoken-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)
[20:23:51+0000] Collecting yarl<2.0,>=1.0
[20:23:51+0000] Using cached yarl-1.9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (304 kB)
[20:23:51+0000] Collecting aiosignal>=1.1.2
[20:23:51+0000] Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
[20:23:51+0000] Collecting attrs>=17.3.0
[20:23:51+0000] Using cached attrs-23.2.0-py3-none-any.whl (60 kB)
[20:23:52+0000] Collecting frozenlist>=1.1.1
[20:23:52+0000] Using cached frozenlist-1.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240 kB)
[20:23:52+0000] Collecting async-timeout<5.0,>=4.0.0a3
[20:23:52+0000] Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
[20:23:52+0000] Collecting charset-normalizer<4.0,>=2.0
[20:23:52+0000] Using cached charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
[20:23:53+0000] Collecting multidict<7.0,>=4.5
[20:23:53+0000] Using cached multidict-6.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (123 kB)
[20:23:53+0000] Collecting six>=1.11.0
[20:23:53+0000] Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
[20:23:53+0000] Collecting typing-extensions>=4.6.0
[20:23:53+0000] Using cached typing_extensions-4.10.0-py3-none-any.whl (33 kB)
[20:23:53+0000] Collecting msal<2.0.0,>=1.20.0
[20:23:53+0000] Using cached msal-1.28.0-py3-none-any.whl (102 kB)
[20:23:53+0000] Collecting msal-extensions<2.0.0,>=0.3.0
[20:23:53+0000] Using cached msal_extensions-1.1.0-py3-none-any.whl (19 kB)
[20:23:54+0000] Collecting cryptography>=2.5
[20:23:54+0000] Using cached cryptography-42.0.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB)
[20:23:55+0000] Collecting isodate>=0.6.0
[20:23:55+0000] Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB)
[20:23:55+0000] Collecting msrest>=0.7.1
[20:23:55+0000] Using cached msrest-0.7.1-py3-none-any.whl (85 kB)
[20:23:55+0000] Collecting starlette<0.37.0,>=0.36.3
[20:23:55+0000] Using cached starlette-0.36.3-py3-none-any.whl (71 kB)
[20:23:55+0000] Collecting tqdm
[20:23:55+0000] Using cached tqdm-4.66.2-py3-none-any.whl (78 kB)
[20:23:55+0000] Collecting et-xmlfile
[20:23:55+0000] Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
[20:23:56+0000] Collecting pillow
[20:23:56+0000] Using cached pillow-10.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)
[20:23:59+0000] Collecting pydantic-core==2.16.3
[20:23:59+0000] Using cached pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)
[20:24:00+0000] Collecting annotated-types>=0.4.0
[20:24:00+0000] Using cached annotated_types-0.6.0-py3-none-any.whl (12 kB)
[20:24:00+0000] Collecting chardet
[20:24:00+0000] Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
[20:24:00+0000] Collecting idna<4,>=2.5
[20:24:00+0000] Using cached idna-3.6-py3-none-any.whl (61 kB)
[20:24:00+0000] Collecting urllib3<3,>=1.21.1
[20:24:00+0000] Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
[20:24:00+0000] Collecting joblib>=1.1.1
[20:24:00+0000] Using cached joblib-1.3.2-py3-none-any.whl (302 kB)
[20:24:01+0000] Collecting scipy>=1.5.0
[20:24:01+0000] Using cached scipy-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.5 MB)
[20:24:01+0000] Collecting threadpoolctl>=2.0.0
[20:24:01+0000] Using cached threadpoolctl-3.4.0-py3-none-any.whl (17 kB)
[20:24:02+0000] Collecting plum-dispatch==1.7.4
[20:24:02+0000] Using cached plum_dispatch-1.7.4-py3-none-any.whl (24 kB)
[20:24:02+0000] Collecting PyJWT[crypto]<3,>=1.0.0
[20:24:02+0000] Using cached PyJWT-2.8.0-py3-none-any.whl (22 kB)
[20:24:02+0000] Collecting portalocker<3,>=1.0; platform_system != "Windows"
[20:24:02+0000] Using cached portalocker-2.8.2-py3-none-any.whl (17 kB)
[20:24:02+0000] Collecting packaging
[20:24:02+0000] Using cached packaging-24.0-py3-none-any.whl (53 kB)
[20:24:03+0000] Collecting cffi>=1.12; platform_python_implementation != "PyPy"
[20:24:03+0000] Using cached cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
[20:24:03+0000] Collecting requests-oauthlib>=0.5.0
[20:24:03+0000] Using cached requests_oauthlib-2.0.0-py2.py3-none-any.whl (24 kB)
[20:24:03+0000] Collecting anyio<5,>=3.4.0
[20:24:03+0000] Using cached anyio-4.3.0-py3-none-any.whl (85 kB)
[20:24:03+0000] Collecting pycparser
[20:24:03+0000] Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
[20:24:03+0000] Collecting oauthlib>=3.0.0
[20:24:03+0000] Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
[20:24:03+0000] Collecting sniffio>=1.1
[20:24:03+0000] Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
[20:24:03+0000] Collecting exceptiongroup>=1.0.2; python_version < "3.11"
[20:24:03+0000] Using cached exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
[20:24:04+0000] Installing collected packages: azure-functions, multidict, idna, yarl, frozenlist, aiosignal, attrs, async-timeout, charset-normalizer, aiohttp, azure-common, six, certifi, urllib3, requests, typing-extensions, azure-core, azure-cosmos, pycparser, cffi, cryptography, PyJWT, msal, portalocker, packaging, msal-extensions, azure-identity, isodate, azure-search-documents, oauthlib, requests-oauthlib, msrest, azure-storage-blob, docx2txt, sniffio, exceptiongroup, anyio, starlette, pydantic-core, annotated-types, pydantic, fastapi, numpy, tqdm, openai, et-xmlfile, openpyxl, pillow, pdf2image, protobuf, pydotenv, pypdf, PyPDF2, regex, chardet, reportlab, joblib, scipy, threadpoolctl,
scikit-learn, plum-dispatch, Spire.PDF, startup, tiktoken
[20:24:28+0000] Successfully installed PyJWT-2.8.0 PyPDF2-3.0.1 Spire.PDF-10.2.0 aiohttp-3.8.5 aiosignal-1.3.1 annotated-types-0.6.0 anyio-4.3.0 async-timeout-4.0.3 attrs-23.2.0 azure-common-1.1.28 azure-core-1.29.4 azure-cosmos-4.6.0 azure-functions-1.18.0 azure-identity-1.14.0 azure-search-documents-11.4.0b6
azure-storage-blob-12.14.1 certifi-2023.7.22 cffi-1.16.0 chardet-5.2.0 charset-normalizer-3.3.2 cryptography-42.0.5 docx2txt-0.8 et-xmlfile-1.1.0 exceptiongroup-1.2.0 fastapi-0.110.0 frozenlist-1.4.1 idna-3.6 isodate-0.6.1 joblib-1.3.2 msal-1.28.0 msal-extensions-1.1.0 msrest-0.7.1 multidict-6.0.5 numpy-1.26.0
oauthlib-3.2.2 openai-0.28.1 openpyxl-3.1.2 packaging-24.0 pdf2image-1.16.3 pillow-10.2.0 plum-dispatch-1.7.4 portalocker-2.8.2 protobuf-3.20.3 pycparser-2.21 pydantic-2.6.4 pydantic-core-2.16.3 pydotenv-0.0.7 pypdf-3.16.1 regex-2023.8.8 reportlab-4.1.0 requests-2.31.0 requests-oauthlib-2.0.0 scikit-learn-1.3.1 scipy-1.12.0 six-1.16.0 sniffio-1.3.1 starlette-0.36.3 startup-0.4.0 threadpoolctl-3.4.0 tiktoken-0.5.1 tqdm-4.66.2 typing-extensions-4.10.0 urllib3-2.2.1
yarl-1.9.4
WARNING: You are using pip version 20.2.3; however, version 24.0 is available.You should consider upgrading via the '/tmp/oryx/platforms/python/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.
Done in 48 sec(s).
Preparing output...
Copying files to destination directory '/home/site/wwwroot'... Done in 9 sec(s).
Removing existing manifest file Creating a manifest file... Manifest file created.
Done in 58 sec(s). Running post deployment command(s)...
Generating summary of Oryx build Deployment Log file does not exist in /tmp/oryx-build.log The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build Triggering recycle (preview mode disabled). Linux Consumption plan has a 1.5 GB memory limit on a remote build container. To check our service limit, please visit https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits Writing the artifacts to a squashfs file Parallel mksquashfs: Using 1 processor Creating 4.0 filesystem on /home/site/artifacts/functionappartifact.squashfs, block size 131072.
[=========================- ] 5700/13198 43% [===========================================================] 13198/13198 100%
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 150543.60 Kbytes (147.02 Mbytes)
30.78% of uncompressed filesystem size (489021.58 Kbytes)
Inode table size 116346 bytes (113.62 Kbytes)
30.24% of uncompressed inode table size (384706 bytes)
Directory table size 117491 bytes (114.74 Kbytes)
35.05% of uncompressed directory table size (335250 bytes)
Number of duplicate files found 371
Number of inodes 11624
Number of files 10589
Number of fragments 1026
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1035
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
Creating placeholder blob for linux consumption function app...
SCM_RUN_FROM_PACKAGE placeholder blob scm-latest-IRGPT-app.zip located
Uploading built content /home/site/artifacts/functionappartifact.squashfs for
linux consumption function app...
Generating summary of Oryx build Deployment Log file does not exist in /tmp/oryx-build.log The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build Deployment Failed. deployer = Push-Deployer deploymentPath = Functions App ZipDeploy. Extract zip. Remote build. Remote build failed!
Bug Report
We have a Python Azure Function App we run on a Consumption Plan, and for the past 3 week the deployment from our local environment started to fail with the message
Remote build failed!
And the inner message:/tmp/BuildScriptGenerator/161dc4ea83d94d2fb8340c3ec25a5e85/build.sh: line 91: source: filename argument required
We tried to create a new Function App, both Consumption Plan or App Service Plan. Using Git deployment, VS Code Deployment or manual deployment from the terminal, all result on the same error it runs Oryx.
The last approach we took was to disable Oryx at all by setting
ENABLE_ORYX_BUILD
tofalse
which does make the deployment succeed, but unfortunately the function then returns 500 (HTTP Trigger) with no message on logs apart from failure and the execution GUID.This means that for the past 3 weeks we are unable to update our Azure function with the latest version, or even creating a replacement Function App.
The function runs completely fine on our local dev environment.
The way we been trying and repro the problem is doing manual deployment, this is the latest execution and full error message: