feat: add pull_checks table to clickhouse#522
Open
silent-cipher wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds ClickHouse persistence for pull check outcomes, aligning pull-check observability with other check types (storage/retrieval/retention) by emitting one pull_checks row per completed pull check attempt.
Changes:
- Add
pull_checkstable to ClickHouse startup migrations. - Emit a
pull_checksrow fromPullCheckService.runPullCheck()(latencies, throughput, statuses) after completion. - Update pull-check unit tests to inject a ClickHouse service mock and assert inserts on the success path.
- Remove outdated documentation claiming pull check results are not written to ClickHouse.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/checks/pull-check.md | Removes outdated statement about pull-check results not being written to ClickHouse. |
| apps/backend/src/pull-check/pull-check.service.ts | Captures pull-check outcome/latency metrics and writes a pull_checks row to ClickHouse in finally. |
| apps/backend/src/pull-check/pull-check.service.spec.ts | Adds ClickHouse service mock wiring and asserts an insert occurs on the happy path. |
| apps/backend/src/clickhouse/clickhouse.schema.ts | Adds ClickHouse DDL migration for the new pull_checks table. |
iand
reviewed
May 11, 2026
| PRIMARY KEY (probe_location, sp_address, timestamp) | ||
| PARTITION BY toStartOfMonth(timestamp) | ||
| TTL toDateTime(timestamp) + INTERVAL 1 YEAR`, | ||
| ]; |
Contributor
There was a problem hiding this comment.
We should think about resurrecting the migration code from #485 if there are going to be more schema changes.
This change should be ok because creating the table is idempotent
SgtPooki
requested changes
May 12, 2026
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.
#504 (comment)