Skip to content

Commit ea1ed49

Browse files
Merge branch 'master' into chatbot-improvements
2 parents a886d75 + 63f2847 commit ea1ed49

File tree

36 files changed

+428
-174
lines changed

36 files changed

+428
-174
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@ jobs:
18101810
with:
18111811
python-version: ${{ matrix.python }}
18121812
cache-dependency-glob: "**/e2e/requirements/requirements.txt"
1813-
- uses: actions/setup-node@v5.0.0
1813+
- uses: actions/setup-node@v6.0.0
18141814
with:
18151815
node-version: ${{ matrix.node }}
18161816
cache: "npm"

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
uses: actions/checkout@v5
3030

3131
- name: Initialize CodeQL tools for scanning
32-
uses: github/codeql-action/init@v3
32+
uses: github/codeql-action/init@v4
3333
with:
3434
languages: ${{ matrix.language }}
3535
config-file: ./.github/codeql/codeql-config.yml
3636

3737
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v3
38+
uses: github/codeql-action/analyze@v4

packages/service-library/src/servicelib/rabbitmq/rpc_interfaces/dynamic_scheduler/services.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,11 @@ async def stop_dynamic_service(
9090
rabbitmq_rpc_client: RabbitMQRPCClient,
9191
*,
9292
dynamic_service_stop: DynamicServiceStop,
93-
timeout_s: NonNegativeInt,
9493
) -> None:
9594
result = await rabbitmq_rpc_client.request(
9695
DYNAMIC_SCHEDULER_RPC_NAMESPACE,
9796
_RPC_METHOD_NAME_ADAPTER.validate_python("stop_dynamic_service"),
9897
dynamic_service_stop=dynamic_service_stop,
99-
timeout_s=timeout_s,
10098
)
10199
assert result is None # nosec
102100

services/agent/src/simcore_service_agent/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
from fastapi import FastAPI
66
from servicelib.fastapi.logging_lifespan import create_logging_shutdown_event
77
from servicelib.tracing import TracingConfig
8+
from simcore_service_agent._meta import APP_NAME
89
from simcore_service_agent.core.application import create_app
910
from simcore_service_agent.core.settings import ApplicationSettings
1011

11-
from ._meta import APP_NAME
12-
1312
_logger = logging.getLogger(__name__)
1413

1514
_NOISY_LOGGERS: Final[tuple[str, ...]] = (

services/api-server/src/simcore_service_api_server/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
from fastapi import FastAPI
88
from servicelib.fastapi.logging_lifespan import create_logging_shutdown_event
99
from servicelib.tracing import TracingConfig
10+
from simcore_service_api_server._meta import APP_NAME
1011
from simcore_service_api_server.core.application import create_app
1112
from simcore_service_api_server.core.settings import ApplicationSettings
1213

13-
from ._meta import APP_NAME
14-
1514
_logger = logging.getLogger(__name__)
1615

1716
_NOISY_LOGGERS: Final[tuple[str, ...]] = (

services/autoscaling/src/simcore_service_autoscaling/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
from fastapi import FastAPI
88
from servicelib import tracing
99
from servicelib.fastapi.logging_lifespan import create_logging_shutdown_event
10+
from simcore_service_autoscaling._meta import APP_NAME
1011
from simcore_service_autoscaling.core.application import create_app
1112
from simcore_service_autoscaling.core.settings import ApplicationSettings
1213

13-
from ._meta import APP_NAME
14-
1514
_logger = logging.getLogger(__name__)
1615

1716
_NOISY_LOGGERS: Final[tuple[str, ...]] = (

services/director-v2/src/simcore_service_director_v2/api/routes/dynamic_services.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from typing import Annotated, Final
44

55
import httpx
6-
from common_library.json_serialization import json_dumps
76
from fastapi import APIRouter, Depends, Header, HTTPException, Request
87
from fastapi.responses import RedirectResponse
98
from models_library.api_schemas_directorv2.dynamic_services import (
@@ -25,11 +24,6 @@
2524
from servicelib.utils import logged_gather
2625
from starlette import status
2726
from starlette.datastructures import URL
28-
from tenacity import RetryCallState, TryAgain
29-
from tenacity.asyncio import AsyncRetrying
30-
from tenacity.before_sleep import before_sleep_log
31-
from tenacity.stop import stop_after_delay
32-
from tenacity.wait import wait_fixed
3327

3428
from ...api.dependencies.catalog import get_catalog_client
3529
from ...api.dependencies.database import get_repository
@@ -186,9 +180,6 @@ async def stop_dynamic_service(
186180
node_uuid: NodeID,
187181
director_v0_client: Annotated[DirectorV0Client, Depends(get_director_v0_client)],
188182
scheduler: Annotated[DynamicSidecarsScheduler, Depends(get_scheduler)],
189-
dynamic_services_settings: Annotated[
190-
DynamicServicesSettings, Depends(get_dynamic_services_settings)
191-
],
192183
*,
193184
can_save: bool | None = True,
194185
) -> NoContentResponse | RedirectResponse:
@@ -209,34 +200,6 @@ async def stop_dynamic_service(
209200
if await scheduler.is_service_awaiting_manual_intervention(node_uuid):
210201
raise HTTPException(status.HTTP_409_CONFLICT, detail="waiting_for_intervention")
211202

212-
# Service was marked for removal, the scheduler will
213-
# take care of stopping cleaning up all allocated resources:
214-
# services, containers, volumes and networks.
215-
# Once the service is no longer being tracked this can return
216-
dynamic_services_scheduler_settings: DynamicServicesSchedulerSettings = (
217-
dynamic_services_settings.DYNAMIC_SCHEDULER
218-
)
219-
220-
def _log_error(retry_state: RetryCallState):
221-
logger.error(
222-
"Service with %s could not be untracked after %s",
223-
f"{node_uuid=}",
224-
f"{json_dumps(retry_state.retry_object.statistics)}",
225-
)
226-
227-
async for attempt in AsyncRetrying(
228-
wait=wait_fixed(1.0),
229-
stop=stop_after_delay(
230-
dynamic_services_scheduler_settings.DYNAMIC_SIDECAR_WAIT_FOR_SERVICE_TO_STOP
231-
),
232-
before_sleep=before_sleep_log(logger=logger, log_level=logging.INFO),
233-
reraise=False,
234-
retry_error_callback=_log_error,
235-
):
236-
with attempt:
237-
if scheduler.is_service_tracked(node_uuid):
238-
raise TryAgain
239-
240203
return NoContentResponse()
241204

242205

services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/scheduler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ class DynamicServicesSchedulerSettings(BaseCustomSettings):
137137
DYNAMIC_SIDECAR_WAIT_FOR_SERVICE_TO_STOP: PositiveFloat = Field(
138138
60.0 * _MINUTE,
139139
description=(
140-
"When stopping a service, depending on the amount of data to store, "
140+
"When stopping a LEGACY service, depending on the amount of data to store, "
141141
"the operation might be very long. Also all relative created resources: "
142-
"services, containsers, volumes and networks need to be removed. "
142+
"services, containers, volumes and networks need to be removed. "
143143
),
144144
)
145145

services/docker-compose.devel.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# NOTES:
44
# - port 3000 used for ptsv
55
#
6-
x-common-environment: &common-environment
6+
x-common_environment: &common_environment
77
# Enforces *_DEBUG option in all services. ONLY allowed in devel-mode!
88
DEBUG : "true"
99
# Enforces app to boot debug mode (see docker/boot.sh). ONLY allowed in devel-mode!
@@ -13,7 +13,7 @@ x-common-environment: &common-environment
1313
services:
1414
api-server:
1515
environment:
16-
<<: *common-environment
16+
<<: *common_environment
1717
API_SERVER_PROFILING : ${API_SERVER_PROFILING}
1818
API_SERVER_LOGLEVEL: DEBUG
1919
volumes:
@@ -23,7 +23,7 @@ services:
2323

2424
api-worker:
2525
environment:
26-
<<: *common-environment
26+
<<: *common_environment
2727
API_SERVER_PROFILING : ${API_SERVER_PROFILING}
2828
API_SERVER_LOGLEVEL: DEBUG
2929
volumes:
@@ -33,7 +33,7 @@ services:
3333

3434
autoscaling:
3535
environment:
36-
<<: *common-environment
36+
<<: *common_environment
3737
AUTOSCALING_LOGLEVEL: DEBUG
3838

3939
volumes:
@@ -43,7 +43,7 @@ services:
4343

4444
invitations:
4545
environment:
46-
<<: *common-environment
46+
<<: *common_environment
4747
INVITATIONS_LOGLEVEL: DEBUG
4848
volumes:
4949
- ./invitations:/devel/services/invitations
@@ -52,7 +52,7 @@ services:
5252

5353
payments:
5454
environment:
55-
<<: *common-environment
55+
<<: *common_environment
5656
PAYMENTS_LOGLEVEL: DEBUG
5757
volumes:
5858
- ./payments:/devel/services/payments
@@ -61,7 +61,7 @@ services:
6161

6262
dynamic-schdlr:
6363
environment:
64-
<<: *common-environment
64+
<<: *common_environment
6565
DYNAMIC_SCHEDULER_PROFILING : ${DYNAMIC_SCHEDULER_PROFILING}
6666
DYNAMIC_SCHEDULER_LOGLEVEL: DEBUG
6767
volumes:
@@ -73,7 +73,7 @@ services:
7373

7474
catalog:
7575
environment:
76-
<<: *common-environment
76+
<<: *common_environment
7777
CATALOG_PROFILING : ${CATALOG_PROFILING}
7878
DYNAMIC_SIDECAR_MOUNT_PATH_DEV : ${PWD}/services/dynamic-sidecar
7979
CATALOG_LOGLEVEL: DEBUG
@@ -84,7 +84,7 @@ services:
8484

8585
notifications:
8686
environment:
87-
<<: *common-environment
87+
<<: *common_environment
8888
NOTIFICATIONS_PROFILING : ${NOTIFICATIONS_PROFILING}
8989
NOTIFICATIONS_LOGLEVEL: DEBUG
9090
volumes:
@@ -94,7 +94,7 @@ services:
9494

9595
clusters-keeper:
9696
environment:
97-
<<: *common-environment
97+
<<: *common_environment
9898
CLUSTERS_KEEPER_LOGLEVEL: DEBUG
9999
volumes:
100100
- ./clusters-keeper:/devel/services/clusters-keeper
@@ -103,7 +103,7 @@ services:
103103

104104
datcore-adapter:
105105
environment:
106-
<<: *common-environment
106+
<<: *common_environment
107107
DATCORE_ADAPTER_LOGLEVEL: DEBUG
108108
volumes:
109109
- ./datcore-adapter:/devel/services/datcore-adapter
@@ -121,7 +121,7 @@ services:
121121

122122
director-v2:
123123
environment:
124-
<<: *common-environment
124+
<<: *common_environment
125125
DIRECTOR_V2_PROFILING : ${DIRECTOR_V2_PROFILING}
126126
DYNAMIC_SIDECAR_MOUNT_PATH_DEV : ${PWD}/services/dynamic-sidecar
127127
DIRECTOR_V2_LOGLEVEL: DEBUG
@@ -133,7 +133,7 @@ services:
133133

134134
efs-guardian:
135135
environment:
136-
<<: *common-environment
136+
<<: *common_environment
137137
EFS_GUARDIAN_LOGLEVEL: DEBUG
138138
volumes:
139139
- ./efs-guardian:/devel/services/efs-guardian
@@ -155,7 +155,7 @@ services:
155155
- ../packages:/devel/packages
156156
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
157157
environment: &webserver_environment_devel
158-
<<: *common-environment
158+
<<: *common_environment
159159
DEBUG: 1 # NOTE: gunicorn expects an int not a boolean
160160
WEBSERVER_LOGLEVEL: DEBUG
161161
WEBSERVER_PROFILING: ${WEBSERVER_PROFILING}
@@ -192,7 +192,7 @@ services:
192192
- ${ETC_HOSTNAME:-/etc/hostname}:/home/scu/hostname:ro
193193

194194
environment:
195-
<<: *common-environment
195+
<<: *common_environment
196196
SIDECAR_LOGLEVEL: DEBUG
197197
ports:
198198
- "3000"
@@ -202,7 +202,7 @@ services:
202202
dask-scheduler:
203203
volumes: *dask-sidecar_volumes_devel
204204
environment:
205-
<<: *common-environment
205+
<<: *common_environment
206206
SIDECAR_LOGLEVEL: DEBUG
207207
ports:
208208
- "3000"
@@ -212,7 +212,7 @@ services:
212212

213213
resource-usage-tracker:
214214
environment:
215-
<<: *common-environment
215+
<<: *common_environment
216216
RESOURCE_USAGE_TRACKER_LOGLEVEL: DEBUG
217217
volumes:
218218
- ./resource-usage-tracker:/devel/services/resource-usage-tracker
@@ -225,7 +225,7 @@ services:
225225
- ../packages:/devel/packages
226226
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
227227
environment:
228-
<<: *common-environment
228+
<<: *common_environment
229229
STORAGE_PROFILING : ${STORAGE_PROFILING}
230230
STORAGE_LOGLEVEL: DEBUG
231231

@@ -235,7 +235,7 @@ services:
235235
- ../packages:/devel/packages
236236
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
237237
environment:
238-
<<: *common-environment
238+
<<: *common_environment
239239
STORAGE_PROFILING : ${STORAGE_PROFILING}
240240
STORAGE_LOGLEVEL: DEBUG
241241

@@ -245,13 +245,13 @@ services:
245245
- ../packages:/devel/packages
246246
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
247247
environment:
248-
<<: *common-environment
248+
<<: *common_environment
249249
STORAGE_PROFILING : ${STORAGE_PROFILING}
250250
STORAGE_LOGLEVEL: DEBUG
251251

252252
agent:
253253
environment:
254-
<<: *common-environment
254+
<<: *common_environment
255255
AGENT_LOGLEVEL: DEBUG
256256
volumes:
257257
- ./agent:/devel/services/agent

services/docker-compose.local.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#
1313
x-common-environment: &common_environment
1414
SWARM_STACK_NAME : ${SWARM_STACK_NAME:-simcore_local}
15+
16+
1517
services:
1618
api-server:
1719
environment:
@@ -297,8 +299,3 @@ services:
297299
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.rule=PathPrefix(`/whoami`)
298300
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.entrypoints=traefik_monitor
299301
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.middlewares=${SWARM_STACK_NAME}_gzip@swarm
300-
301-
networks:
302-
docker-api-network:
303-
driver_opts:
304-
{} # override 'encrypted' locally, some WSL versions have issues with encrypted networks SEE https://github.com/microsoft/WSL/issues/10029

0 commit comments

Comments
 (0)