diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb9abd4..5db9d8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,7 +97,7 @@ deploy: sed -E "s#image: reg.nyan404.ru/cwshed-clone/belki:[^[:space:]]+#image: $DOCKER_IMAGE_REPOSITORY:$CI_COMMIT_SHORT_SHA#g" deploy/k8s/production.yaml | kubectl apply -f - - > sed -E "s#image: reg.nyan404.ru/cwshed:[^[:space:]]+#image: $GATEWAY_IMAGE_REPOSITORY:$CI_COMMIT_SHORT_SHA#g" deploy/k8s/gateway.yaml | kubectl apply -f - - - kubectl -n "$KUBE_NAMESPACE" rollout status deployment/belki-postgres --timeout=180s + - kubectl -n "$KUBE_NAMESPACE" wait --for=condition=Ready pod -l app.kubernetes.io/name=belki-postgres --timeout=180s - kubectl -n "$KUBE_NAMESPACE" rollout status deployment/belki-web --timeout=180s - kubectl -n "$KUBE_NAMESPACE" rollout status deployment/belki-bot --timeout=180s - kubectl -n "$KUBE_NAMESPACE" rollout status deployment/cwshed --timeout=180s diff --git a/docs/GITLAB_CI_CD.md b/docs/GITLAB_CI_CD.md index 3266819..d289a96 100644 --- a/docs/GITLAB_CI_CD.md +++ b/docs/GITLAB_CI_CD.md @@ -42,4 +42,6 @@ kubectl -n belki apply -f deploy/k8s/production.yaml kubectl -n belki rollout status deployment/belki-web --timeout=180s ``` +The deploy job checks the PostgreSQL pod with `kubectl wait --for=condition=Ready` instead of `rollout status`: the database template is not updated by an application image deployment, and a stale Deployment progress condition must not hide a healthy database or fail an otherwise successful release. + MetalLB адрес шлюза — `10.12.0.204`; он раздаёт старый CatWar-сайт и проксирует `/belki`, `/admin` и `/api/*` на Belki web `10.12.0.212`. diff --git a/docs/staging/bugs/2026-08-25-belki-bugs.md b/docs/staging/bugs/2026-08-25-belki-bugs.md index ac177b3..063f76a 100644 --- a/docs/staging/bugs/2026-08-25-belki-bugs.md +++ b/docs/staging/bugs/2026-08-25-belki-bugs.md @@ -300,3 +300,13 @@ Proudly made by Nyan404 | GitLab Page **Дополнение:** в ходе последующей проверки исправлена валидация ресурсов для расчёта осмотра: некорректные строки больше не игнорируются веб-формой и не дают техническую ошибку API. **Дополнение:** после ответа VK-калькулятора диалоговое состояние теперь удаляется полностью, а не остаётся пустой записью в памяти бота. + +## 15. CI deployment ошибочно ждёт rollout PostgreSQL + +**Статус:** выполнено в текущей очереди исправлений. + +**Источник:** вывод GitLab CI от 25.08.2026. + +**Фактическое поведение:** после применения манифестов `kubectl rollout status deployment/belki-postgres` превышает progress deadline, хотя обновлённые `belki-web`, `belki-bot` и `cwshed` успешно выкатываются. Job завершается с exit code 1. + +**Исправление:** CI проверяет готовность pod PostgreSQL, не требуя несуществующего rollout базы; rollout status остаётся для обновляемых deployment приложений. diff --git a/structure_and_data.md b/structure_and_data.md index 21ff501..7caf16d 100644 --- a/structure_and_data.md +++ b/structure_and_data.md @@ -64,6 +64,7 @@ - 2026-08-25: added the goal calculator to the VK menu as `/цель` and `/калькулятор`; the bot now runs the same goal calculation interactively with step prompts, choice buttons, and confirmation without report attachments. - 2026-08-25: hardened the public goal calculator: point values must be finite, one session is limited to 1–1440 minutes, and one calculation to 1–50 kittens. The same validation is applied by the domain, JSON API, and VK dialogue, with regression tests for `NaN`, infinity, and excessive values. - 2026-08-25: added the separate `points` calculator mode for earned points. It reuses the domain formulas without report identities or attachments; web and VK cover coaching, training, and inspections, with coaching results split between curator and up to three kittens. +- 2026-08-25: CI deployment validates PostgreSQL by ready pod rather than deployment rollout status. PostgreSQL is applied for desired-state reconciliation but its image/template is not replaced by application releases; web, bot, and gateway retain rollout checks. - 2026-08-25: hardened public JSON and screenshot uploads. The web handler caps encoded JSON at 20 MiB before parsing, decodes at most 15 MiB of image bytes, accepts only PNG/JPEG/WebP signatures, rejects MIME mismatches, and strips path components from upload names. The public UI advertises the same supported formats. - 2026-08-25: removed unused public web-profile endpoints and made `/api/resolve-identity` stateless for submitted pairs. A browser can fill its current inspection form, but cannot overwrite the persistent identity directory shared with VK users. - 2026-08-25: persistent identity and profile pairs now require a non-empty name up to 100 characters and a positive integer ID. VK input and public identity lookup reject zero, negative, and boolean IDs before lookup or persistence.