Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Azure Functions works locally but fails upon deployment with "1 functions found (Custom) 0 functions loaded" #9720

Closed
seeess1 opened this issue Dec 4, 2023 · 32 comments
Assignees
Labels

Comments

@seeess1
Copy link

seeess1 commented Dec 4, 2023

I have an Azure Function that works locally. But when I deploy it to the cloud, it apparently doesn't load and therefore doesn't execute. The logs from the deployed code show: 1 functions found (Custom) 0 functions loaded message. Here's what's happening in more detail:

My application is running on Python 3.9. When I run it locally using the Run and Debug mode in VS Code, I can see it executes successfully in the terminal output.

Then I try deploying from VS Code to my Function App:

image

And the terminal output shows the deployment is successful:

Deployment successful. deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.

But when I go to the Function App in the Azure Portal, no functions are listed there:

image

And the log stream shows:

Connected!
2023-12-01T21:08:00Z   [Verbose]   Initiating background SyncTriggers operation
2023-12-01T21:08:00Z   [Information]   Loading functions metadata
2023-12-01T21:08:00Z   [Information]   Reading functions metadata (Custom)
2023-12-01T21:08:00Z   [Information]   1 functions found (Custom)
2023-12-01T21:08:00Z   [Information]   0 functions loaded
2023-12-01T21:08:00Z   [Information]   Loading functions metadata
2023-12-01T21:08:00Z   [Information]   Reading functions metadata (Custom)
2023-12-01T21:08:00Z   [Information]   1 functions found (Custom)
2023-12-01T21:08:00Z   [Information]   0 functions loaded
2023-12-01T21:10:31Z   [Verbose]   Received request to drain the host
2023-12-01T21:10:31Z   [Information]   DrainMode mode enabled
2023-12-01T21:10:31Z   [Information]   Calling StopAsync on the registered listeners
2023-12-01T21:10:31Z   [Information]   Call to StopAsync complete, registered listeners are now stopped

So it seems like the code is deploying but the Function App can't load it for some reason.

Have looked around for a solution but no luck yet. I found this thread but it looks like that was specifically related to functions failing locally, whereas my function runs locally but not when deployed to the cloud. Hoping this thread can help me figure out my particular issue.

  • Language and version: Python 3.9
  • Function App runtime version: 4.27.5.5
  • Region: East US
@bhagyshricompany bhagyshricompany self-assigned this Dec 5, 2023
@bhagyshricompany
Copy link

will check and update.Thanks for reporting.

@drdec99
Copy link

drdec99 commented Dec 5, 2023

I am seeing the same issue, however my function in written in C# .NET 8 isolated worker.
The message A function allow list has been specified, excluding all but the following functions: [function name] is is in the trace log, but the function is found, but not loaded

@seeess1
Copy link
Author

seeess1 commented Dec 5, 2023

will check and update.Thanks for reporting.

Thank you!

@seeess1
Copy link
Author

seeess1 commented Dec 6, 2023 via email

@bhagyshricompany
Copy link

bhagyshricompany commented Dec 6, 2023

I deployed from both option vs2022 and vscode deployed perfectally.
image

image https://github.com/Azure/azure-functions-python-worker/issues/1374 you can share function invocation id,appname,timestamp ,region so I can check cause of that.

@seeess1
Copy link
Author

seeess1 commented Dec 6, 2023

So you're saying I should just deploy again from VS Code?

@bhagyshricompany
Copy link

yes and share other details

@jonmunm
Copy link

jonmunm commented Dec 7, 2023

The same here
Python 3.11
Linux Function
Event Hub trigger
Everything works fine locally, deployed via Github Actions

image

And the function is not loaded

image

Edit:

After deployed it with VS Code, the function started listening to Event hub. These are the logs:

12:45:35 AM tracks-functions: Added feature flag "EnableWorkerIndexing" because it is required for the new programming model
12:45:37 AM tracks-functions: Verifying that app settings have propagated... (Attempt 1/12)
12:45:39 AM tracks-functions: Starting deployment...
12:45:39 AM tracks-functions: Creating zip package...
12:45:40 AM tracks-functions: Zip package size: 31 kB
12:45:42 AM tracks-functions: Fetching changes.
12:45:44 AM tracks-functions: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/53a426fe-29e7-4cc1-aabf-556e24d540ed.zip (0.04 MB) to /tmp/zipdeploy/extracted
12:45:46 AM tracks-functions: Updating submodules.
12:45:47 AM tracks-functions: Preparing deployment for commit id 'd6f886db-4'.
12:45:47 AM tracks-functions: PreDeployment: context.CleanOutputPath False
12:45:47 AM tracks-functions: PreDeployment: context.OutputPath /home/site/wwwroot
12:45:47 AM tracks-functions: Repository path is /tmp/zipdeploy/extracted
12:45:47 AM tracks-functions: Running oryx build...
12:45:47 AM tracks-functions: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.11 -p packagedir=.python_packages/lib/site-packages
12:45:48 AM tracks-functions: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
12:45:48 AM tracks-functions: You can report issues at https://github.com/Microsoft/Oryx/issues
12:45:48 AM tracks-functions: Oryx Version: 0.2.20230210.1, Commit: a49c8f6b8abbe95b4356552c4c884dea7fd0d86e, ReleaseTagName: 20230210.1
12:45:48 AM tracks-functions: Build Operation ID: 9f02b2551fc2e615
12:45:48 AM tracks-functions: Repository Commit : d6f886db-455b-435d-aced-fd4cca9de140
12:45:48 AM tracks-functions: OS Type           : bullseye
12:45:48 AM tracks-functions: Image Type        : githubactions
12:45:48 AM tracks-functions: Detecting platforms...
12:45:49 AM tracks-functions: Detected following platforms:
12:45:49 AM tracks-functions:   python: 3.11.6
12:45:49 AM tracks-functions: Version '3.11.6' of platform 'python' is not installed. Generating script to install it...
12:45:49 AM tracks-functions: Source directory     : /tmp/zipdeploy/extracted
12:45:49 AM tracks-functions: Destination directory: /home/site/wwwroot
12:45:49 AM tracks-functions: Downloading and extracting 'python' version '3.11.6' to '/tmp/oryx/platforms/python/3.11.6'...
12:45:49 AM tracks-functions: Detected image debian flavor: bullseye.
12:45:50 AM tracks-functions: Downloaded in 1 sec(s).
12:45:50 AM tracks-functions: Verifying checksum...
12:45:51 AM tracks-functions: Extracting contents...
12:45:56 AM tracks-functions: performing sha512 checksum for: python...
12:45:56 AM tracks-functions: Done in 7 sec(s).
12:45:56 AM tracks-functions: image detector file exists, platform is python..
12:45:56 AM tracks-functions: OS detector file exists, OS is bullseye..
12:45:56 AM tracks-functions: Python Version: /tmp/oryx/platforms/python/3.11.6/bin/python3.11
12:45:56 AM tracks-functions: Creating directory for command manifest file if it does not exist
12:45:57 AM tracks-functions: Removing existing manifest file
12:45:57 AM tracks-functions: Running pip install...
12:46:20 AM tracks-functions: Done in 23 sec(s).
12:46:20 AM tracks-functions: [03:45:57+0000] Collecting azure-functions
12:46:20 AM tracks-functions: [03:45:57+0000]   Downloading azure_functions-1.17.0-py3-none-any.whl (165 kB)
12:46:20 AM tracks-functions: [03:45:57+0000] Collecting azure-storage-blob
12:46:20 AM tracks-functions: [03:45:57+0000]   Downloading azure_storage_blob-12.19.0-py3-none-any.whl (394 kB)
12:46:20 AM tracks-functions: [03:45:58+0000] Collecting pandas==2.1.3
12:46:20 AM tracks-functions: [03:45:58+0000]   Downloading pandas-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
12:46:20 AM tracks-functions: [03:45:59+0000] Collecting pyarrow===14.0.1
12:46:20 AM tracks-functions: [03:45:59+0000]   Downloading pyarrow-14.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (38.0 MB)
12:46:20 AM tracks-functions: [03:46:00+0000] Collecting tzdata>=2022.1
12:46:20 AM tracks-functions: [03:46:00+0000]   Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB)
12:46:20 AM tracks-functions: [03:46:00+0000] Collecting python-dateutil>=2.8.2
12:46:20 AM tracks-functions: [03:46:00+0000]   Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
12:46:20 AM tracks-functions: [03:46:00+0000] Collecting pytz>=2020.1
12:46:20 AM tracks-functions: [03:46:00+0000]   Downloading pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
12:46:20 AM tracks-functions: [03:46:01+0000] Collecting numpy<2,>=1.23.2
12:46:20 AM tracks-functions: [03:46:01+0000]   Downloading numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
12:46:20 AM tracks-functions: [03:46:02+0000] Collecting typing-extensions>=4.3.0
12:46:20 AM tracks-functions: [03:46:02+0000]   Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)
12:46:20 AM tracks-functions: [03:46:02+0000] Collecting isodate>=0.6.1
12:46:20 AM tracks-functions: [03:46:02+0000]   Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
12:46:20 AM tracks-functions: [03:46:02+0000] Collecting azure-core<2.0.0,>=1.28.0
12:46:20 AM tracks-functions: [03:46:02+0000]   Downloading azure_core-1.29.5-py3-none-any.whl (192 kB)
12:46:20 AM tracks-functions: [03:46:03+0000] Collecting cryptography>=2.1.4
12:46:20 AM tracks-functions: [03:46:03+0000]   Downloading cryptography-41.0.7-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
12:46:20 AM tracks-functions: [03:46:03+0000] Collecting requests>=2.18.4
12:46:20 AM tracks-functions: [03:46:03+0000]   Downloading requests-2.31.0-py3-none-any.whl (62 kB)
12:46:20 AM tracks-functions: [03:46:03+0000] Collecting six>=1.11.0
12:46:20 AM tracks-functions: [03:46:03+0000]   Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
12:46:20 AM tracks-functions: [03:46:04+0000] Collecting cffi>=1.12
12:46:20 AM tracks-functions: [03:46:04+0000]   Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (464 kB)
12:46:20 AM tracks-functions: [03:46:04+0000] Collecting pycparser
12:46:20 AM tracks-functions: [03:46:04+0000]   Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
12:46:20 AM tracks-functions: [03:46:04+0000] Collecting certifi>=2017.4.17
12:46:20 AM tracks-functions: [03:46:04+0000]   Downloading certifi-2023.11.17-py3-none-any.whl (162 kB)
12:46:20 AM tracks-functions: [03:46:04+0000] Collecting idna<4,>=2.5
12:46:20 AM tracks-functions: [03:46:04+0000]   Downloading idna-3.6-py3-none-any.whl (61 kB)
12:46:20 AM tracks-functions: [03:46:05+0000] Collecting charset-normalizer<4,>=2
12:46:20 AM tracks-functions: [03:46:05+0000]   Downloading charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB)
12:46:20 AM tracks-functions: [03:46:05+0000] Collecting urllib3<3,>=1.21.1
12:46:20 AM tracks-functions: [03:46:05+0000]   Downloading urllib3-2.1.0-py3-none-any.whl (104 kB)
12:46:20 AM tracks-functions: [03:46:05+0000] Installing collected packages: urllib3, pycparser, idna, charset-normalizer, certifi, typing-extensions, six, requests, cffi, tzdata, pytz, python-dateutil, numpy, isodate, cryptography, azure-core, pyarrow, pandas, azure-storage-blob, azure-functions
12:46:20 AM tracks-functions: [03:46:20+0000] Successfully installed azure-core-1.29.5 azure-functions-1.17.0 azure-storage-blob-12.19.0 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-3.3.2 cryptography-41.0.7 idna-3.6 isodate-0.6.1 numpy-1.26.2 pandas-2.1.3 pyarrow-14.0.1 pycparser-2.21 python-dateutil-2.8.2 pytz-2023.3.post1 requests-2.31.0 six-1.16.0 typing-extensions-4.8.0 tzdata-2023.3 urllib3-2.1.0
12:46:20 AM tracks-functions: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
12:46:20 AM tracks-functions: WARNING: You are using pip version 21.2.4; however, version 23.3.1 is available.
12:46:20 AM tracks-functions: You should consider upgrading via the '/tmp/oryx/platforms/python/3.11.6/bin/python3.11 -m pip install --upgrade pip' command.
12:46:20 AM tracks-functions: Not a vso image, so not writing build commands
12:46:20 AM tracks-functions: Preparing output...
12:46:20 AM tracks-functions: Copying files to destination directory '/home/site/wwwroot'...
12:46:23 AM tracks-functions: Done in 3 sec(s).
12:46:23 AM tracks-functions: Removing existing manifest file
12:46:23 AM tracks-functions: Creating a manifest file...
12:46:23 AM tracks-functions: Manifest file created.
12:46:23 AM tracks-functions: Copying .ostype to manifest output directory.
12:46:23 AM tracks-functions: Done in 34 sec(s).
12:46:23 AM tracks-functions: Running post deployment command(s)...
12:46:23 AM tracks-functions: Generating summary of Oryx build
12:46:23 AM tracks-functions: Deployment Log file does not exist in /tmp/oryx-build.log
12:46:23 AM tracks-functions: The logfile at /tmp/oryx-build.log is empty. Unable to fetch the summary of build
12:46:23 AM tracks-functions: Triggering recycle (preview mode disabled).
12:46:23 AM tracks-functions: Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
12:46:23 AM tracks-functions: To check our service limit, please visit https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
12:46:23 AM tracks-functions: Writing the artifacts to a squashfs file
12:46:43 AM tracks-functions: Parallel mksquashfs: Using 1 processor
12:46:43 AM tracks-functions: Creating 4.0 filesystem on /home/site/artifacts/functionappartifact.squashfs, block size 131072.
12:47:08 AM tracks-functions: [====================|                                         ] 2900/8822  32%
12:47:18 AM tracks-functions: [===============================================-              ] 6800/8822  77%
12:47:19 AM tracks-functions: [=============================================================\] 8822/8822 100%
12:47:19 AM tracks-functions: Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
12:47:19 AM tracks-functions: 	compressed data, compressed metadata, compressed fragments,
12:47:19 AM tracks-functions: 	compressed xattrs, compressed ids
12:47:19 AM tracks-functions: 	duplicates are removed
12:47:19 AM tracks-functions: Filesystem size 90209.90 Kbytes (88.10 Mbytes)
12:47:19 AM tracks-functions: 	29.65% of uncompressed filesystem size (304276.92 Kbytes)
12:47:19 AM tracks-functions: Inode table size 77306 bytes (75.49 Kbytes)
12:47:19 AM tracks-functions: 	29.22% of uncompressed inode table size (264582 bytes)
12:47:19 AM tracks-functions: Directory table size 78226 bytes (76.39 Kbytes)
12:47:19 AM tracks-functions: 	37.56% of uncompressed directory table size (208257 bytes)
12:47:19 AM tracks-functions: Number of duplicate files found 728
12:47:19 AM tracks-functions: Number of inodes 8040
12:47:19 AM tracks-functions: Number of files 7342
12:47:20 AM tracks-functions: Number of fragments 786
12:47:20 AM tracks-functions: Number of symbolic links  0
12:47:20 AM tracks-functions: Number of device nodes 0
12:47:20 AM tracks-functions: Number of fifo nodes 0
12:47:20 AM tracks-functions: Number of socket nodes 0
12:47:20 AM tracks-functions: Number of directories 698
12:47:20 AM tracks-functions: Number of ids (unique uids + gids) 1
12:47:20 AM tracks-functions: Number of uids 1
12:47:20 AM tracks-functions: 	root (0)
12:47:20 AM tracks-functions: Number of gids 1
12:47:20 AM tracks-functions: 	root (0)
12:47:20 AM tracks-functions: Creating placeholder blob for linux consumption function app...
12:47:20 AM tracks-functions: SCM_RUN_FROM_PACKAGE placeholder blob scm-latest-tracks-functions.zip located
12:47:20 AM tracks-functions: Uploading built content /home/site/artifacts/functionappartifact.squashfs for linux consumption function app...
12:47:22 AM tracks-functions: Resetting all workers for tracks-functions.azurewebsites.net
12:47:22 AM tracks-functions: Deployment successful. deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
12:47:34 AM tracks-functions: Syncing triggers...
12:47:44 AM tracks-functions: Querying triggers...
12:47:50 AM tracks-functions: No HTTP triggers found.

And now is loaded

image

Why didn't work by using CI/CD with github actions? These are the logs from github

image

@bhagyshricompany
Copy link

@patelchandni pls comment and confirm.

@seeess1
Copy link
Author

seeess1 commented Dec 7, 2023

Hey @jonmunm I made a small breakthrough yesterday. Not a very satisfying conclusion but it looks like switching from psycopg2 to psycopg unbroke things. More details below in case they're useful:

My Python script connects to a Postgres DB so I was using psycopg2 to make that connection. Then we were doing some testing and I tried switching from psycopg2 to psycopg (my requirements.txt file includes both psycopg and psycopg-binary). It worked locally so I deployed to my function app and now it works.

I still don't fully understand why this change resulted in a successful build. For one thing, both psycopg2 and psycopg are supposed to work with Python 3.7 and above (I'm running Python 3.9).

But the bigger problem I have with this process is that there was basically no visibility into the build failure within the function app. The logs simply showed "1 functions found (Custom) 0 functions loaded". We had no idea why they weren't loading and why the function would run locally but not in the cloud.

@jonmunm
Copy link

jonmunm commented Dec 7, 2023

Yes @seeess1 , of course. Somehow, deploying via VS Code make the function visible and loadable in Azure. That's why I posted both logs, from VS Code Deploy and Github actions, assuming that the last one is not doing "something" so that the function is loaded and visible ...

I'm also have no idea why this happend. I think that is a third-party integration. That is, a VS Code deploy is "better" prepared to get things ready in Azure, and Github is not.

That's way I'm running a test preparing DevOps Pipeline, which has fully integration with Azure.

@bhagyshricompany
Copy link

Is there problem solved?

@borislavml
Copy link

The same problem is here with .NET 8 isolated deployed from Azure DevOps. Is there any progress on tracing the cause of this issue?

@geoffbrucepayne
Copy link

geoffbrucepayne commented Dec 21, 2023

Same issue with Javascript v4 model deployed from VS Code.

In my case I got it working but I'm still trying to determine if it was some kind of source code issue with one of the modules or was resolved by updating durable-functions dependency to the preview "alpha" package.

@montaro
Copy link

montaro commented Jan 3, 2024

/bot not-stale

@microsoft-github-policy-service microsoft-github-policy-service bot added bot: do not close Prevents bot automation from closing issues Needs: Attention 👋 and removed no-recent-activity labels Jan 3, 2024
@montaro
Copy link

montaro commented Jan 3, 2024

What should be the proper way to understand why the Azure Function can't load the found functions?!

@davidmaness
Copy link

Would also love to know the proper way to understand why the Azure Function can't load the found functions.

@prashantguleria
Copy link

prashantguleria commented Jan 16, 2024

I faced the same issue, I was able to fix it after correcting the zip file structure.
The difference was that root directory was also included in the zip file causing the azure function host to detect 1 function and load 0 functions.

I am using Azure devops pipeline to create the zip file.

i unchecked this option "Prepend root folder name to archive paths" and it started to work properly.

image

@raphael-zenhaeusern-legic

For anyone running into a similar issue but with dotnet: additionally to fixing the file structure of the zip, make sure your pipeline copies all the files from the build. This includes the hidden .azurefunctions folder that is created.

@k-krupka
Copy link

worked for me, cleanup of the artifact and setting it up from scratch helped

to be more exact in my case, instead of building function app artifact locally, i pushed the responsibility to azure:

func azure functionapp publish FUNC_APP_NAME --subscription SUB_ID --publish-local-settings

@mauibar
Copy link

mauibar commented Mar 18, 2024

Same issue ! I get 0 Functions loaded where as everything works locally. Happened several times, is there a way to get detailed logs of the issue and not the cryptic "0 function loaded" ??

@shanegray
Copy link

The same issue - tried with a fresh project, deploying from the command line, deploying from VS Code. None works - just with the logs:

2024-03-26T16:07:42.854 [Information] Loading functions metadata
2024-03-26T16:07:42.855 [Information] Reading functions metadata (Custom)
2024-03-26T16:07:42.855 [Information] 1 functions found (Custom)
2024-03-26T16:07:42.855 [Information] 0 functions loaded

@DfirJos
Copy link

DfirJos commented Apr 10, 2024

Same issue here:

2024-04-10T07:27:08Z   [Information]   1 functions found (Custom)
2024-04-10T07:27:08Z   [Information]   0 functions loaded
2024-04-10T07:27:08Z   [Information]   Host Status: {
  "id": "dfir-cluster-adx-af-dataingest",
  "state": "Running",
  "version": "4.31.1.1",
  "versionDetails": "4.31.1+eb76715a57649d269232d1375a7a2c23ee73dd0a",
  "platformVersion": "101.1.7.100",
  "instanceId": "132c47f9c17d541bd24c8bd97bcb0536d1eee1f5a0f74b1749a54315f50ef16a",
  "computerName": "ln0sdlwk000A64",
  "processUptime": 149226,
  "functionAppContentEditingState": "Unknown",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "4.15.0"
  }
}

I'm deploying it via Visual Studio. It looks like it is an issue with the required libraries in 'requirements.txt', as deploying a script without additional libraries (next to azure.functions and logging) works. Is there a way to troubleshoot which library is causing the issue without having to test one by one?

@attiamani98
Copy link

did you find solutions ?

@GGA-PERSO
Copy link

same issue for me.
AF works locally, I publish it on azure => deployment successful but no function loaded
Please help us !

@geoffbrucepayne
Copy link

geoffbrucepayne commented Apr 24, 2024 via email

@jonmunm
Copy link

jonmunm commented May 1, 2024

as @k-krupka did, I stopped trying to deploy via DevOps Pipeline and I'm using Functions CLI to deploy and it works perfectly

@tibrown
Copy link

tibrown commented May 9, 2024

This is still happening! Reopen and tell us what is going on

@EdenGoforIt
Copy link

Same issue with dotnet-isolated|8.0. 1 functions found , 0 functions loaded.

@pk556
Copy link

pk556 commented May 24, 2024

Hi all,

I was running into the same issues mentioned above. I was using the Deployment Center in the Azure Function App to connect it to my GitHub, and no matter which packages I installed inside my requirements.txt file—even something as common as requests—the function trigger would not show up in the portal when deployed because it couldn't find the packages.

The solution I found was to zip up the library packages during the GitHub build instead of letting Oryx do the remote build. Here are the changes I made to the GitHub workflow file to achieve this:

  1. Inside the "Install dependencies" step of the build job, change the pip install command
    pip install --target=".python_packages/lib/site-packages" -r requirements.txt
  2. Inside the "Zip artifact for deployment" step of the build job, change the zip command so it includes the python_packages
    zip release.zip .python_packages ./* -r
  3. Inside the "Deploy to Azure Functions" step of the deploy job, change these values so it doesn't do a remote build
    scm-do-build-during-deployment: false
    enable-oryx-build: false

This way you can still use the V2 programming model and can use Github Actions instead of VSCode to deploy to the Azure Function.

@ianmcvann
Copy link

worked for me, cleanup of the artifact and setting it up from scratch helped

to be more exact in my case, instead of building function app artifact locally, i pushed the responsibility to azure:

func azure functionapp publish FUNC_APP_NAME --subscription SUB_ID --publish-local-settings

This is what fixed it for me. Appreciate it! I believe this happens if you're trying to load config variables from ENV variables and they're not set.

@jonmunm
Copy link

jonmunm commented Jun 17, 2024

Working with Functions CLI to deploy is the only way it is working right now.
This thread should be reopened and deliver a ticket or whatever the procedure is to pay it attention to have a solution on DevOps and the remaining deployment methods.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests