Default local teardown to the default instance - #355
Open
sdairs wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Makes local teardown commands symmetric with start by defaulting the omitted instance name to "default" for both ClickHouse and Postgres, improving the default-instance lifecycle and reducing clap parse failures.
Changes:
- Default positional
<NAME>to"default"forlocal server stop/removeandlocal postgres stop/remove. - Add clap parse tests covering omitted-name defaults and explicit-name preservation.
- Update README examples and wording to document the default-instance teardown flow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Documents stop/remove without a name as operating on "default" for ClickHouse and Postgres. |
| crates/clickhousectl/src/local/cli.rs | Implements clap defaults for teardown commands and adds parse-coverage unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sdairs
force-pushed
the
codex/issue-326-default-local-instance
branch
from
August 3, 2026 18:42
e38743c to
918bcd5
Compare
sdairs
force-pushed
the
codex/issue-326-default-local-instance
branch
from
August 3, 2026 19:34
918bcd5 to
424fc86
Compare
sdairs
force-pushed
the
codex/issue-326-default-local-instance
branch
from
August 3, 2026 20:04
424fc86 to
09d0c47
Compare
sdairs
marked this pull request as ready for review
August 3, 2026 20:12
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.
Summary
defaultfor ClickHouseserver stopandserver removepostgres stopandpostgres removeWhy
startcreates or resumes thedefaultinstance when no name is supplied, but the matching teardown commands required a positional name. This made the natural default-instance lifecycle fail at argument parsing before the command could run.Impact
Users can now start, stop, and remove the default ClickHouse or Postgres instance without typing its name. Explicit names and existing disambiguation flags continue to work unchanged.
Stack
This PR is stacked on #354 and should be reviewed as the delta from
codex/issue-328-install-output-polish.Closes #326.
Validation
cargo fmt --all --checkcargo build -p clickhousectlcargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warnings