Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ endef
show-endpoints:
@$(_show_endpoints)

export HOST_UV_CACHE_DIR := $(shell uv cache dir)

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)
# Start compile+watch front-end container [front-end]
@$(MAKE_C) services/static-webserver/client down compile-dev flags=--watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ async def _message_poller(
while True:
message = await receive()
if message["type"] == "http.disconnect":
_logger.info("client disconnected, terminating request to %s!", request.url)
_logger.debug(
"client disconnected, terminating request to %s!", request.url
)
raise _TerminateTaskGroupError

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

# Let's make a shared queue for the request messages
queue: asyncio.Queue[Message] = asyncio.Queue()

request = Request(scope)

with log_context(_logger, logging.DEBUG, f"cancellable request {request.url}"):
Expand All @@ -72,6 +73,8 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
await handler_task
poller_task.cancel()
except* _TerminateTaskGroupError:
_logger.info(
"The client disconnected. request to %s was cancelled.", request.url
)
if not handler_task.done():
_logger.info(
"The client disconnected. request to %s was cancelled.",
request.url,
)
4 changes: 2 additions & 2 deletions services/agent/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/agent
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

#
Expand Down
4 changes: 2 additions & 2 deletions services/api-server/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/api-server
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

# RUNNING application ----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions services/autoscaling/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/autoscaling
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
uv pip list
fi

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

#
Expand Down
4 changes: 2 additions & 2 deletions services/catalog/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/catalog
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

# RUNNING application ----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions services/clusters-keeper/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/clusters-keeper
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

#
Expand Down
4 changes: 2 additions & 2 deletions services/dask-sidecar/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
python --version | sed 's/^/ /'
command -v python | sed 's/^/ /'
cd services/dask-sidecar
uv pip sync --quiet --no-cache-dir requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
print_info "PIP :"
uv pip list
fi

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

# RUNNING application ----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions services/datcore-adapter/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/datcore-adapter
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

# RUNNING application ----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions services/director-v2/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/director-v2
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

#
Expand Down
4 changes: 2 additions & 2 deletions services/director/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/director
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
uv pip list
fi

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

#
Expand Down
19 changes: 18 additions & 1 deletion services/docker-compose.devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ x-common-environment: &common-environment
# Enforces app to boot debug mode (see docker/boot.sh). ONLY allowed in devel-mode!
SC_BOOT_MODE : debug


services:
api-server:
environment:
Expand All @@ -18,6 +19,7 @@ services:
volumes:
- ./api-server:/devel/services/api-server
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

autoscaling:
environment:
Expand All @@ -27,6 +29,7 @@ services:
volumes:
- ./autoscaling:/devel/services/autoscaling
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

invitations:
environment:
Expand All @@ -35,6 +38,7 @@ services:
volumes:
- ./invitations:/devel/services/invitations
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

payments:
environment:
Expand All @@ -43,6 +47,7 @@ services:
volumes:
- ./payments:/devel/services/payments
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

dynamic-schdlr:
environment:
Expand All @@ -52,6 +57,7 @@ services:
volumes:
- ./dynamic-scheduler:/devel/services/dynamic-scheduler
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
deploy:
replicas: 1

Expand All @@ -64,6 +70,7 @@ services:
volumes:
- ./catalog:/devel/services/catalog
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

clusters-keeper:
environment:
Expand All @@ -72,6 +79,7 @@ services:
volumes:
- ./clusters-keeper:/devel/services/clusters-keeper
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

datcore-adapter:
environment:
Expand All @@ -80,6 +88,7 @@ services:
volumes:
- ./datcore-adapter:/devel/services/datcore-adapter
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

director:
environment:
Expand All @@ -88,7 +97,7 @@ services:
volumes:
- ./director:/devel/services/director
- ../packages:/devel/packages
- ../api:/devel/services/api
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

director-v2:
environment:
Expand All @@ -100,6 +109,7 @@ services:
volumes:
- ./director-v2:/devel/services/director-v2
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

efs-guardian:
environment:
Expand All @@ -108,6 +118,7 @@ services:
volumes:
- ./efs-guardian:/devel/services/efs-guardian
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
deploy:
replicas: 0

Expand All @@ -122,6 +133,7 @@ services:
volumes: &webserver_volumes_devel
- ./web/server:/devel/services/web/server
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
environment: &webserver_environment_devel
<<: *common-environment
DEBUG: 1 # NOTE: gunicorn expects an int not a boolean
Expand Down Expand Up @@ -151,6 +163,7 @@ services:
&dask-sidecar_volumes_devel
- ./dask-sidecar:/devel/services/dask-sidecar
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
- ${ETC_HOSTNAME:-/etc/hostname}:/home/scu/hostname:ro

environment:
Expand Down Expand Up @@ -179,11 +192,13 @@ services:
volumes:
- ./resource-usage-tracker:/devel/services/resource-usage-tracker
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv

storage:
volumes:
- ./storage:/devel/services/storage
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
environment:
<<: *common-environment
STORAGE_PROFILING : ${STORAGE_PROFILING}
Expand All @@ -193,6 +208,7 @@ services:
volumes:
- ./storage:/devel/services/storage
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
environment:
<<: *common-environment
STORAGE_PROFILING : ${STORAGE_PROFILING}
Expand All @@ -205,3 +221,4 @@ services:
volumes:
- ./agent:/devel/services/agent
- ../packages:/devel/packages
- ${HOST_UV_CACHE_DIR}:/home/scu/.cache/uv
4 changes: 2 additions & 2 deletions services/dynamic-scheduler/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/dynamic-scheduler
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

#
Expand Down
4 changes: 2 additions & 2 deletions services/dynamic-sidecar/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then

# NOTE: uv does not like this requirement file...
cd /devel/services/dynamic-sidecar
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
pip list | sed 's/^/ /'
fi

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

#
Expand Down
4 changes: 2 additions & 2 deletions services/efs-guardian/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
command -v python | sed 's/^/ /'

cd services/efs-guardian
uv pip --quiet --no-cache-dir sync requirements/dev.txt
uv pip --quiet sync requirements/dev.txt
cd -
echo "$INFO" "PIP :"
uv pip list
fi

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

#
Expand Down
Loading
Loading