fix: recreate the migrate service container during rolling update

A one-off run --rm left the migrate container of the previous image in
the stand; scripts/restart.sh then started it as a dependency of api and
the old migrations failed on the newer schema, so test-persistence broke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 01:04:50 +03:00
co-authored by Claude Opus 5.5
parent 5403464cfb
commit de654a1c83
4 changed files with 43 additions and 21 deletions
+3 -5
View File
@@ -262,12 +262,10 @@ def slot_event(
def start_time(events: list[ContainerEvent]) -> float | None:
"""Начало изменения стенда: создание контейнера миграции, без него —
первой новой реплики (миграции пропущены)."""
# контейнер сервиса migrate (scripts/rolling-update.sh пересоздаёт его
# на новом образе) или одноразовый migrate-run
migrate = next(
(
e
for e in events
if e.action == "create" and "migrate-run" in e.name
),
(e for e in events if e.action == "create" and "-migrate-" in e.name),
None,
)
if migrate is not None: