Use builds.clickhouse.com as primary download source#76
Merged
Conversation
Switch from GitHub releases to builds.clickhouse.com as the primary download source for ClickHouse binaries, with transparent fallback to packages.clickhouse.com (Linux) and GitHub releases (macOS) for exact patch versions or older releases not available on builds. New version spec support: latest, stable, lts, major (25), minor (25.12), and exact 4-part (25.12.9.61). Post-download version detection via `clickhouse --version` for builds source. Minor-prefix dedup avoids redundant ~150MB downloads. Remote list now probes builds instead of GitHub API. New modules: spec.rs (version parsing), platform.rs (URL construction for all 3 sources). Adds --force flag to install command. Includes GitHub Actions CI workflow for install integration tests. Closes #74 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The minor-prefix dedup intentionally returns Ok with the existing version rather than erroring. Update the CI test to verify the "already installed" message instead of expecting failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous fallback used list_available_versions() which only fetches 100 releases — not enough to find older versions like 25.2. Replace with targeted matching-refs API calls (e.g., /git/matching-refs/tags/v25.2.) which find versions regardless of age in a single request. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
iskakaushik
approved these changes
Apr 1, 2026
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
builds.clickhouse.com(single binaries, no extraction needed)packages.clickhouse.com(Linux) and GitHub releases (macOS) for exact patch versions or older releases not on buildslatest,stable,lts, major (25), minor (25.12), exact (25.12.9.61)clickhouse --versionfor builds source (stores under exact version)install 25.12skips download if25.12.*already installed, hints--forcelocal list --remotenow probes builds.clickhouse.com with HEAD requests instead of GitHub API--forceflag toinstallcommandspec.rs(version parsing, 12 tests),platform.rs(URL construction for 3 sources, 22 tests)test-install.yml) with unit tests, URL probing (4-platform matrix), and full install integration tests (ubuntu + macos)Download source strategy
lateststable/lts25(major)25.12(minor)25.12.9.61(exact)Test plan
cargo test— 192 unit tests pass (including 39 new tests across spec, platform, resolve, install)cargo clippy— no new warningsclickhousectl local install latestdownloads from builds, detects version, stores correctlyclickhousectl local install 25.12downloads from builds, second run skips with hintclickhousectl local install 25.12 --forcere-downloadsclickhousectl local list --remoteshows versions from builds probingCloses #74
🤖 Generated with Claude Code