Skip to content

Validate local client selectors and reject port zero - #551

Open
sdairs wants to merge 2 commits into
stack/464-transactional-postgres-startfrom
stack/466-validate-client-selectors
Open

Validate local client selectors and reject port zero#551
sdairs wants to merge 2 commits into
stack/464-transactional-postgres-startfrom
stack/466-validate-client-selectors

Conversation

@sdairs

@sdairs sdairs commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reject mixed named and direct local client selectors during clap parsing
  • reject port zero while preserving host-only and port-only direct-mode defaults
  • apply equivalent validation to local Postgres clients without changing pass-through arguments
  • document selector behavior and cover parse-time and fake-child execution paths

Tests

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

Closes #466

@sdairs

sdairs commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

Carry-over review from PR #492 (old PR for #466). This PR is strictly superior to #492 and approved on its own merits: same minimal clap mechanism, the --version+direct-mode concern (the only review-driven change #492 needed, raised by macroscope and fixed by sdairs in e3c74bc) is handled from the first commit here and covered in both orders end-to-end, README docs added per repo convention, exhaustive 10-order permutation tests, passthrough-preservation guards, and filesystem-level proof that invalid input fails before any project-state creation. No further changes required for this PR itself.

One dependency note: this PR's local postgres edge cases CI job fails (3 cases: install_rejects_latest, port_zero_rejected, unsupported_majors) — inherited from the stack base (#547 changed port-zero rejection wording to clap's 0 is not in 1..=65535 and version wording, without updating scripts/test-postgres-integration.sh). That script reconciliation belongs to #547; once it lands and the stack rebases, this job should go green here.

@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from 2a1f5cb to ba16579 Compare August 26, 2026 18:58
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from ba16579 to 5c40a91 Compare August 26, 2026 19:01
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from 5c40a91 to 0932aa2 Compare August 26, 2026 19:03
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 68d8be0 to fe093a5 Compare August 26, 2026 19:10
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 3 times, most recently from b282ed3 to dc01a6b Compare August 26, 2026 19:24
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from dc01a6b to 41d14f1 Compare August 26, 2026 19:28
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 830a5ec to 63aa9b3 Compare August 26, 2026 19:34
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 7ffcc07 to 92299cd Compare August 26, 2026 20:10
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from 92299cd to 6e894f1 Compare August 26, 2026 20:30
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 207162c to 6daf687 Compare August 26, 2026 20:38
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from 6daf687 to b9ac684 Compare August 26, 2026 20:41
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 36b756c to 5e30de2 Compare August 26, 2026 20:49
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from 5e30de2 to c766a16 Compare August 26, 2026 20:55
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 4870891 to c5e8870 Compare August 27, 2026 06:44
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch 2 times, most recently from 0d6aa0e to 1fa0441 Compare August 27, 2026 10:13
@sdairs
sdairs force-pushed the stack/466-validate-client-selectors branch from 1fa0441 to 7f434f6 Compare August 27, 2026 10:51
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.

Validate local client selectors and reject port zero

1 participant