From 041474e7465527f1d14ab9a83f9e444367f23e96 Mon Sep 17 00:00:00 2001 From: Joan Martinez Date: Mon, 2 Sep 2024 11:21:52 +0200 Subject: [PATCH] fix: pass allow_concurrent to runtime_args --- jina/orchestrate/deployments/__init__.py | 4 ++-- jina/orchestrate/flow/base.py | 4 ++-- jina/serve/runtimes/worker/request_handling.py | 1 + tests/conftest.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/jina/orchestrate/deployments/__init__.py b/jina/orchestrate/deployments/__init__.py index 1d76601a68009..3eecfd3606aab 100644 --- a/jina/orchestrate/deployments/__init__.py +++ b/jina/orchestrate/deployments/__init__.py @@ -1883,9 +1883,9 @@ def to_docker_compose_yaml( yaml.dump(docker_compose_dict, fp, sort_keys=False) command = ( - 'docker-compose up' + 'docker compose up' if output_path is None - else f'docker-compose -f {output_path} up' + else f'docker compose -f {output_path} up' ) self.logger.info( diff --git a/jina/orchestrate/flow/base.py b/jina/orchestrate/flow/base.py index 4e3abe955bf11..9aec82444a280 100644 --- a/jina/orchestrate/flow/base.py +++ b/jina/orchestrate/flow/base.py @@ -2851,9 +2851,9 @@ def to_docker_compose_yaml( yaml.dump(docker_compose_dict, fp, sort_keys=False) command = ( - 'docker-compose up' + 'docker compose up' if output_path is None - else f'docker-compose -f {output_path} up' + else f'docker compose -f {output_path} up' ) self.logger.info( diff --git a/jina/serve/runtimes/worker/request_handling.py b/jina/serve/runtimes/worker/request_handling.py index 6d4b3fb31ffc9..456c94a7bdf41 100644 --- a/jina/serve/runtimes/worker/request_handling.py +++ b/jina/serve/runtimes/worker/request_handling.py @@ -399,6 +399,7 @@ def _load_executor( 'metrics_registry': metrics_registry, 'tracer_provider': tracer_provider, 'meter_provider': meter_provider, + 'allow_concurrent': self.args.allow_concurrent, }, py_modules=self.args.py_modules, extra_search_paths=self.args.extra_search_paths, diff --git a/tests/conftest.py b/tests/conftest.py index 6f400bf936c37..993a3f4794c00 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,12 +31,12 @@ def test_metas(tmpdir, random_workspace_name): @pytest.fixture() def docker_compose(request): os.system( - f"docker-compose -f {request.param} --project-directory . up --build -d --remove-orphans" + f"docker compose -f {request.param} --project-directory . up --build -d --remove-orphans" ) time.sleep(10) yield os.system( - f"docker-compose -f {request.param} --project-directory . down --remove-orphans" + f"docker compose -f {request.param} --project-directory . down --remove-orphans" )