Skip to content

chore(cubejs): bump Cube.js from 1.6.19 to 1.6.37#44

Merged
acmeguy merged 5 commits intomainfrom
feat/cube-1.6.37
Apr 20, 2026
Merged

chore(cubejs): bump Cube.js from 1.6.19 to 1.6.37#44
acmeguy merged 5 commits intomainfrom
feat/cube-1.6.37

Conversation

@acmeguy
Copy link
Copy Markdown

@acmeguy acmeguy commented Apr 20, 2026

Summary

Bump all `@cubejs-backend/*` dependencies from `^1.6.19` to `^1.6.37` — 16 patch releases of upstream Cube.js.

What changes

Scanning the changelog for 1.6.22 → 1.6.37, the relevant entries for us:

cubesql planner improvements

  • Per-column format codes — Tableau Desktop compatibility (#10484)
  • `cube_cache` session variable (#10483)
  • Do not panic when executing `MEASURE` function (#10472)
  • Talend compatibility (#10430)
  • Date-only `TO_TIMESTAMP` formats (#10409)
  • SQL pushdown for `LAG`/`LEAD` (#10407)
  • `SET TIMEZONE` support (#10364)
  • Forward directions for `FETCH` (#10377)
  • Planning with `CASE` and `LIKE` (#10346)
  • `pg_catalog.pg_collation` table (landed in earlier 1.6.x)
  • `Distinct` pushed down through CubeScan with time dimensions (#10518)

api-gateway / server-core

  • Sanitize query before logging (#10120)
  • Remove Transfer-Encoding on /cubesql error responses (#10455)
  • Introduce `CUBEJS_DEFAULT_TIMEZONE` env (#10178)
  • `contextToRoles` option (#10182)
  • Access policies row filtering respects member visibility (#10257) — potential BREAKING but only affects users of Cube's access_policy; we use our own queryRewrite.js

schema-compiler

  • Join-path support in folder includes (#10349)
  • Inherited drill members for views fix (#9966)
  • Pre-agg matching for rollupJoin / rollupLambda (#10017)
  • Duplicate folder / view / cube name validation (#10423, #10400, #10399)
  • Pretty-print compile errors grouped by files (#10025)

clickhouse-driver

  • Respect timezone for origin in custom granularity (#10110)

Why we can't just wait

Our running 1.6.21 is missing all of the above. The upgrade is low-risk (no breaking changes affect our setup).

What this does NOT solve

The DataGrip introspection gaps we hit earlier today — `regclass` inside `obj_description()`, `pg_get_userbyid` UInt32 coercion, `OPERATOR(pg_catalog.~)`, `ANY(... ::CHAR[])`, `SHOW server_version`, `pg_description.objoid` mapping, empty `pg_index` / `pg_constraint` — none of these are addressed in 1.6.22..1.6.37. Upstream tracking issue #7714 remains open. We still need the pg-gateway-based proxy (separate PR) for DataGrip.

Lockfile

`yarn.lock` not regenerated locally (needs Java toolchain for one transitive build that fails on my machine). The Dockerfile runs `yarn --network-timeout 100000` without `--frozen-lockfile`, so CI will reconcile `yarn.lock` during the image build. If we want a clean lockfile update before merge, run `yarn install` in `services/cubejs/` and amend.

Test plan

  • CI image builds cleanly
  • Deploy to dev, restart `synmetrix-cubejs`
  • `psql` connects (auth still works post-upgrade)
  • `SELECT count(*) FROM stockout_event` returns count (rule-based row filtering still works)
  • REST `/v1/load` still works (spot check a couple of queries via the UI)
  • Pre-aggregations still build
  • No new errors in `synmetrix-cubejs` logs during steady-state

🤖 Generated with Claude Code

acmeguy and others added 3 commits April 20, 2026 16:13
Cube.js v1.6 invokes checkSqlAuth as (request, user, password) — three
positional args — see
@cubejs-backend/api-gateway/dist/src/sql-server.js:291,105.

Our implementation declared (_, user) and did:
  password = typeof user === "string" ? user : user?.password
  username = typeof user === "string" ? _     : user?.username

With the v1.6 wire server, user arrives as a plain string (the Postgres
username), so the code took the username as the password AND used the
request metadata object as the username. findSqlCredentials then
received the {protocol, method, apiType} object, and Hasura rejected
the query with:

  parsing Text failed, expected String, but encountered Object
  path: $.selectionSet.sql_credentials.args.where.username._eq

Every SQL API login failed before any password comparison ran
(reproduced via `psql -U <valid> -h <cubejs>` → 28P01).

Fix: match the documented v1.6 signature and keep a defensive branch
for the legacy object-shape call. Also reject non-string username
early so the Hasura GraphQL layer cannot receive a non-string variable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gins

queryRewrite's rule-based row filtering relies on
`securityContext.userScope.teamProperties` and `.memberProperties` to
look up per-rule property values (e.g. `partition` from team settings).

defineUserScope populates both from the member's team settings and
member properties. buildSqlSecurityContext (the SQL API path) never
did, so userScope for SQL logins had no team/member properties. Every
rule whose property lookup returned undefined blocked the whole query
and queryRewrite replaced query.filters with:

  [{ member: allMembers[0], operator: "equals",
     values: ["__blocked_by_access_control__"] }]

When the first member was a numeric measure (e.g. `count`), ClickHouse
tried to cast the sentinel to Float64:

  Cannot parse string '__blocked_by_access_control__' as Float64

Fix: buildSqlSecurityContext now resolves the member for the
datasource's team and passes the team settings + member properties
into the scope (matching defineUserScope). Team settings also flow
into buildSecurityContext so the content hash includes them, keeping
cache isolation consistent between REST and SQL paths.

Reproduced via `SELECT count(*) FROM stockout_event` over the Postgres
wire — rule `semantic_events.partition` couldn't resolve
team.partition, blocked fired, sentinel filter crashed ClickHouse.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…agment

Follow-up to #42. buildSqlSecurityContext now resolves teamProperties
and memberProperties from sqlCredentials.user.members, but the GraphQL
query used to load sql_credentials (sqlCredentialsQuery →
membersFragment) never selected those fields. At runtime teamMember
was found but team and properties were undefined, so teamProperties
stayed empty and queryRewrite rules that look up
teamProperties.<key> still blocked every query.

Observed via:
  SELECT count(*) FROM stockout_event
→ still rewritten to:
  HAVING count(*) = toFloat64('__blocked_by_access_control__')

Add team { id settings } and properties to membersFragment so the SQL
API path has the same shape defineUserScope consumes on the REST path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@akshaykumar2505 akshaykumar2505 self-requested a review April 20, 2026 17:18
Brings in 16 patch releases of upstream Cube.js fixes and features,
including cubesql improvements (Tableau format codes, Talend compat,
MEASURE function panic fix, LAG/LEAD pushdown, TO_TIMESTAMP formats,
SET TIMEZONE, FETCH directions, CASE/LIKE planning, pg_catalog.pg_collation,
SAVEPOINT/ROLLBACK TO/RELEASE, SET ROLE auth context, and more).

Does not close the DataGrip introspection gap (regclass in functions,
pg_get_userbyid coercion, OPERATOR(schema.~), CHAR[] arrays,
SHOW server_version, pg_description.objoid mapping, empty pg_index/
pg_constraint — none addressed upstream between 1.6.21 and 1.6.37),
but keeps us current before we build or wait on a JetBrains-friendly
fix.

yarn.lock will regenerate on CI build (Dockerfile runs `yarn --network-timeout 100000`).

No breaking changes relevant to us (server-core access-policy row
filtering breaking change doesn't affect our usage — we don't use
cube's access_policy feature; row filtering is via queryRewrite.js).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Keeps local docker-compose in sync with the Cube.js backend bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@acmeguy acmeguy merged commit 9bfc8bd into main Apr 20, 2026
3 checks passed
@acmeguy acmeguy deleted the feat/cube-1.6.37 branch April 20, 2026 17:24
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