Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
331 stars 100 forks source link

fix: Update function directory in load request to use /home/site/wwwroot #1480

Closed gavin-aguiar closed 2 months ago

gavin-aguiar commented 2 months ago

Description

This fixes a bug introduced in https://github.com/Azure/azure-functions-python-worker/pull/1446.

For function apps using FWPC > 1 and using blueprints, the second worker does not get the metadata request. In the load request, the worker uses the function directory sent from the host. This works for functions apps without blueprints since the func dir is always /home/site/wwwroot. For blueprints, the function dir is /home/site/wwwroot/. So in the load request, the worker tries to find function_app.py in /home/site/wwwroot/ and it fails indexing. Fix is to always use /home/site/wwwroot for v2 programming model

Fixes #


PR information

Quality of Code and Contribution Guidelines