Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0a1ade4
Updating lc image to flex
gavin-aguiar Oct 20, 2025
b8dfeee
Fixing test
gavin-aguiar Oct 20, 2025
6f777d1
Mounting proxy worker for 3.13 tests
gavin-aguiar Oct 20, 2025
8449783
Debug logging fix
gavin-aguiar Oct 20, 2025
5fb3177
Adding py314
gavin-aguiar Oct 22, 2025
bfd59ee
Updated image repo for flexconsumption
gavin-aguiar Oct 27, 2025
888f387
Merge branch 'dev' of github.com:Azure/azure-functions-python-worker …
gavin-aguiar Dec 1, 2025
7736488
Merge branch 'dev' into gaaguiar/flex_tests
gavin-aguiar Dec 1, 2025
28bc120
Token updates for flex
gavin-aguiar Dec 2, 2025
ac43611
erge branch 'gaaguiar/flex_tests' of github.com:Azure/azure-functions…
gavin-aguiar Dec 2, 2025
411c708
build: add 3.14 to tests (#1787)
hallvictoria Dec 2, 2025
715a9dc
chore: remove 3.7 & 3.8 from worker nuget (#1810)
hallvictoria Dec 8, 2025
52dd1f5
fix: Py3.13+ logging issue with operation_Name (#1811)
gavin-aguiar Dec 9, 2025
58b8aad
build: update runtimes/v2 version to 1.1.0b4 (#1812)
hallvictoria Dec 9, 2025
3533587
fix: Remove packaging library (#1816)
gavin-aguiar Dec 10, 2025
0a68393
build: update version to 4.41.2 (#1817)
hallvictoria Dec 10, 2025
69ade8e
build: add test only using worker dependencies (#1818)
hallvictoria Dec 18, 2025
8a45d8f
Fix: Update timezone in reload request (#1819)
gavin-aguiar Dec 18, 2025
fb8afd7
Updating lc image to flex
gavin-aguiar Oct 20, 2025
5530e08
Fixing test
gavin-aguiar Oct 20, 2025
fb11518
Mounting proxy worker for 3.13 tests
gavin-aguiar Oct 20, 2025
1d64690
Debug logging fix
gavin-aguiar Oct 20, 2025
25ce77c
Adding py314
gavin-aguiar Oct 22, 2025
31a0527
Updated image repo for flexconsumption
gavin-aguiar Oct 27, 2025
1ec1695
Token updates for flex
gavin-aguiar Dec 2, 2025
f963920
Flex tests
gavin-aguiar Feb 27, 2026
b6d5713
Resolved conflicts
gavin-aguiar Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/templates/official/jobs/ci-lc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:

strategy:
matrix:
Python39:
PYTHON_VERSION: '3.9'
Python310:
PYTHON_VERSION: '3.10'
Python311:
PYTHON_VERSION: '3.11'
Python312:
PYTHON_VERSION: '3.12'
Python313:
PYTHON_VERSION: '3.13'
steps:
- task: UsePythonVersion@0
inputs:
Expand Down
2 changes: 1 addition & 1 deletion runtimes/v1/azure_functions_runtime_v1/handle_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async def function_environment_reload_request(request):
os.environ[var] = env_vars[var]

if is_envvar_true(PYTHON_ENABLE_DEBUG_LOGGING):
root_logger = logging.getLogger("azure.functions")
root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG)

# calling load_binding_registry again since the
Expand Down
2 changes: 1 addition & 1 deletion runtimes/v2/azure_functions_runtime/handle_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ async def function_environment_reload_request(request):
# TODO: Apply PYTHON_THREADPOOL_THREAD_COUNT

if is_envvar_true(PYTHON_ENABLE_DEBUG_LOGGING):
root_logger = logging.getLogger("azure.functions")
root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG)

# calling load_binding_registry again since the
Expand Down
10 changes: 0 additions & 10 deletions workers/tests/consumption_tests/test_linux_consumption.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,6 @@ def test_reload_variables_after_oom_error(self):

sleep(2)
logs = ctrl.get_container_logs()
self.assertRegex(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we keep this assert but change the regex so it works for all python versions? For example, both proxy and afw log "Finished prioritize_customer_dependencies" - we could check for this log instead

logs,
r"Applying prioritize_customer_dependencies: "
r"worker_dependencies_path: \/azure-functions-host\/"
r"workers\/python\/.*?\/LINUX\/X64,"
r" customer_dependencies_path: \/home\/site\/wwwroot\/"
r"\.python_packages\/lib\/site-packages, working_directory:"
r" \/home\/site\/wwwroot, Linux Consumption: True,"
r" Placeholder: False")

self.assertNotIn("Failure Exception: ModuleNotFoundError",
logs)

Expand Down
52 changes: 45 additions & 7 deletions workers/tests/utils/testutils_lc.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
# Linux Consumption Testing Constants
_DOCKER_PATH = "DOCKER_PATH"
_DOCKER_DEFAULT_PATH = "docker"
_MESH_IMAGE_URL = "https://mcr.microsoft.com/v2/azure-functions/mesh/tags/list"
_MESH_IMAGE_URL = (
"https://mcr.microsoft.com/v2/azure-functions/bookworm/"
"flexconsumption/tags/list"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this also work for 3.14 in the future?

)
_MESH_IMAGE_REPO = "mcr.microsoft.com/azure-functions/mesh"
_FUNC_GITHUB_ZIP = "https://github.com/Azure/azure-functions-python-library" \
"/archive/refs/heads/dev.zip"
Expand Down Expand Up @@ -219,19 +222,44 @@ def spawn_container(self,
container according to the image name. Return the port of container.
"""
# Construct environment variables and start the docker container
worker_path = os.path.join(PROJECT_ROOT, 'azure_functions_worker')
worker_name = 'azure_functions_worker' \
if sys.version_info.minor < 13 else 'proxy_worker'

worker_path = os.path.join(PROJECT_ROOT, worker_name)
container_worker_path = (
f"/azure-functions-host/workers/python/{self._py_version}/"
f"LINUX/X64/{worker_name}"
)

# For Python 3.13+, also mount the runtime libraries
runtime_v2_path = None
runtime_v1_path = None
container_runtime_v2_path = None
container_runtime_v1_path = None

if sys.version_info.minor >= 13:
repo_root = os.path.dirname(PROJECT_ROOT)
runtime_v2_path = os.path.join(
repo_root, 'runtimes', 'v2', 'azure_functions_runtime'
)
runtime_v1_path = os.path.join(
repo_root, 'runtimes', 'v1', 'azure_functions_runtime_v1'
)
container_runtime_v2_path = (
f"/azure-functions-host/workers/python/{self._py_version}/"
"LINUX/X64/azure_functions_runtime"
)
container_runtime_v1_path = (
f"/azure-functions-host/workers/python/{self._py_version}/"
"LINUX/X64/azure_functions_runtime_v1"
)

# TODO: Mount library in docker container
# self._download_azure_functions()

# Download python extension base package
ext_folder = self._download_extensions()

container_worker_path = (
f"/azure-functions-host/workers/python/{self._py_version}/"
"LINUX/X64/azure_functions_worker"
)

base_ext_container_path = (
f"/azure-functions-host/workers/python/{self._py_version}/"
"LINUX/X64/azurefunctions/extensions/base"
Expand All @@ -255,6 +283,16 @@ def spawn_container(self,
run_cmd.extend(["-e", f"WEBSITE_SITE_NAME={self._uuid}"])
run_cmd.extend(["-e", "WEBSITE_SKU=Dynamic"])
run_cmd.extend(["-v", f'{worker_path}:{container_worker_path}'])

# Mount runtime libraries for Python 3.13+
if runtime_v2_path and runtime_v1_path:
run_cmd.extend([
"-v", f'{runtime_v2_path}:{container_runtime_v2_path}'
])
run_cmd.extend([
"-v", f'{runtime_v1_path}:{container_runtime_v1_path}'
])

run_cmd.extend(["-v",
f'{base_ext_local_path}:{base_ext_container_path}'])

Expand Down