From a3e5bda636cbe6cd78a3e8d716011eb969a51268 Mon Sep 17 00:00:00 2001 From: Andrei Neagu Date: Mon, 25 Nov 2024 13:37:07 +0100 Subject: [PATCH] rename --- .../scheduler/_core/_event_create_sidecars.py | 4 ++-- .../test_modules_dynamic_sidecar_docker_service_specs.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_event_create_sidecars.py b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_event_create_sidecars.py index ba1d740f7c1..abf052f4e12 100644 --- a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_event_create_sidecars.py +++ b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/scheduler/_core/_event_create_sidecars.py @@ -67,7 +67,7 @@ ) -def _get_dynamic_sidecar_service_final_spec( +def _merge_service_base_and_user_specs( dynamic_sidecar_service_spec_base: AioDockerServiceSpec, user_specific_service_spec: AioDockerServiceSpec, ) -> AioDockerServiceSpec: @@ -264,7 +264,7 @@ async def action(cls, app: FastAPI, scheduler_data: SchedulerData) -> None: user_specific_service_spec = AioDockerServiceSpec.model_validate( user_specific_service_spec ) - dynamic_sidecar_service_final_spec = _get_dynamic_sidecar_service_final_spec( + dynamic_sidecar_service_final_spec = _merge_service_base_and_user_specs( dynamic_sidecar_service_spec_base, user_specific_service_spec ) rabbit_message = ProgressRabbitMessageNode.model_construct( diff --git a/services/director-v2/tests/unit/with_dbs/test_modules_dynamic_sidecar_docker_service_specs.py b/services/director-v2/tests/unit/with_dbs/test_modules_dynamic_sidecar_docker_service_specs.py index add75d7e911..6f39b8a3e24 100644 --- a/services/director-v2/tests/unit/with_dbs/test_modules_dynamic_sidecar_docker_service_specs.py +++ b/services/director-v2/tests/unit/with_dbs/test_modules_dynamic_sidecar_docker_service_specs.py @@ -45,7 +45,7 @@ ) from simcore_service_director_v2.modules.dynamic_sidecar.scheduler._core._event_create_sidecars import ( _DYNAMIC_SIDECAR_SERVICE_EXTENDABLE_SPECS, - _get_dynamic_sidecar_service_final_spec, + _merge_service_base_and_user_specs, ) from simcore_service_director_v2.utils.dict_utils import nested_update @@ -623,7 +623,7 @@ async def test_merge_dynamic_sidecar_specs_with_user_specific_specs( assert another_merged_dict -def test_regression__get_dynamic_sidecar_service_final_spec(): +def test_regression__merge_service_base_and_user_specs(): mock_service_spec = AioDockerServiceSpec.model_validate( {"Labels": {"l1": "false", "l0": "a"}} ) @@ -656,7 +656,7 @@ def test_regression__get_dynamic_sidecar_service_final_spec(): }, } ) - result = _get_dynamic_sidecar_service_final_spec( + result = _merge_service_base_and_user_specs( mock_service_spec, mock_catalog_constraints ) assert result.model_dump(by_alias=True, exclude_unset=True) == {