Skip to content

Commit 85e24e8

Browse files
authored
🎨Maintenance: make devel mode faster to boot + log fixes + webserver DB disable write to disk (ITISFoundation#7403)
1 parent 728db70 commit 85e24e8

File tree

23 files changed

+69
-40
lines changed

23 files changed

+69
-40
lines changed

‎.github/CODEOWNERS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Makefile @pcrespov @sanderegg
2929
/services/clusters-keeper/ @sanderegg
3030
/services/datcore-adapter/ @sanderegg
3131
/services/director*/ @sanderegg @pcrespov @GitHK
32-
/services/docker-compose*.yml @sanderegg @mrnicegyu11 @YuryHrytsuk
32+
/services/docker-compose.yml @sanderegg @mrnicegyu11 @YuryHrytsuk
33+
/services/docker-compose.*.yml @sanderegg
3334
/services/dynamic-sidecar/ @GitHK
3435
/services/efs-guardian/ @matusdrobuliak66
3536
/services/invitations/ @pcrespov

‎Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ endef
357357
show-endpoints:
358358
@$(_show_endpoints)
359359

360+
export HOST_UV_CACHE_DIR := $(shell uv cache dir)
361+
360362
up-devel: .stack-simcore-development.yml .init-swarm $(CLIENT_WEB_OUTPUT) ## Deploys local development stack, qx-compile+watch and ops stack (pass 'make ops_disabled=1 up-...' to disable)
361363
# Start compile+watch front-end container [front-end]
362364
@$(MAKE_C) services/static-webserver/client down compile-dev flags=--watch

‎packages/service-library/src/servicelib/fastapi/cancellation_middleware.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ async def _message_poller(
2020
while True:
2121
message = await receive()
2222
if message["type"] == "http.disconnect":
23-
_logger.info("client disconnected, terminating request to %s!", request.url)
23+
_logger.debug(
24+
"client disconnected, terminating request to %s!", request.url
25+
)
2426
raise _TerminateTaskGroupError
2527

2628
# Puts the message in the queue
@@ -57,7 +59,6 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
5759

5860
# Let's make a shared queue for the request messages
5961
queue: asyncio.Queue[Message] = asyncio.Queue()
60-
6162
request = Request(scope)
6263

6364
with log_context(_logger, logging.DEBUG, f"cancellable request {request.url}"):
@@ -72,6 +73,8 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
7273
await handler_task
7374
poller_task.cancel()
7475
except* _TerminateTaskGroupError:
75-
_logger.info(
76-
"The client disconnected. request to %s was cancelled.", request.url
77-
)
76+
if not handler_task.done():
77+
_logger.info(
78+
"The client disconnected. request to %s was cancelled.",
79+
request.url,
80+
)

‎services/agent/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
2424
command -v python | sed 's/^/ /'
2525

2626
cd services/agent
27-
uv pip --quiet --no-cache-dir sync requirements/dev.txt
27+
uv pip --quiet sync requirements/dev.txt
2828
cd -
2929
echo "$INFO" "PIP :"
3030
uv pip list
3131
fi
3232

3333
if [ "${SC_BOOT_MODE}" = "debug" ]; then
3434
# NOTE: production does NOT pre-installs debugpy
35-
uv pip install --no-cache-dir debugpy
35+
uv pip install debugpy
3636
fi
3737

3838
#

‎services/api-server/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
1919
command -v python | sed 's/^/ /'
2020

2121
cd services/api-server
22-
uv pip --quiet --no-cache-dir sync requirements/dev.txt
22+
uv pip --quiet sync requirements/dev.txt
2323
cd -
2424
echo "$INFO" "PIP :"
2525
uv pip list
2626
fi
2727

2828
if [ "${SC_BOOT_MODE}" = "debug" ]; then
2929
# NOTE: production does NOT pre-installs debugpy
30-
uv pip install --no-cache-dir debugpy
30+
uv pip install debugpy
3131
fi
3232

3333
# RUNNING application ----------------------------------------

‎services/autoscaling/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
2424
command -v python | sed 's/^/ /'
2525

2626
cd services/autoscaling
27-
uv pip --quiet --no-cache-dir sync requirements/dev.txt
27+
uv pip --quiet sync requirements/dev.txt
2828
cd -
2929
uv pip list
3030
fi
3131

3232
if [ "${SC_BOOT_MODE}" = "debug" ]; then
3333
# NOTE: production does NOT pre-installs debugpy
34-
uv pip install --no-cache-dir debugpy
34+
uv pip install debugpy
3535
fi
3636

3737
#

‎services/catalog/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
1919
command -v python | sed 's/^/ /'
2020

2121
cd services/catalog
22-
uv pip --quiet --no-cache-dir sync requirements/dev.txt
22+
uv pip --quiet sync requirements/dev.txt
2323
cd -
2424
echo "$INFO" "PIP :"
2525
uv pip list
2626
fi
2727

2828
if [ "${SC_BOOT_MODE}" = "debug" ]; then
2929
# NOTE: production does NOT pre-installs debugpy
30-
uv pip install --no-cache-dir debugpy
30+
uv pip install debugpy
3131
fi
3232

3333
# RUNNING application ----------------------------------------

‎services/clusters-keeper/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
2424
command -v python | sed 's/^/ /'
2525

2626
cd services/clusters-keeper
27-
uv pip --quiet --no-cache-dir sync requirements/dev.txt
27+
uv pip --quiet sync requirements/dev.txt
2828
cd -
2929
echo "$INFO" "PIP :"
3030
uv pip list
3131
fi
3232

3333
if [ "${SC_BOOT_MODE}" = "debug" ]; then
3434
# NOTE: production does NOT pre-installs debugpy
35-
uv pip install --no-cache-dir debugpy
35+
uv pip install debugpy
3636
fi
3737

3838
#

‎services/dask-sidecar/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
2525
python --version | sed 's/^/ /'
2626
command -v python | sed 's/^/ /'
2727
cd services/dask-sidecar
28-
uv pip sync --quiet --no-cache-dir requirements/dev.txt
28+
uv pip --quiet sync requirements/dev.txt
2929
cd -
3030
print_info "PIP :"
3131
uv pip list
3232
fi
3333

3434
if [ "${SC_BOOT_MODE}" = "debug" ]; then
3535
# NOTE: production does NOT pre-installs debugpy
36-
uv pip install --no-cache-dir debugpy
36+
uv pip install debugpy
3737
fi
3838

3939
# RUNNING application ----------------------------------------

‎services/datcore-adapter/docker/boot.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
2424
command -v python | sed 's/^/ /'
2525

2626
cd services/datcore-adapter
27-
uv pip --quiet --no-cache-dir sync requirements/dev.txt
27+
uv pip --quiet sync requirements/dev.txt
2828
cd -
2929
echo "$INFO" "PIP :"
3030
uv pip list
3131
fi
3232

3333
if [ "${SC_BOOT_MODE}" = "debug" ]; then
3434
# NOTE: production does NOT pre-installs debugpy
35-
uv pip install --no-cache-dir debugpy
35+
uv pip install debugpy
3636
fi
3737

3838
# RUNNING application ----------------------------------------

0 commit comments

Comments
 (0)