diff --git a/.env-devel b/.env-devel index 6cea5247c93..0b606a2426d 100644 --- a/.env-devel +++ b/.env-devel @@ -59,7 +59,7 @@ CLUSTERS_KEEPER_EC2_INSTANCES_PREFIX="" CLUSTERS_KEEPER_LOGLEVEL=INFO CLUSTERS_KEEPER_MAX_MISSED_HEARTBEATS_BEFORE_CLUSTER_TERMINATION=5 CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES=null -CLUSTERS_KEEPER_TASK_INTERVAL=30 +CLUSTERS_KEEPER_TASK_INTERVAL=00:00:30 CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES=null CLUSTERS_KEEPER_TRACING={} diff --git a/services/clusters-keeper/src/simcore_service_clusters_keeper/core/settings.py b/services/clusters-keeper/src/simcore_service_clusters_keeper/core/settings.py index 6595827ea6b..3e85015ee4a 100644 --- a/services/clusters-keeper/src/simcore_service_clusters_keeper/core/settings.py +++ b/services/clusters-keeper/src/simcore_service_clusters_keeper/core/settings.py @@ -381,9 +381,7 @@ def LOG_LEVEL(self) -> LogLevel: # noqa: N802 def _valid_log_level(cls, value: str) -> str: return cls.validate_log_level(value) - @field_validator( - "CLUSTERS_KEEPER_TASK_INTERVAL", "SERVICE_TRACKING_HEARTBEAT", mode="before" - ) + @field_validator("SERVICE_TRACKING_HEARTBEAT", mode="before") @classmethod def _validate_interval( cls, value: str | datetime.timedelta diff --git a/services/clusters-keeper/tests/unit/test_modules_clusters_management_task.py b/services/clusters-keeper/tests/unit/test_modules_clusters_management_task.py index d22bdce1f76..66bbf12c42e 100644 --- a/services/clusters-keeper/tests/unit/test_modules_clusters_management_task.py +++ b/services/clusters-keeper/tests/unit/test_modules_clusters_management_task.py @@ -13,8 +13,6 @@ from pytest_simcore.helpers.monkeypatch_envs import EnvVarsDict, setenvs_from_dict from simcore_service_clusters_keeper.core.settings import ApplicationSettings -_FAST_POLL_INTERVAL = 1 - @pytest.fixture def app_environment( @@ -22,7 +20,7 @@ def app_environment( monkeypatch: pytest.MonkeyPatch, ) -> EnvVarsDict: return app_environment | setenvs_from_dict( - monkeypatch, {"CLUSTERS_KEEPER_TASK_INTERVAL": f"{_FAST_POLL_INTERVAL}"} + monkeypatch, {"CLUSTERS_KEEPER_TASK_INTERVAL": "00:00:01"} ) @@ -43,10 +41,7 @@ async def test_clusters_management_task_created_and_deleted( initialized_app: FastAPI, app_settings: ApplicationSettings, ): - assert ( - app_settings.CLUSTERS_KEEPER_TASK_INTERVAL.total_seconds() - == _FAST_POLL_INTERVAL - ) + assert app_settings.CLUSTERS_KEEPER_TASK_INTERVAL.total_seconds() == 1 assert hasattr(initialized_app.state, "clusters_cleaning_task") - await asyncio.sleep(5 * _FAST_POLL_INTERVAL) + await asyncio.sleep(5) mock_background_task.assert_called() diff --git a/services/director-v2/tests/unit/with_dbs/test_modules_comp_scheduler_dask_scheduler.py b/services/director-v2/tests/unit/with_dbs/test_modules_comp_scheduler_dask_scheduler.py index 8fbc2d9006b..18a992e3db7 100644 --- a/services/director-v2/tests/unit/with_dbs/test_modules_comp_scheduler_dask_scheduler.py +++ b/services/director-v2/tests/unit/with_dbs/test_modules_comp_scheduler_dask_scheduler.py @@ -1175,6 +1175,9 @@ class RebootState: expected_run_state: RunningState +@pytest.mark.skip( + reason="awaiting refactor in https://github.com/ITISFoundation/osparc-simcore/pull/6736" +) @pytest.mark.parametrize( "reboot_state", [ diff --git a/services/director/src/simcore_service_director/producer.py b/services/director/src/simcore_service_director/producer.py index 79e695ead57..907e7a8e04e 100644 --- a/services/director/src/simcore_service_director/producer.py +++ b/services/director/src/simcore_service_director/producer.py @@ -178,7 +178,8 @@ async def _create_docker_service_params( service_name = registry_proxy.get_service_last_names(service_key) + "_" + node_uuid _logger.debug("Converting labels to docker runtime parameters") service_default_envs = { - "POSTGRES_ENDPOINT": app_settings.DIRECTOR_POSTGRES.dsn, + # old services expect POSTGRES_ENDPOINT as hostname:port + "POSTGRES_ENDPOINT": f"{app_settings.DIRECTOR_POSTGRES.POSTGRES_HOST}:{app_settings.DIRECTOR_POSTGRES.POSTGRES_PORT}", "POSTGRES_USER": app_settings.DIRECTOR_POSTGRES.POSTGRES_USER, "POSTGRES_PASSWORD": app_settings.DIRECTOR_POSTGRES.POSTGRES_PASSWORD.get_secret_value(), "POSTGRES_DB": app_settings.DIRECTOR_POSTGRES.POSTGRES_DB,