Skip to content

fix(deploy): wait for the backend to be ready in deploy::up - #321

Merged
sabinem merged 1 commit into
mainfrom
fix/ci-seed-waits-for-backend
Oct 7, 2026
Merged

sabinem merged 1 commit into
mainfrom
fix/ci-seed-waits-for-backend

Conversation

@sabinem

@sabinem sabinem commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

This PR fixes a random race condition that occured in the ci::

  • 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").

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.
@sabinem
sabinem merged commit 23af8e6 into main Oct 7, 2026
3 checks passed
@sabinem
sabinem deleted the fix/ci-seed-waits-for-backend branch October 7, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant