ClickHouse / ClickHouse/clickhousectl
Render Postgres log lists as readable human output
- Dominant language
- Rust
- Stars
- 74
- Forks
- 5
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 196
Description
## Validated scope and current-PR plan — 2026-09-11
This section records the QA review and the current decision to finalize existing PRs without opening new PRs. It supersedes the proposed routing/fix suggestions in the original report below; the original observations are retained. Central plan: #757.
### Work for the existing PRs
Implementation status: the checked sub-items below are implemented on the existing PR branches and validated locally on combined head `82b374816a917cbac3a68194659beaaa5c7c9087`. Required final-head Cloud CI and merging remain pending; this issue stays open. See #757 for the combined validation and CI status.
- [x] #811 — Resolve the empty-array-only slow-query detail producing zero human-output bytes; preserve JSON omission of an absent aggregate.
### Remaining scope
Logs/slow-query tables, metrics presentation and any dedicated no-match message beyond explicit empty-value rendering remain deferred.
This is a partial assignment. Keep the issue open after these PRs land; use sub-item references rather than a whole-issue closing keyword.
### Validation and corrections
Reproduced zero human-output bytes for {recentExecutions: []} with all required get selectors supplied. Rendering [] through the shared renderer already resolves that manifestation. Logs/slow-query tables and metrics presentation are a distinct human-output PR, not #773’s fractional-duration tests. Do not add aggregate:null casually: response None fields deliberately serialize as omitted under the library’s documented contract.
---
## Original QA report
Found in the 2026-09-11 QA sweep of the combined PR stack at [`d2c37f81`](https://github.com/ClickHouse/clickhousectl/commit/d2c37f814fff53fe68d636e34103e2d0550bf84d), top PR #823, installed release build (package version still 0.4.2). Reproduced behaviour only; no implementation included.
Severity: medium; AGENTS.md says list views stay `tabled`; these are list views.
- `logs`: the useful text is a JSON document inside the `body` string, so a human sees a wall of escaped JSON per entry.
- `slow-queries list`: 19 fields per pattern, no table, no ordering cue.
- `metrics`: full nested metric/series/dataPoint tree, one `timestamp`/`value` per line; timestamps are bare epoch integers (`1789117200`) although the request takes RFC 3339. A 2-hour window at 60 s buckets is ~1300 lines.
- `slow-queries get ` with no matching pattern prints **zero bytes**, exit 0 in human mode; JSON is `{"recentExecutions": []}` with `aggregate` absent. `logs` correctly prints `No Postgres logs found`.
Suggested: table the list views on the 4–6 useful columns (logs: timestamp / severity / `body.message`; slow-queries: queryText / callCount / avgDurationUs / totalDurationUs), keep the full document in `--json`; render data-point timestamps as RFC 3339 in human output; `No slow query pattern found for ` and a stable `aggregate: null` in JSON.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the validation and CI status in #757 and the existing PR branches, including #811. Reproduce human output for `logs`, `slow-queries list`, and `metrics`; done means the remaining tables and metric presentation are readable while JSON behavior stays intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rust
- Domain
- cli, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100