Repository navigation
chore(cubejs): upgrade Cube.js 1.7.30 -> 1.8.16 - #102
Merged
Merged
Conversation
Bumps all @cubejs-backend/* to 1.8.16 and fixes what the upgrade breaks: - Dockerfile: bookworm base (glibc 2.36). Cube's x86_64 native module needs glibc 2.34 since 1.7.36; bullseye has 2.31. Java 21 replaces Java 8, which crashed the process on the JDBC drivers' --add-opens. Skip the bundled cubestored download (CubeStore runs as its own service), drop the unused Simba Databricks jar, and fail the build if the native module cannot load. - driverFactory: build drivers with Cube's own resolver. Drivers ship ESM entry points since 1.7.37, so `new (await import(pkg)).default()` threw "is not a constructor" on every raw-driver route. - driverFactory: refuse duckdb, sqlite and cubestore for tenant datasources. The upgrade makes DuckDB load, and it can read any file on the pod (/proc/self/environ holds JWT_KEY); cubestore holds every tenant's pre-aggregations. Only types Cube knows are accepted. - loadExport: import QueryType from the api-gateway root; 1.8 renamed the dist enum and the named import failed at link time, so the server could not start. - queryRewrite: under row rules, reject member paths through join aliases (new in 1.8). Rules attach to a path's first segment, so an aliased cube's rules would not apply. - Drop the Elasticsearch driver (removed upstream in 1.7.0) and swap the @knowitall Vertica alias for the official driver. - Postinstall: gate on 1.8.16; drop the ClickHouse String patch (fixed upstream in 1.7.38). The extract-zip shim goes: nothing in the tree requests extract-zip any more. Production audit: 97 -> 79 findings, criticals 3 -> 1, none introduced. - Tests: routes link against the installed packages; driverFactory builds real drivers and refuses blocked types; join-alias guard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- driverFactory: also refuse jdbc and databricks-jdbc. With Java 21 they now start, and a tenant-supplied customClassPath/drivername can load the HSQLDB or Derby jar bundled in the image and run Java in our JVM. Neither worked before (Java 8 crashed on --add-opens), so nothing in use is lost. - queryRewrite: the join-alias guard keys on the aliases models declare on their joins. Keying on "second segment is a known dimension" rejected granularity-ordered queries on views and on dimensions inherited through `extends`. - compose: the local query container keeps building missing rollups on demand (Cube 1.7.47+ no longer reads NODE_ENV as dev mode). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 31, 2026
Merged
acmeguy
added a commit
that referenced
this pull request
Oct 31, 2026
Cube removed its Elasticsearch driver and SQL dialect in 1.7.0, so every Elasticsearch datasource has failed since the 1.7.30 deploy, and #102 dropped the package. Database support does not disappear: the 1.6.76 driver and dialect are vendored as a local package (drivers/elasticsearch, Apache-2.0), which Cube resolves as `elasticsearch-cubejs-driver` for the type it no longer ships, with the dialect from the driver's static dialectClass(). Running on Cube 1.8: - driver on the installed base-driver/shared (the 1.6 package would install its old tree, decompress 4 included); Elasticsearch env vars read directly, since shared 1.8 dropped their names; - dialect always on the JS planner (as on 1.6; Tesseract has no Elasticsearch templates); - tablesSchema skips system indices (".geoip_databases" on 7.17 aborted the whole listing, so model generation failed); - prepareDbParams' elasticsearch case is back, without the fall-through into the Snowflake case. Verified against a real Elasticsearch 7.17: test connection, table listing, grouped measures, day granularity with a date range and filters return the right rows with CUBEJS_TESSERACT_SQL_PLANNER=true. 750/750 in the image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
acmeguy
added a commit
that referenced
this pull request
Oct 31, 2026
Cube removed its Elasticsearch driver and SQL dialect in 1.7.0, so every Elasticsearch datasource has failed since the 1.7.30 deploy, and #102 dropped the package. Database support does not disappear: the 1.6.76 driver and dialect are vendored as a local package (drivers/elasticsearch, Apache-2.0), which Cube resolves as `elasticsearch-cubejs-driver` for the type it no longer ships, with the dialect from the driver's static dialectClass(). Running on Cube 1.8: - driver on the installed base-driver/shared (the 1.6 package would install its old tree, decompress 4 included); Elasticsearch env vars read directly, since shared 1.8 dropped their names; - dialect always on the JS planner (as on 1.6; Tesseract has no Elasticsearch templates); - tablesSchema skips system indices (".geoip_databases" on 7.17 aborted the whole listing, so model generation failed); - prepareDbParams' elasticsearch case is back, without the fall-through into the Snowflake case. Verified against a real Elasticsearch 7.17: test connection, table listing, grouped measures, day granularity with a date range and filters return the right rows with CUBEJS_TESSERACT_SQL_PLANNER=true. 750/750 in the image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
acmeguy
added a commit
that referenced
this pull request
Oct 31, 2026
Cube removed its Elasticsearch driver and SQL dialect in 1.7.0, so every Elasticsearch datasource has failed since the 1.7.30 deploy, and #102 dropped the package. Database support does not disappear: the 1.6.76 driver and dialect are vendored as a local package (drivers/elasticsearch, Apache-2.0), which Cube resolves as `elasticsearch-cubejs-driver` for the type it no longer ships, with the dialect from the driver's static dialectClass(). Running on Cube 1.8: - driver on the installed base-driver/shared (the 1.6 package would install its old tree, decompress 4 included); Elasticsearch env vars read directly, since shared 1.8 dropped their names; - dialect always on the JS planner (as on 1.6; Tesseract has no Elasticsearch templates); - tablesSchema skips system indices (".geoip_databases" on 7.17 aborted the whole listing, so model generation failed); - prepareDbParams' elasticsearch case is back, without the fall-through into the Snowflake case. Verified against a real Elasticsearch 7.17: test connection, table listing, grouped measures, day granularity with a date range and filters return the right rows with CUBEJS_TESSERACT_SQL_PLANNER=true. 750/750 in the image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades all
@cubejs-backend/*from 1.7.30 to 1.8.16 and fixes everything the upgrade breaks or newly exposes.Breaks fixed
GLIBC_2.32 not foundat load). The build now fails fast if@cubejs-backend/nativecannot load.--add-opens, which Java 8 rejects by segfaulting the process.driverFactorybuilds drivers withServerCore.createDriver. Since 1.7.37 drivers ship ESM entry points, andnew (await import(pkg)).default()threw "is not a constructor" on every raw-driver route (test connection, get-schema, smart-gen, exports…).loadExportimportsQueryTypefrom the api-gateway root. 1.8 renamed the dist enum, and the named import failed at link time, so the server would not start.Stringpatch (fixed upstream in 1.7.38). The other four patches still apply unchanged.@knowitallVertica alias is swapped for the official driver.Security (new exposure from the upgrade)
duckdb,sqlite,jdbc,databricks-jdbc,cubestoreare refused./proc/self/environholdsJWT_KEY.customClassPathcan load the bundled HSQLDB/Derby jars and run Java in our JVM.cubestoreis our own store, holding every tenant's pre-aggregations.Dependency hygiene
extract-zipshim removed: nothing in the tree requests it any more.npm audit: 97 → 79 findings, criticals 3 → 1, none introduced.Verification
yarn test727/727; the new tests fail on the olddriverFactory/loadExport(is not a constructor,Named export 'QueryType' not found)./metamember lists identical./load: 109 identical results, 0 new-only errors. The 38 queries that fail on both versions are pre-existing model or data errors.test,get-schemaand the SQL API (row-rule partition filter injected) all match.Deploy notes (dev)
usedPreAggregationsin/loadis read as an object.NODE_ENV=development), keeps query-log values unredacted, and moves CubeStore to 1.8.16.Nullable(String)); 54/55 sampled rollups keep their table version.Not in this PR (pre-existing, found during review)
scripts/checkLiveSchemas.mjscompiles empty models since perf(cubejs): scheduler reads model code once per version, not every interval #95, so it fails every context on any version.🤖 Generated with Claude Code