Skip to content

Make omitted local server selection deliberate - #514

Open
sdairs wants to merge 2 commits into
issue-475-local-structured-errorsfrom
issue-473-omitted-server-selection
Open

Make omitted local server selection deliberate#514
sdairs wants to merge 2 commits into
issue-475-local-structured-errorsfrom
issue-473-omitted-server-selection

Conversation

@sdairs

@sdairs sdairs commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve omitted ClickHouse server names through clap and dispatch while retaining positional and compatibility --name forms
  • make bare project-scoped server stop prefer an existing default, otherwise select the sole known ClickHouse server, succeed as a no-op with none, and require a name or stop-all with multiple non-default servers
  • keep bare server remove conservative: remove only an existing default, never infer a custom server, and return safe available-state guidance
  • distinguish implicit selection failures from explicit unknown-name typos in human and structured JSON output without expanding the bounded local error-code taxonomy
  • document the stop/remove policy and update the structured-error example

Closes #473

Tests

  • isolated subprocess coverage for zero, one, many, default, custom, running, stopped, Postgres-only, positional, and compatibility --name states
  • cargo fmt --all --check
  • cargo build -p clickhousectl
  • cargo check -p clickhousectl --no-default-features
  • cargo test -p clickhousectl
  • cargo clippy -p clickhousectl --all-targets -- -D warnings

Stack

@sdairs sdairs changed the title issue 473 omitted server selection Make omitted local server selection deliberate Aug 24, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ebf0cbb. Configure here.

Comment thread crates/clickhousectl/src/local/server.rs
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.

Make omitted local server name selection deliberate and actionable

1 participant