Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,7 @@ jobs:
run: bun install --frozen-lockfile

- name: Initialize ClickHouse
run: |
for script in docker/clickhouse/init/*.sql; do
echo "Running $script..."
curl -s "http://${CLICKHOUSE_USER}:${CLICKHOUSE_PASSWORD}@localhost:8123/" --data-binary @"$script"
done
run: bun run clickhouse:migrate
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is causing the CI to fail because it's using 'bun run clickhouse:migrate' which is likely not properly set up. Either the script is not defined in package.json, or the migrator.ts file and migrations directory with SQL files don't exist in the expected location. Ensure that the clickhouse:migrate script is defined in package.json, the migrator.ts file is properly implemented, and the SQL migration files have been moved from docker/clickhouse/init/ to clickhouse/migrations/.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is causing CI to fail because the new 'bun run clickhouse:migrate' command is trying to execute migration files that contain PostgreSQL-style syntax incompatible with ClickHouse. The migration files need to be updated to use proper ClickHouse syntax (replacing types like VARCHAR with String, etc.) before this command can work correctly.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.


- name: Run `vitest` with code coverage
run: bun run test:coverage
Expand Down
7 changes: 4 additions & 3 deletions STRUCTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ cloud/
├── clickhouse/ # ClickHouse analytics services
│ ├── client.ts # Effect service for ClickHouse access
│ ├── search.ts # Analytics/search queries and transforms
│ ├── migrator.ts # Schema migration runner (run: bun run clickhouse:migrate)
│ ├── migrations/ # SQL migration files (versioned, applied on startup)
│ │ └── *.sql
│ └── [other files] # utils.ts, tests, etc.
├── workers/ # Cloudflare Workers (queues/cron/polling)
│ ├── clickhouseQueueConsumer.ts # Queue consumer for outbox sync
Expand All @@ -260,9 +263,7 @@ cloud/
│ └── db.ts # Database test utilities
├── docker/ # Docker configuration
│ ├── compose.yml
│ ├── clickhouse/ # ClickHouse init SQL
│ │ └── init/ # Schema + index creation scripts
│ └── data/ # Docker data directory
│ └── data/ # Docker data directory (gitignored)
├── dist/ # Build output
│ ├── client/ # Client build artifacts
│ └── server/ # Server build artifacts
Expand Down
1 change: 0 additions & 1 deletion cloud/docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ services:
- "9000:9000"
volumes:
- ./data/clickhouse:/var/lib/clickhouse
- ./clickhouse/init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"]
interval: 5s
Expand Down
Loading