Skip to content

fix(ops): pin DuckDB 1.5.5 and attach the selected span catalog by literal - #849

Merged
anandpant merged 1 commit into
mainfrom
fix/phase3-telemetry-db-init
Nov 16, 2026
Merged

anandpant merged 1 commit into
mainfrom
fix/phase3-telemetry-db-init

Conversation

@anandpant

@anandpant anandpant commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

pnpm db --preview failed before running any query, so the PR 848 telemetry proof could not read retained rows. There were three causes:

  • DuckDB takes an ATTACH path only as a literal, so ATTACH getvariable(...) in duckdb-init.sql is a parser error. This holds on both 1.5.2 and 1.5.5.
  • The iceberg extension reads the catalog URL from ENDPOINT. It doesn't use URI.
  • DuckDB 1.5.2's iceberg extension aborts while reading R2 span manifests (DATE -> INTEGER). This is duckdb-iceberg#941, fixed in 1.5.3.

Change

  • mise.toml pins duckdb = "1.5.5".
  • duckdb-init.sql keeps the extension, the token secret and the production usage history attach (codemode_history), now with a literal warehouse and ENDPOINT.
  • pnpm db attaches only the selected span catalog as telemetry, using a literal warehouse, and then reads the views. The views moved unchanged to duckdb-views.sql. Each step runs as a DuckDB -cmd before the user's arguments. DuckDB still replaces the process, so it owns the terminal and Ctrl-C, and the first error exits 1.

Proof

  • A new test runs the real DuckDB and iceberg extension on the pinned release against a local Iceberg REST catalog, for preview and production. It checks the requested warehouses, the token, the selected span table and the DuckDB version. It fails on the previous init with the same parser error.
  • The test also fails for each of these mutations: always selecting production, attaching an extra span catalog, using URI, and running DuckDB 1.5.2.
  • pnpm ci:local --no-signoff against origin/main passed in 3m20s.
  • The signoff run of pnpm ci:local on the pushed head 63411b50 passed in 7s, reusing the native task cache, and posted local-ci success.

Limits

No live pnpm db run on 1.5.5 against R2 is part of this PR. A separate read of the selected preview catalog on 1.5.5, using a literal attach and the unchanged views, exited 0 with no matching rows. That read did not include INSTALL or the history attach.

Review

An independent Sol review (t3sj) accepted 63411b50 with no actionable findings in the change.

…teral

`pnpm db --preview` failed before any query: DuckDB takes an ATTACH path only
as a literal, so `ATTACH getvariable(...)` was a parser error. Behind it,
the iceberg extension reads the catalog from ENDPOINT, not URI, and DuckDB
1.5.2's iceberg extension aborts reading R2 span manifests (DATE -> INTEGER,
duckdb-iceberg#941, fixed in 1.5.3).

mise.toml pins DuckDB 1.5.5. The init file keeps the extension, secret and
production usage history; the launcher attaches only the selected span
catalog as `telemetry` with a literal warehouse, then reads the unchanged
views from duckdb-views.sql. Each step runs in DuckDB's own shell before the
user's arguments, so pnpm db still execs DuckDB for the terminal and fails
on the first error.

A real-DuckDB test drives each environment's command against a local Iceberg
REST catalog on the pinned release. It fails on the previous init with the
same parser error.
@anandpant
anandpant marked this pull request as ready for review November 16, 2026 23:42
@anandpant
anandpant merged commit 3ef7156 into main Nov 16, 2026
9 checks passed
@anandpant
anandpant deleted the fix/phase3-telemetry-db-init branch November 16, 2026 23:43
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