Skip to content

Add ClickHouse, TiDB, Redshift stand-in, and DuckDB to local e2e stack - #289

Draft
huyplb wants to merge 4 commits into
mainfrom
cursor/compose-ch-tidb-duckdb-redshift-847b
Draft

Add ClickHouse, TiDB, Redshift stand-in, and DuckDB to local e2e stack#289
huyplb wants to merge 4 commits into
mainfrom
cursor/compose-ch-tidb-duckdb-redshift-847b

Conversation

@huyplb

@huyplb huyplb commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Extends the local Docker / seed / e2e stack so ClickHouse, TiDB, DuckDB, and a Redshift-compatible stand-in can be exercised like the existing dialects.

Changes

  • Compose: clickhouse (:8123), tidb (:4000 unistore), redshift (Postgres 16 on :5439 with SSL — local stand-in, not Amazon Redshift)
  • DuckDB: file-based; scripts/seed/seed-duckdb.mjs writes /tmp/foxschema-duckdb/demo_{a,b}.duckdb
  • Seeds: clickhouse / tidb (foxuser/foxpass) / duckdb; Redshift reuses Postgres seed
  • UI: register ClickHouse + Redshift; default SSL on for Redshift/Azure SQL; dedupe schema <option> keys
  • Redshift SSL: omit sslmode from URL (node-pg maps require→verify-full); TLS via adapter Pool.ssl
  • E2E: empty-password save handling; ClickHouse/Redshift/DuckDB skipMigration where planner DDL is not dialect-faithful; allow empty pass in db-config

E2E status (new dialects, after fixes)

Dialect Result
ClickHouse PASS (compare; migrate skipped)
Redshift PASS (compare; migrate skipped on stand-in)
TiDB PASS (full flow incl. migrate)
DuckDB Partial — source connects; target reconnect / React key main still flaky (same class as SQLite file-dialect issues)

Azure SQL still skipped (cloud-only).

Test plan

  • docker compose up -d clickhouse tidb redshift → healthy
  • bash scripts/seed/seed-all.sh {clickhouse,tidb,redshift,duckdb}
  • Vitest dialect suites for CH / Redshift / TiDB
  • Full npm run test:e2e:all green (pre-existing SQL Editor checkbox / Utilities / SQLite / Cockroach / DB2 migrate issues remain)
Open in Web Open in Cursor 

Compose services + seed scripts for ClickHouse/TiDB/Redshift (Postgres on
:5439), DuckDB file seeding via @duckdb/node-api, frontend dialect registry
entries for ClickHouse/Redshift, and allow empty TiDB passwords in e2e config.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
*/
import { mkdirSync, rmSync, readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
cursoragent and others added 3 commits August 22, 2026 04:37
… password.

- Redshift: omit sslmode from URL (node-pg verify-full vs self-signed); SSL via
  adapter Pool; compose entrypoint enables Postgres SSL; UI defaults SSL on.
- ClickHouse/DuckDB e2e: skipMigration (CH PRIMARY KEY DDL; DuckDB file flaky).
- E2E ConnectionModal: untick Save password when password is empty (TiDB root).

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
TiDB e2e now uses foxuser/foxpass so source stays connected after target
save. Redshift stand-in skips migrate (planner DDL not Postgres-compatible).
ConnectionModal dedupes schema options to avoid React key='main' clashes.

Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
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.

2 participants