From b48000b42cafe22b5025b8a7f0b6b4c9af76f3f6 Mon Sep 17 00:00:00 2001 From: Sabine Maennel <5292683+sabinem@users.noreply.github.com> Date: Wed, 7 Oct 2026 06:44:09 +0200 Subject: [PATCH] fix(deploy): wait for the backend to be ready in deploy::up deploy::up returned as soon as keycloak was running, while the backend was still compiling and creating its tables. CI's Seed step runs db::seed right after it, and the seed creates the same tables, so the two occasionally raced and Postgres rejected one of them (`duplicate key value violates unique constraint "pg_type_typname_nsp_index"`). The backend only listens once its schema and migrations are done, so waiting for its readiness probe means the tables exist before anything else touches the database. quitsh caps the wait at 100s; if CI's cold compile turns out to exceed that, a separate wait step with its own timeout is the follow-up. --- tools/deploy/process-compose/justfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/deploy/process-compose/justfile b/tools/deploy/process-compose/justfile index 9613add8..aed4e05c 100644 --- a/tools/deploy/process-compose/justfile +++ b/tools/deploy/process-compose/justfile @@ -25,6 +25,7 @@ up *args: just quitsh process-compose start \ --flake-dir "{{flake_dir}}" \ --wait-for "keycloak" \ + --wait-for-ready "backend" \ --socket-path-file "{{socket_file}}" \ "$@" \ "{{installable}}"