Skip to content

Commit

Permalink
fix: pass allow_concurrent to runtime_args (#6188)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM authored Sep 2, 2024
1 parent 3ca71a5 commit 09f61da
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions jina/orchestrate/deployments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions jina/orchestrate/flow/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions jina/serve/runtimes/worker/request_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
6 changes: 3 additions & 3 deletions tests/docker_compose/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ def __init__(self, dump_path, timeout_second=30):

def __enter__(self):
subprocess.run(
f'docker-compose -f {self.dump_path} up --build -d --remove-orphans'.split(
f'docker compose -f {self.dump_path} up --build -d --remove-orphans'.split(
' '
)
)

container_ids = (
subprocess.run(
f'docker-compose -f {self.dump_path} ps -q'.split(' '),
f'docker compose -f {self.dump_path} ps -q'.split(' '),
capture_output=True,
)
.stdout.decode("utf-8")
Expand Down Expand Up @@ -127,5 +127,5 @@ def _are_all_container_healthy(

def __exit__(self, exc_type, exc_val, exc_tb):
subprocess.run(
f'docker-compose -f {self.dump_path} down --remove-orphans'.split(' ')
f'docker compose -f {self.dump_path} down --remove-orphans'.split(' ')
)
4 changes: 2 additions & 2 deletions tests/integration/instrumentation/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def otlp_receiver_port():
def otlp_collector(jaeger_port, prometheus_backend_port, otlp_receiver_port):
file_dir = os.path.dirname(__file__)
os.system(
f"docker-compose -f {os.path.join(file_dir, 'docker-compose.yml')} up -d --remove-orphans"
f"docker compose -f {os.path.join(file_dir, 'docker-compose.yml')} up -d --remove-orphans"
)
time.sleep(1)
yield
os.system(
f"docker-compose -f {os.path.join(file_dir, 'docker-compose.yml')} down --remove-orphans"
f"docker compose -f {os.path.join(file_dir, 'docker-compose.yml')} down --remove-orphans"
)


Expand Down

0 comments on commit 09f61da

Please sign in to comment.