Skip to content

[pull] master from cube-js:master - #673

Merged
pull[bot] merged 4 commits into
code:masterfrom
cube-js:master
Aug 18, 2026
Merged

[pull] master from cube-js:master#673
pull[bot] merged 4 commits into
code:masterfrom
cube-js:master

Conversation

@pull

@pull pull Bot commented Aug 18, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

RusovDmitriy and others added 4 commits August 18, 2026 11:47
…GCS auth (CUB-3900) (#11577)

* docs(monitoring): document Query History export tier requirement and GCS auth (CUB-3900)

Query History export is gated on the deployment's Monitoring Integrations Tier
being set to Medium, and below that tier it fails completely silently — no
events reach any sink, including a console sink, and nothing is logged. That was
undocumented and cost a four-week support thread.

- Document the tier requirement and the silent failure on the monitoring
  integrations page, next to the existing plan-availability note, and
  cross-reference it from the Query History export recipe.
- Add a Google Cloud Storage guide covering authentication: credentials_base64,
  the /etc/credentials/<sink-name>.json mount that credentials_path must point
  at, and the lowercase-and-dashes sink-name constraint.
- Disable the healthcheck in the GCS example, as the S3 example already does,
  with the reason: the gcp_cloud_storage healthcheck HEADs the bucket root and
  needs storage.objects.list, which roles/storage.objectCreator does not grant.

* docs(monitoring): clarify GCS credentials ownership from review (CUB-3900)

- Split the authentication table by which side consumes each option:
  credentials_base64 is handled by Cube and removed before the config reaches
  Vector, which is why it is absent from Vector's own sink reference;
  credentials_path is Vector's. A reader cross-checking the linked reference
  could otherwise have dropped the option the setup depends on.
- Paraphrase the healthcheck failure instead of quoting an exact log string, and
  note that with the healthcheck disabled the sink always reports healthy, so
  the bucket is the thing to check.
- Make "Exporting Query History" an H3 under Configuration, matching
  "Exporting logs".
- Add the missing trailing newline to the monitoring integrations page.

* docs(monitoring): drop credentials_path from GCS examples (CUB-3900)

credentials_base64 is the only supported way to supply GCS credentials, so
documenting credentials_path alongside it implied a second, configurable knob
that is not part of the supported surface.

- Remove credentials_path from the example and from the authentication section.
- State that credentials_base64 is the only supported mechanism, and that the
  credentials file is named after the sink — which is what makes the sink-name
  constraint load-bearing.
- Note that the environment variable name must start with CUBE_CLOUD_MONITORING_,
  since only variables with that prefix are exposed to the Vector agent.

* docs(monitoring): tighten GCS authentication wording from review (CUB-3900)

- Restore the Kubernetes-object-name reason for the sink-name constraint. The
  previous rewrite justified it with "the credentials file is named after the
  sink", which does not explain why underscores fail — filenames accept them.
- Drop the claim that there is "no path to configure". Removing credentials_path
  reflects the supported surface, but asserting that no path needs configuring
  states a mechanism that is not verifiable from this repo.
- Say "referencing the environment variable" rather than "set to the name of"
  it: the value is a $-prefixed reference, and the literal name would be
  base64-decoded as a string.
- Drop the duplicated credentials_base64 code block; the example above it
  already shows the option.
…11586)

`loadUserDefinedTypes` built its oid -> typname map with a reduce that
spread the accumulator on every row, copying the whole map n times. That
is quadratic and fully synchronous, so it blocks the event loop.

This went unnoticed while the query only selected `typcategory in ('U', 'E')`
(~20 rows on a stock Postgres). #11149 added `'A'` so that array-typed
columns get mapped, and Postgres auto-creates an array type for every
relation — the row count now scales with the number of tables in the
database, not with the number of actual user defined types.

Measured on postgres:16, `SELECT count(*) FROM pg_type WHERE typcategory
in ('U', 'E', 'A')`:

| tables in database | rows | spread reduce | in-place loop |
| ------------------ | ---- | ------------- | ------------- |
| 0                  |  313 |        6.3 ms |       0.12 ms |
| 5000               | 5313 |       2355 ms |       0.45 ms |
| ~20000             |   -  |      35116 ms |       1.10 ms |
…fined types (#11587)

#11149 needed array-typed columns to map to `text`, and selected all of
`typcategory = 'A'` to get there. Postgres creates a row type and an array
over it for every relation, so that selects one row per relation in the
database: the map stopped scaling with the types in use and started scaling
with the size of the catalog.

Those relation array types are only ever the type of a column for queries
that aggregate whole rows, which this driver does not issue, and a plain
composite column is already unsupported since `typcategory = 'C'` has never
been loaded. Arrays over a standalone `CREATE TYPE ... AS (...)` are kept,
they are real user defined types.

Measured on postgres:16 with 150 schemas of 20 tables, 3209 relations:

| query                | rows |
| -------------------- | ---- |
| typcategory in UEA   | 3317 |
| this one             |  108 |
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.