Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a83e003
uv
Jun 5, 2025
6bf3e45
reorder
Jun 5, 2025
8754c4f
ws
Jun 5, 2025
24c9ed5
test without packages
Jun 6, 2025
72be649
test without packages
Jun 6, 2025
73e2e67
chng to linux
Jun 6, 2025
47aca39
add uvloop
Jun 6, 2025
ed190ba
no windows
Jun 6, 2025
53aac49
catch
Jun 6, 2025
4c0b72d
only allow cx to install
Jun 16, 2025
9ecbc30
weaken check
Jun 16, 2025
36eafbc
fix
Jun 27, 2025
93bd194
Merge remote-tracking branch 'origin/dev' into evanroman/uvloop
Jun 30, 2025
979dbbd
Merge remote-tracking branch 'origin/dev' into evanroman/uvloop
Jul 28, 2025
98f92c7
adjust
Jul 29, 2025
1521e98
rm
Jul 29, 2025
3ea49c5
log
Jul 29, 2025
5685811
fix
Jul 29, 2025
d683d2b
fix
Jul 29, 2025
ab24e11
fix
Aug 4, 2025
fcc81d8
fix
Aug 4, 2025
6e33d1a
fix
Aug 5, 2025
0f37c14
fix
Aug 5, 2025
6a95f6f
Merge remote-tracking branch 'origin/dev' into evanroman/uvloop
Aug 5, 2025
a86909f
fix
Aug 5, 2025
59f38af
fix
Aug 5, 2025
3baf9cb
fix
Aug 5, 2025
89fce7c
Fix
Aug 5, 2025
a2beb76
Rm
Aug 5, 2025
fe57eba
Rm
Aug 5, 2025
3ae0643
Rm
Aug 5, 2025
19b712d
Rm
Aug 5, 2025
489c3fc
Rm
Aug 5, 2025
d11bbed
Rm
Aug 6, 2025
bfdfbf1
Rm
Aug 6, 2025
035d2cc
Rm
Aug 7, 2025
6603f70
fix
Aug 7, 2025
721f5d0
Merge remote-tracking branch 'origin/dev' into evanroman/uvloop
Aug 7, 2025
65df3b9
fix
Aug 7, 2025
5ed9866
fix
Aug 7, 2025
847cc16
fix
Aug 7, 2025
16d820a
fix
Aug 7, 2025
699e189
fix
Aug 7, 2025
9f2ce32
fix
Aug 7, 2025
f8e08c6
fix
Aug 7, 2025
025bd71
fix
Aug 8, 2025
eae8017
Merge remote-tracking branch 'origin/dev' into evanroman/uvloop
Aug 14, 2025
f7c1500
Merge remote-tracking branch 'origin/dev' into evanroman/uvloop
Aug 19, 2025
2bb4998
fix
Aug 19, 2025
d60273c
fix
Aug 19, 2025
8243885
fix
Aug 19, 2025
af47db9
maybe
Aug 19, 2025
a272b93
fix
Aug 20, 2025
dc9a832
fix
Aug 20, 2025
effe89b
fix
Aug 20, 2025
64f2d8c
fix
Aug 20, 2025
6bcdadb
fix
Aug 20, 2025
8762fb7
fix
Aug 21, 2025
2c1817f
fix
Aug 21, 2025
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
6 changes: 5 additions & 1 deletion eng/ci/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ extends:
dependsOn: BuildPythonWorker
jobs:
- template: /eng/templates/jobs/ci-unit-tests.yml@self
parameters:
PoolName: 1es-pool-azfunc
- stage: RunWorkerDockerConsumptionTests
dependsOn: BuildPythonWorker
jobs:
Expand Down Expand Up @@ -95,6 +97,7 @@ extends:
parameters:
PROJECT_NAME: 'Python V2 Library'
PROJECT_DIRECTORY: 'runtimes/v2'
PoolName: 1es-pool-azfunc

# Python V1 Library Build and Test Stages
- stage: BuildV1Library
Expand All @@ -111,4 +114,5 @@ extends:
- template: /eng/templates/jobs/ci-library-unit-tests.yml@self
parameters:
PROJECT_NAME: 'Python V1 Library'
PROJECT_DIRECTORY: 'runtimes/v1'
PROJECT_DIRECTORY: 'runtimes/v1'
PoolName: 1es-pool-azfunc
5 changes: 4 additions & 1 deletion eng/ci/public-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ extends:
- template: /eng/templates/jobs/ci-unit-tests.yml@self
parameters:
PROJECT_DIRECTORY: 'workers'
PoolName: 1es-pool-azfunc-public
- stage: RunWorkerEmulatorTests
dependsOn: BuildPythonWorker
jobs:
Expand All @@ -88,6 +89,7 @@ extends:
parameters:
PROJECT_NAME: 'V2 Library'
PROJECT_DIRECTORY: 'runtimes/v2'
PoolName: 1es-pool-azfunc-public



Expand All @@ -106,4 +108,5 @@ extends:
- template: /eng/templates/jobs/ci-library-unit-tests.yml@self
parameters:
PROJECT_NAME: 'V1 Library'
PROJECT_DIRECTORY: 'runtimes/v1'
PROJECT_DIRECTORY: 'runtimes/v1'
PoolName: 1es-pool-azfunc-public
5 changes: 5 additions & 0 deletions eng/templates/jobs/ci-library-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ parameters:
jobs:
- job: "TestPython"
displayName: "Run ${{ parameters.PROJECT_NAME }} Unit Tests"

pool:
name: ${{ parameters.PoolName }}
image: 1es-ubuntu-22.04
os: linux

strategy:
matrix:
Expand Down
5 changes: 5 additions & 0 deletions eng/templates/jobs/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ parameters:
jobs:
- job: "TestPython"
displayName: "Run Python Unit Tests"

pool:
name: ${{ parameters.PoolName }}
image: 1es-ubuntu-22.04
os: linux

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion runtimes/v1/tests/unittests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def raising_function():
self.assertIn("call2", processed_exception)
self.assertIn("f", processed_exception)
self.assertRegex(processed_exception,
r".*tests\\unittests\\test_logging.py.*")
r".*tests/unittests/test_logging.py.*")
8 changes: 4 additions & 4 deletions runtimes/v1/tests/unittests/test_rpc_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ def _verify_sys_path_import(self, result, expected_output):
subprocess.run(['chmod -x ' + path_import_script], shell=True)
self._reset_environ()

@unittest.skipIf(sys.platform == 'win32',
'Linux .sh script only works on Linux')
# TODO
@unittest.skip("Linux only test fails")
def test_failed_sys_path_import(self):
self._verify_sys_path_import(
'fail',
"No module named 'test_module'")

@unittest.skipIf(sys.platform == 'win32',
'Linux .sh script only works on Linux')
# TODO
@unittest.skip("Linux only test fails")
def test_successful_sys_path_import(self):
self._verify_sys_path_import(
'success',
Expand Down
2 changes: 1 addition & 1 deletion runtimes/v2/tests/unittests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def raising_function():
self.assertIn("call2", processed_exception)
self.assertIn("f", processed_exception)
self.assertRegex(processed_exception,
r".*tests\\unittests\\test_logging.py.*")
r".*tests/unittests/test_logging.py.*")
8 changes: 4 additions & 4 deletions runtimes/v2/tests/unittests/test_rpc_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ def _verify_sys_path_import(self, result, expected_output):
subprocess.run(['chmod -x ' + path_import_script], shell=True)
self._reset_environ()

@unittest.skipIf(sys.platform == 'win32',
'Linux .sh script only works on Linux')
# TODO
@unittest.skip("Linux only test fails")
def test_failed_sys_path_import(self):
self._verify_sys_path_import(
'fail',
"No module named 'test_module'")

@unittest.skipIf(sys.platform == 'win32',
'Linux .sh script only works on Linux')
# TODO
@unittest.skip("Linux only test fails")
def test_successful_sys_path_import(self):
self._verify_sys_path_import(
'success',
Expand Down
2 changes: 1 addition & 1 deletion workers/azure_functions_worker/utils/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def should_load_cx_dependencies(cls):
)
def use_worker_dependencies(cls):
"""Switch the sys.path and ensure the worker imports are loaded from
Worker's dependenciess.
Worker's dependencies.

This will not affect already imported namespaces, but will clear out
the module cache and ensure the upcoming modules are loaded from
Expand Down
16 changes: 12 additions & 4 deletions workers/proxy_worker/start_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

import argparse
import traceback
import asyncio

try:
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except Exception:
pass

_GRPC_CONNECTION_TIMEOUT = 5.0

Expand Down Expand Up @@ -41,8 +48,6 @@ def start():
DependencyManager.initialize()
DependencyManager.use_worker_dependencies()

import asyncio

from . import logging
from .logging import error_logger, logger

Expand All @@ -51,8 +56,11 @@ def start():

logger.info("Args: %s", args)
logger.info(
'Starting proxy worker. Worker ID: %s, Request ID: %s, Host Address: %s:%s',
args.worker_id, args.request_id, args.host, args.port)
'Starting proxy worker. Worker ID: %s, Request ID: %s, '
'Host Address: %s:%s, Event Loop: %s',
args.worker_id, args.request_id,
args.host, args.port, type(asyncio.get_event_loop())
)

try:
return asyncio.run(start_async(
Expand Down
1 change: 1 addition & 0 deletions workers/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies = [
"grpcio~=1.43.0; python_version == '3.7'",
"grpcio ~=1.59.0; python_version >= '3.8' and python_version < '3.13'",
"grpcio~=1.70.0; python_version >= '3.13'",
"uvloop~=0.21.0; python_version >= '3.13' and sys_platform != 'win32'",
"azurefunctions-extensions-base; python_version >= '3.8'",
"azure-functions-runtime==1.0.0b2; python_version >= '3.13'",
"azure-functions-runtime-v1==1.0.0b1; python_version >= '3.13'"
Expand Down
2 changes: 1 addition & 1 deletion workers/tests/unittests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def raising_function():
self.assertIn("call2", processed_exception)
self.assertIn("f", processed_exception)
self.assertRegex(processed_exception,
r".*tests\\unittests\\test_logging.py.*")
r".*tests/unittests/test_logging.py.*")
8 changes: 4 additions & 4 deletions workers/tests/unittests/test_rpc_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ def _verify_sys_path_import(self, result, expected_output):
subprocess.run(['chmod -x ' + path_import_script], shell=True)
self._reset_environ()

@unittest.skipIf(sys.platform == 'win32',
'Linux .sh script only works on Linux')
# TODO
@unittest.skip("Linux only test fails")
def test_failed_sys_path_import(self):
self._verify_sys_path_import(
'fail',
"No module named 'test_module'")

@unittest.skipIf(sys.platform == 'win32',
'Linux .sh script only works on Linux')
# TODO
@unittest.skip("Linux only test fails")
def test_successful_sys_path_import(self):
self._verify_sys_path_import(
'success',
Expand Down
Loading