-
Notifications
You must be signed in to change notification settings - Fork 99
fix(ci): use clickhouse-client for multi-statement SQL init #1819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ci): use clickhouse-client for multi-statement SQL init #1819
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
v2-docs | f1783b8 | Jan 07 2026, 07:28 AM |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
14eb26e to
d4fea98
Compare
680a1a7 to
7c1dba9
Compare
d4fea98 to
78facee
Compare
7c1dba9 to
396eb63
Compare
aeeee53 to
901c620
Compare
901c620 to
2a43639
Compare
396eb63 to
6dfcc0a
Compare
| echo "Running $script..." | ||
| curl -s "http://${CLICKHOUSE_USER}:${CLICKHOUSE_PASSWORD}@localhost:8123/" --data-binary @"$script" | ||
| done | ||
| run: bun run clickhouse:migrate |
There was a problem hiding this comment.
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)
Is this helpful? React 👍 or 👎 to let us know.
| echo "Running $script..." | ||
| curl -s "http://${CLICKHOUSE_USER}:${CLICKHOUSE_PASSWORD}@localhost:8123/" --data-binary @"$script" | ||
| done | ||
| run: bun run clickhouse:migrate |
There was a problem hiding this comment.
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)
Is this helpful? React 👍 or 👎 to let us know.
2a43639 to
b353486
Compare
6dfcc0a to
e2314ff
Compare
5b459f4 to
5a1fe76
Compare
e2314ff to
9445846
Compare
- Replace CI ClickHouse init with `bun run clickhouse:migrate` - Remove docker/clickhouse/init/ directory (migrator handles schema) - Remove init volume mount from compose.yml - Update STRUCTURE.md to reflect migrator-based setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
5a1fe76 to
f1783b8
Compare
9445846 to
f5af9b1
Compare

The consolidated 00_init.sql contains multiple statements (CREATE DATABASE,
CREATE TABLE, ALTER TABLE). ClickHouse's HTTP interface doesn't support
multi-statement queries, so curl --data-binary fails silently after the
first statement.
Solution: Use docker exec with clickhouse-client --multiquery to properly
execute all statements in the init scripts.