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:
+3
-5
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user