Validate local Postgres start options - #547
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ 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 ffaf557. Configure here.
|
Carry-over review from PR #486 (old PR for #460). The clap-time validation in this PR is better UX than #486's handler preflight (exit 2, env-key grammar, excellent reserved-key messages like "use
|
5d6035a to
a6b2ac9
Compare
35eb229 to
688b3a2
Compare
688b3a2 to
1e4a858
Compare
1e4a858 to
389e6ef
Compare
fda789f to
12eeca3
Compare
227421d to
d3774c9
Compare
aec8111 to
c249950
Compare
5108389 to
4ddfbde
Compare
4ddfbde to
661ddcd
Compare
661ddcd to
2a9150d
Compare
2a9150d to
2c9fe63
Compare
2c9fe63 to
8b03560
Compare
8b03560 to
e0790e0
Compare

Summary
-e POSTGRES_PASSWORD=...compatibility--envValidation layering
Clap parsers own individual value validation, and the post-parse hook owns cross-argument conflicts so invalid CLI input exits with usage code 2. The handler preflight intentionally revalidates at the side-effect boundary as defense in depth for non-CLI callers; explicit ports are checked there, while omitted ports remain unresolved until the fresh-create path.
Tests
cargo test -p clickhousectl --test local_postgres_start_validation_testcargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warningscargo fmt --all --checkbash -n scripts/test-postgres-integration.shThe full Docker-backed
scripts/test-postgres-integration.shwas not run locally because the configured OrbStack Docker socket was unavailable.Closes #460