stack-orchestrator/stack_orchestrator/deploy
Prathamesh Musale 569215f6f7 deploy: restart now force-recreates compose containers
Operator-reported: editing source files mounted into a service via
bind volumes (alert rules, dashboards, scripts, templates, telegraf
config) and running 'laconic-so deployment ... restart' did not
take effect. Operator had to fall back to 'stop && start' to pick
up changes.

Root cause: 'restart' calls up_operation, which translates to
'docker compose up -d'. Compose's up only recreates a container
when the *service definition* itself (image, env, ports, volume
declarations) changes. Bind-mount target file content is not part
of that hash, so the running container kept its old in-memory
state (e.g. Grafana's pre-edit provisioning).

Add force_recreate kwarg through the deployer interface and have
restart pass force_recreate=True. compose path threads through to
python_on_whales' compose.up(force_recreate=...). k8s path accepts
the kwarg but is a no-op for now (rolling update on
unchanged-spec needs a separate fix that stamps the
kubectl.kubernetes.io/restartedAt annotation on managed
Deployments; tracked in a follow-up).
2026-05-06 09:09:52 +00:00
..
compose deploy: restart now force-recreates compose containers 2026-05-06 09:09:52 +00:00
k8s deploy: restart now force-recreates compose containers 2026-05-06 09:09:52 +00:00
webapp Merge wd-a7b: cluster-id/namespace naming, jobs, multi-cert, secrets 2026-04-01 18:22:07 +00:00
__init__.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
deploy.py deploy: restart now force-recreates compose containers 2026-05-06 09:09:52 +00:00
deploy_types.py Add Job and secrets support for k8s-kind deployments (#995) 2026-03-11 03:56:21 +00:00
deploy_util.py Fix pyright type errors across codebase 2026-01-22 01:10:36 -05:00
deployer.py deploy: restart now force-recreates compose containers 2026-05-06 09:09:52 +00:00
deployer_factory.py Add Job and secrets support for k8s-kind deployments (#995) 2026-03-11 03:56:21 +00:00
deployment.py deploy: restart now force-recreates compose containers 2026-05-06 09:09:52 +00:00
deployment_context.py Make deployments self-sufficient and add E2E restart test (#750) 2026-04-28 17:28:02 +05:30
deployment_create.py Make deployments self-sufficient and add E2E restart test (#750) 2026-04-28 17:28:02 +05:30
dns_probe.py Make deployments self-sufficient and add E2E restart test (#750) 2026-04-28 17:28:02 +05:30
images.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00
spec.py k8s: manage Caddy ingress image via spec (so-p3p) (#749) 2026-04-21 14:40:39 +05:30
stack.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00
stack_state.py Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00