Skip to content

fix(cubejs): every datasource form connects; compile errors arrive one by one - #104

Merged
acmeguy merged 1 commit into
mainfrom
fix/datasource-forms
Oct 31, 2026
Merged

acmeguy merged 1 commit into
mainfrom
fix/datasource-forms

Conversation

@acmeguy

@acmeguy acmeguy commented Oct 31, 2026

Copy link
Copy Markdown

Stacked on #103. Found while making sure cxs2 supports every datasource type: several types the UI offers could never connect.

Datasource fixes (prepareDbParams + one driver patch)

Type Was Now
Presto / Trino Form password (pass) never read; presto-client only uses basic_auth basic_auth: { user, password }
SQL Server SSL checkbox ignored (driver reads options.encrypt); Azure SQL couldn't connect options: { encrypt: ssl, useUTC: true }
Hive Form writes user/database; driver reads username/dbName Mapped
Firebolt Driver read its login from server env first and crashed with none; connection lacked auth/account Env read patched (`
DuckDB MotherDuck token sent as motherduck_token; driver reads motherDuckToken Fixed key

Compile errors

validate, validate-in-branch, reconcile-team and the smart-gen model validator read compiler.errorsReport, which Cube renamed to errorsReporter (already gone in 1.7.30). Every structured error was lost and callers got one thrown blob; now each error arrives separately. The cxs2 save gate relies on this.

Verification

  • Image yarn test 747/747.
  • New tests:
    • each mapping;
    • Firebolt constructs with the datasource's own login on a server with no CUBEJS_DB_USER;
    • compile errors read one by one from errorsReporter, with errorsReport confirmed undefined.

🤖 Generated with Claude Code

@acmeguy
acmeguy force-pushed the fix/datasource-forms branch 2 times, most recently from f54963d to 959a28c Compare October 31, 2026 13:01
…e by one

Datasource types the UI offers but that could never connect:
- Presto / Trino: the form's password (`pass`) was never read; presto-client
  authenticates only with basic_auth.
- SQL Server: the SSL checkbox was ignored (the driver reads options.encrypt),
  so encrypted-only servers (Azure SQL) never connected.
- Hive: the generic form writes user/database; the driver reads
  username/dbName.
- Firebolt: the driver read its login from server env first and crashed when
  there was none, and the datasource's connection lacked the auth shape and
  account the driver uses. Patched the env read; mapped the form onto
  connection.auth (email login or service-account id/secret) + account.
- DuckDB: the MotherDuck token went to motherduck_token; the driver reads
  motherDuckToken.

Compile errors: validate, validate-in-branch, reconcile-team and the smart-gen
model validator read compiler.errorsReport, which Cube renamed
errorsReporter (gone since at least 1.7.30), so every structured error was
lost and callers got one thrown blob.

747/747 in the image.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@acmeguy
acmeguy force-pushed the fix/datasource-forms branch from 959a28c to 33966ce Compare October 31, 2026 13:39
@acmeguy
acmeguy changed the base branch from fix/restore-db-types to main October 31, 2026 13:48
@acmeguy
acmeguy merged commit 749eb15 into main Oct 31, 2026
3 checks passed
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.

1 participant