From bd910737e123a69cb71c84f1c2fbf23a2441ca6f Mon Sep 17 00:00:00 2001
From: Armaan Jain <84474476+Developing-Gamer@users.noreply.github.com>
Date: Tue, 2 Jun 2026 11:15:48 -0700
Subject: [PATCH] Clickhouse ready script updated (#1535)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
## Summary by cubic
Improve ClickHouse readiness check for local startup and make it
non-blocking with clearer logs. Also tighten workspace build
permissions.
- **Bug Fixes**
- Updated `wait-until-clickhouse-is-ready` to log status, use `wait-on`
with `http-get://`, verbose output, and a 10s timeout; continue with a
warning if ClickHouse isn’t ready.
- **Dependencies**
- Set `@quetzallabs/i18n` to `false` in `pnpm-workspace.yaml`
`allowBuilds` to prevent building that package.
Written for commit f24cf668b9c875d69b724d02d89c6d52ceb170d4.
Summary will update on new commits.
## Summary by CodeRabbit
* **Chores**
* Improved dependency readiness checks with enhanced error handling and
logging during system initialization.
* Updated build configuration to optimize package dependency management
and build processes.
---
package.json | 4 ++--
pnpm-workspace.yaml | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 17046193e..37530fe33 100644
--- a/package.json
+++ b/package.json
@@ -35,8 +35,8 @@
"emulator:bench": "docker/local-emulator/qemu/run-emulator.sh bench",
"stop-deps": "POSTGRES_DELAY_MS=0 pnpm run deps-compose kill && POSTGRES_DELAY_MS=0 pnpm run deps-compose down -v",
"wait-until-postgres-is-ready:pg_isready": "until pg_isready -h localhost -p ${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}28 && pg_isready -h localhost -p ${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}34; do sleep 1; done",
- "wait-until-postgres-is-ready": "command -v pg_isready >/dev/null 2>&1 && pnpm run wait-until-postgres-is-ready:pg_isready || sleep 10 # not everyone has pg_isready installed, so we fallback to sleeping",
- "wait-until-clickhouse-is-ready": "pnpm exec wait-on http://localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}36/ping",
+ "wait-until-postgres-is-ready": "command -v pg_isready >/dev/null 2>&1 && pnpm run wait-until-postgres-is-ready:pg_isready || sleep 10",
+ "wait-until-clickhouse-is-ready": "echo 'Waiting for ClickHouse to be ready...' && pnpm exec wait-on -t 10000 -v http-get://localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}36/ping || echo 'ClickHouse is not ready after 10 seconds (this is probably a problem with our wait-on setup TODO fix), continuing regardless...'",
"start-deps:no-delay": "pnpm pre && pnpm run deps-compose up --detach --build && pnpm run wait-until-postgres-is-ready && pnpm run wait-until-clickhouse-is-ready && pnpm run db:init && echo \"\\nDependencies started in the background as Docker containers. 'pnpm run stop-deps' to stop them\"",
"start-deps": "POSTGRES_DELAY_MS=${POSTGRES_DELAY_MS:-0} pnpm run start-deps:no-delay",
"restart-deps": "pnpm pre && pnpm run stop-deps && pnpm run start-deps",
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index a672daeb3..c4a68b4a0 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -27,6 +27,7 @@ patchedDependencies:
allowBuilds:
'@prisma/engines': true
+ '@quetzallabs/i18n': false
'@sentry/cli': true
'@tailwindcss/oxide': true
'@vercel/speed-insights': true