Skip to content

feat: backport xatu run, embedded ClickHouse schema and cannon ClickHouse coordinator to pq-devnet-1 - #1016

Merged
samcm merged 3 commits into
release/pq-devnet-1from
backport/pq-devnet-1-xatu-run
Dec 2, 2026
Merged

samcm merged 3 commits into
release/pq-devnet-1from
backport/pq-devnet-1-xatu-run

Conversation

@samcm

@samcm samcm commented Dec 2, 2026

Copy link
Copy Markdown
Member

Backports #1013, #1014 and #1015 to release/pq-devnet-1, so a local devnet can run xatu run with this branch's schema, including the otel_* tables that client telemetry from ethpandaops/ethereum-package#1551 lands in.

The three commits cherry-picked without conflicts. On a single ClickHouse node, xatu run applied the embedded set to kurtosis (version 40, including the 19 otel_* tables), and the server and cannon passed their table and column checks against it. The cannon, iterator, clickhouse and cmd test suites pass.

ampagent and others added 3 commits December 2, 2026 11:31
The xatu migration set is now compiled into the binary.
`xatu migrate clickhouse --dsn <dsn>` creates the DSN's database on the
'{cluster}' cluster if it is missing and applies the set to it, keeping
state in schema_migrations_xatu like the golang-migrate CLI does, so the
two can be mixed on one database. The image and its schema can no longer
drift apart.

Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
…ype clickhouse

Cannon needed a xatu server with Postgres just to remember where each
deriver is. coordinator.type: clickhouse keeps that in a cannon_location
ReplacingMergeTree table in the DSN's database instead, created on start
if missing, so a cannon writing straight to ClickHouse needs nothing else.
The default stays grpc.

Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
xatu run reads one config with a shared ClickHouse DSN and a services
list of {name, type, config} entries, where config takes the same keys as
xatu <type>. It applies the embedded schema to the DSN's database, then
starts each service writing straight to it: the server with a ClickHouse
output ahead of its own outputs, and cannon with the same output and its
positions in ClickHouse. One metrics listener serves every service, so a
service skips its own when metricsAddr is empty. Server and cannon are
supported, at most one of each.

Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backports xatu migrate clickhouse (embedded schema), the ClickHouse cannon coordinator, and xatu run onto release/pq-devnet-1. I traced the run orchestration, the migration DSN/URL handling and driver behaviour (multi-statement split, x-migrations-table, database creation), the new coordinator store, and the metrics-registration paths; the new deps (clickhouse-go v1.4.3, golang-migrate v4.20.1) are OSV-clean and the pgx bump actually clears a critical advisory. The change looks sound; I have one non-blocking design question about the coordinator table's engine.

Design Notes

💭 Should cannon_location replicate like the rest of the schema? (pkg/cannon/coordinator/clickhouse.go)

  • Risk: It is created as a local ReplacingMergeTree with no ON CLUSTER, so on a multi-node ClickHouse (docs/run.md says the DSN's database needs a {cluster} macro and Keeper because the schema is replicated) a cannon that lands on another replica reads no position and takes the fresh-start path, silently restarting at the finalized ceiling.
  • Option: Create it ON CLUSTER '{cluster}' with ReplicatedReplacingMergeTree (as every table in deploy/migrations/clickhouse/xatu is), or state in docs/run.md and docs/cannon.md that coordinator.type: clickhouse needs a single node.

Reviewed 22 changed file(s) @ 8b5c4fc3 — no blocking issues found.
"Backups are useless. Restores are everything."

@samcm
samcm merged commit 0a13179 into release/pq-devnet-1 Dec 2, 2026
10 checks passed
@samcm
samcm deleted the backport/pq-devnet-1-xatu-run branch December 2, 2026 11:57
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