Hint available build for unavailable exact installs - #367
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ 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 8b4d63e. Configure here.
8b4d63e to
d158f51
Compare
There was a problem hiding this comment.
Pull request overview
Improves the local version resolver’s error path for exact-version installs by preserving existing historical downloads when present, and by providing a more actionable hint (nearest available build in the same minor series) when an exact rolling build can’t be resolved from the index.
Changes:
- Enhance
resolve_exact()to, on exact-version miss, look up the newest available version in the samemajor.minorseries and return a dedicated error that includes a retry hint. - Introduce
Error::ExactVersionUnavailablewith a multi-line, actionable message. - Add unit tests covering the new error construction and ensuring the message includes the expected retry guidance.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/clickhousectl/src/version_manager/resolve.rs | Adds exact-version miss handling that searches the major.minor series for the newest available build and returns a more actionable error. |
| crates/clickhousectl/src/error.rs | Introduces a dedicated error variant and test to surface a “nearest available” hint for unavailable exact installs. |
Suppressed comments (1)
crates/clickhousectl/src/error.rs:168
- Update this assertion to match the adjusted
ExactVersionUnavailablewording so the test continues to validate the exact rendered message.
assert_eq!(
error.to_string(),
"build 26.2.8.7 is no longer available for download.\n\
Nearest available in the 26.2 series: 26.2.20.4 \
(try `clickhousectl local install 26.2`)"
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Review triage note: Copilot’s suppressed summary suggestion to update the |
3cec9e7 to
faedd73
Compare

Closes #341
Summary
Tests
cargo fmt --all --checkcargo test -p clickhousectlcargo clippy -p clickhousectl --all-targets -- -D warnings