Skip to content

Polish local install confirmations - #354

Open
sdairs wants to merge 2 commits into
codex/issue-336-env-credential-precedencefrom
codex/issue-328-install-output-polish
Open

Polish local install confirmations#354
sdairs wants to merge 2 commits into
codex/issue-336-env-credential-precedencefrom
codex/issue-328-install-output-polish

Conversation

@sdairs

@sdairs sdairs commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • stop the local ClickHouse install handler from appending a generic human confirmation after the version manager has already reported the outcome
  • preserve the existing structured JSON install result for --json and coding-agent consumers
  • run the local-first install regression tests in human-output mode and assert that no generic confirmation is printed for a no-op

Why

The version manager already distinguishes real installs from reused builds, but the CLI layer always appended Installed version X. That produced duplicate confirmations after a real install and contradicted the no-op message when a matching version was already present.

Impact

A no-op install now ends after the accurate “already installed” message and --force hint. A real install keeps the single Installed ClickHouse X confirmation emitted by the version manager. JSON output is unchanged.

Stack

This PR is stacked on #352 and should be reviewed as the delta from codex/issue-336-env-credential-precedence.

Closes #328.

Validation

  • cargo fmt --all --check
  • cargo build -p clickhousectl
  • cargo test -p clickhousectl
  • cargo clippy -p clickhousectl --all-targets -- -D warnings

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a misleading/duplicate human-facing confirmation from the local ClickHouse install handler by relying on the version manager’s outcome-aware messages, while keeping the structured JSON install result unchanged for --json and coding-agent output.

Changes:

  • Suppress the CLI-layer “Installed version …” human output for local install, leaving human confirmations to the version manager and printing only in JSON mode.
  • Update the local-first install regression tests to run in human-output mode and assert that stdout contains no generic confirmation on no-op installs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/clickhousectl/src/local/mod.rs Only emit InstallOutput via print_output when json is enabled, avoiding duplicate/misleading human confirmations.
crates/clickhousectl/tests/local_install_local_first_test.rs Run install subprocesses in human-output mode and assert stdout is empty for no-op installs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/clickhousectl/src/local/mod.rs
@sdairs
sdairs force-pushed the codex/issue-328-install-output-polish branch from e09cda7 to 278c138 Compare August 3, 2026 18:42
@sdairs
sdairs force-pushed the codex/issue-328-install-output-polish branch from 278c138 to a2efcd2 Compare August 3, 2026 19:34
@sdairs
sdairs marked this pull request as ready for review August 3, 2026 20:04
@sdairs
sdairs requested review from iskakaushik and rndD as code owners August 3, 2026 20:04
@sdairs
sdairs force-pushed the codex/issue-328-install-output-polish branch from 4561a55 to efa1b41 Compare August 3, 2026 20:04
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.

Output polish: fix misleading and duplicate install confirmations

2 participants