Исправить замечания ревью: защита rollout от остановленных реплик, чтение серий, время экспериментов по часам Docker, выход сервера при ошибке старта

This commit is contained in:
2026-11-02 18:23:26 +03:00
parent b2973405f3
commit c9d0f73221
8 changed files with 153 additions and 25 deletions
+10
View File
@@ -6,6 +6,10 @@
# removes the new ones and leaves the old ones serving, so the stand is never
# left with a mix of versions.
#
# Every replica must be running. With a stopped one (say, after stop-one),
# docker rollout only replaces the stopped one and reports success, which
# would leave old and new versions side by side; the script refuses instead.
#
# The migrations of the new version run first, once, while the old replicas
# serve: they only add to the schema. docker rollout scales with `compose up`,
# which also starts the dependencies of the API and would rerun the old,
@@ -15,6 +19,12 @@
set -eu
cd "$(dirname "$0")/.."
idle=$(docker compose ps -aq --status exited --status created --status paused --status dead api)
if [ -n "$idle" ]; then
echo "some API replicas are not running; start them first: docker compose start api" >&2
exit 2
fi
version=v0.14
checksum=cdeaba6ae9eee3b0b606286e585bbda6787283d801a6ad6d9b9d2bc347fda05b
tool=bin/docker-rollout