Skip to content

Hint available build for unavailable exact installs - #367

Open
sdairs wants to merge 2 commits into
issue-357-server-start-namefrom
issue-341-exact-version-hint
Open

Hint available build for unavailable exact installs#367
sdairs wants to merge 2 commits into
issue-357-server-start-namefrom
issue-341-exact-version-hint

Conversation

@sdairs

@sdairs sdairs commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #341

Summary

  • preserve downloads for exact versions that have historical release artifacts
  • hint the newest indexed build in the same major.minor series when an exact rolling build is unavailable
  • preserve the generic no-match error when the series has no available build

Tests

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

@sdairs
sdairs requested review from iskakaushik and rndD as code owners August 5, 2026 12:36
@sdairs sdairs changed the title Hint retry for unavailable exact builds (#341) Hint available build for unavailable exact installs Aug 5, 2026
Comment thread crates/clickhousectl/src/version_manager/resolve.rs Outdated

@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 8b4d63e. Configure here.

Comment thread crates/clickhousectl/src/version_manager/resolve.rs
@sdairs
sdairs force-pushed the issue-341-exact-version-hint branch from 8b4d63e to d158f51 Compare August 5, 2026 13:42
@sdairs
sdairs requested a review from Copilot August 5, 2026 16:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 same major.minor series and return a dedicated error that includes a retry hint.
  • Introduce Error::ExactVersionUnavailable with 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 ExactVersionUnavailable wording 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.

Comment thread crates/clickhousectl/src/error.rs
@sdairs

sdairs commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Review triage note: Copilot’s suppressed summary suggestion to update the ExactVersionUnavailable assertion is already satisfied on the current head; the test asserts the exact rendered message and passes. No additional change is needed for that point.

@sdairs
sdairs force-pushed the issue-341-exact-version-hint branch from 3cec9e7 to faedd73 Compare August 5, 2026 18:28
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.

local install <exact> of a previously-installed build can fail after remove, with no hint at the nearest available build

2 participants