From 3a4b9e052a0d4dde3667b90b24bc6e68e56f7f37 Mon Sep 17 00:00:00 2001 From: Hong Jiarong Date: Thu, 30 Jul 2026 11:45:36 +0800 Subject: [PATCH] fix(ci): bind hub-check Postgres on host 15432 Runner host 5432 is already allocated (leftover containers), causing hub-check service Postgres to fail start. Map service DB to 15432 and point wait/integration DATABASE_URL at that port. --- .gitea/workflows/hub-check.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/hub-check.yml b/.gitea/workflows/hub-check.yml index 29cdb17..b058030 100644 --- a/.gitea/workflows/hub-check.yml +++ b/.gitea/workflows/hub-check.yml @@ -21,7 +21,8 @@ jobs: POSTGRES_PASSWORD: paradigm POSTGRES_DB: cph_hub_test ports: - - 5432:5432 + # Host 15432 avoids collisions with any runner-local Postgres on 5432. + - 15432:5432 options: >- --health-cmd "pg_isready -U paradigm -d cph_hub_test" --health-interval 5s @@ -53,9 +54,9 @@ jobs: run: | node <<'NODE' const net = require("node:net"); - const deadline = Date.now() + 60000; + const port = Number(process.env.HUB_CHECK_PG_PORT || "15432"); function tryConnect() { - const socket = net.createConnection({ host: "127.0.0.1", port: 5432 }); + const socket = net.createConnection({ host: "127.0.0.1", port }); socket.once("connect", () => { socket.end(); process.exit(0); @@ -63,7 +64,7 @@ jobs: socket.once("error", () => { socket.destroy(); if (Date.now() > deadline) { - console.error("Postgres did not become reachable at 127.0.0.1:5432"); + console.error(`Postgres did not become reachable at 127.0.0.1:${port}`); process.exit(1); } setTimeout(tryConnect, 1000); @@ -110,7 +111,7 @@ jobs: --exclude test/integration/real-model.test.ts \ --exclude test/integration/agent-sandbox-linux.test.ts env: - DATABASE_URL: postgresql://paradigm:paradigm@127.0.0.1:5432/cph_hub_test + DATABASE_URL: postgresql://paradigm:paradigm@127.0.0.1:15432/cph_hub_test # Real-model tests are opt-in: set RUN_REAL_MODEL_TESTS=true and provide # OPENROUTER_API_KEY when a branch should hit live OpenRouter.