Skip to content

Commit fad2dbe

Browse files
authored
🚑️ Is638/tmp disable cancellation (ITISFoundation#3161)
1 parent b0d802d commit fad2dbe

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

packages/service-library/src/servicelib/fastapi/requests_decorators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ async def wrapper(*args, **kwargs) -> Optional[Any]:
9090
try:
9191
return await handler_task
9292
except CancelledError:
93+
# TODO: check that 'auto_cancel_task' actually executed this cancellation
94+
# E.g. app shutdown might cancel all pending tasks
9395
logger.warning(
9496
"Request %s was cancelled since client %s disconnected !",
9597
f"{request.url}",

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
status,
1717
)
1818
from fastapi.responses import PlainTextResponse
19-
from servicelib.fastapi.requests_decorators import cancellable_request
2019

2120
from ..core.docker_compose_utils import docker_compose_down, docker_compose_up
2221
from ..core.docker_logs import start_log_fetching, stop_log_fetching
@@ -107,7 +106,6 @@ def _raise_if_container_is_missing(id: str, container_names: list[str]) -> None:
107106
}
108107
},
109108
)
110-
@cancellable_request
111109
async def runs_docker_compose_up(
112110
_request: Request,
113111
background_tasks: BackgroundTasks,
@@ -217,7 +215,6 @@ async def runs_docker_compose_down(
217215
status.HTTP_500_INTERNAL_SERVER_ERROR: {"description": "Errors in container"}
218216
},
219217
)
220-
@cancellable_request
221218
async def containers_docker_inspect(
222219
_request: Request,
223220
only_status: bool = Query(
@@ -264,7 +261,6 @@ def _format_result(container_inspect: dict[str, Any]) -> dict[str, Any]:
264261
status.HTTP_500_INTERNAL_SERVER_ERROR: {"description": "Errors in container"},
265262
},
266263
)
267-
@cancellable_request
268264
async def get_container_logs(
269265
_request: Request,
270266
id: str,
@@ -310,7 +306,6 @@ async def get_container_logs(
310306
},
311307
},
312308
)
313-
@cancellable_request
314309
async def get_containers_name(
315310
_request: Request,
316311
filters: str = Query(
@@ -370,7 +365,6 @@ async def get_containers_name(
370365
status.HTTP_500_INTERNAL_SERVER_ERROR: {"description": "Errors in container"},
371366
},
372367
)
373-
@cancellable_request
374368
async def inspect_container(
375369
_request: Request, id: str, shared_store: SharedStore = Depends(get_shared_store)
376370
) -> dict[str, Any]:

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/api/containers_extension.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
)
1919
from models_library.services import ServiceOutput
2020
from pydantic.main import BaseModel
21-
from servicelib.fastapi.requests_decorators import cancellable_request
2221
from servicelib.utils import logged_gather
2322
from simcore_sdk.node_ports_v2.port_utils import is_file_type
2423

@@ -246,7 +245,6 @@ async def push_output_ports(
246245
},
247246
},
248247
)
249-
@cancellable_request
250248
async def restarts_containers(
251249
_request: Request,
252250
command_timeout: float = Query(
@@ -295,7 +293,6 @@ async def restarts_containers(
295293
response_class=Response,
296294
status_code=status.HTTP_204_NO_CONTENT,
297295
)
298-
@cancellable_request
299296
async def attach_container_to_network(
300297
_request: Request,
301298
id: str,

0 commit comments

Comments
 (0)