ClickHouse / ClickHouse/clickhousectl
Suggest installed alternatives when removing the default local version
- 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] #816 — Correct init JSON paths on a no-op and on a gitignore-only repair; update the existing repeated-init test that currently expects the misleading path.
- [x] #818 — Add the ClickHouse-only scope of `server list --global` to the Postgres parent help. No new global Postgres discovery behavior.
### Remaining scope
Other local hints remain deferred. Quoted empty dotenv values are valid, and successful informational guidance is not intrinsically an error; those suggestions are not accepted bug fixes. Adding global Postgres discovery is separate functionality.
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 no-op init returning .clickhouse/. An existing test explicitly expects that output and must change to match the corrected contract; also report when only the gitignore was repaired. The global Postgres exclusion is already explicit on server list help; add it to the Postgres parent as a small #818 follow-up. New cross-project Postgres discovery is separate functionality. Quoted empty dotenv values are valid; successful guidance arrays are not intrinsically erroneous. Keep useful hints and treat local remove/source-.env improvements as separate local help polish.
---
## 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: low; batch (three independent agents hit the first item).
- `local init --json` on a fully initialised project returns `{"paths": [".clickhouse/"]}` every time although nothing was written (`.gitignore` mtime unchanged); `clickhouse/` and `postgres/` are correctly omitted once present. Human mode says "Already initialized". A script branching on non-empty `paths` gets a false positive. Omit `.clickhouse/` when nothing under it was created.
- Successful, legitimately empty `local server list` (exit 0) includes a `guidance` array (`return_to_project_root`, …), which elsewhere accompanies errors only.
- `local server dotenv --password ""` writes `CLICKHOUSE_PASSWORD=""` (quoted) while every other value in the file is unquoted.
- `local server list --global` is ClickHouse-only (its help says so); `local postgres --help` says "`local server list` shows ClickHouse and Postgres together" without noting that `--global` does not, and no `chctl` command can find a Postgres instance outside its project directory (only `docker ps` + the `clickhousectl.project=` label). Document it on the `local postgres` CONTEXT block; consider `--global` coverage.
- `local remove ` on the default version always hints `clickhousectl local use latest` even when another version is already installed and would satisfy the guard without a download.
- `local server dotenv` stdout is not `eval`-safe by design (file + preview); a CONTEXT line "then `source .env`" would pre-empt the `eval "$(…)"` instinct.
Contributor guide
No contributing guide indexed for this repository
Research direction
The original report mentions `local remove ` suggesting `clickhousectl local use latest` even when another installed version is available, but the updated scope explicitly supersedes that suggestion and defers local remove improvements. Read the current plan in #757 before taking action; this issue remains open for other scope, and no specific files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100