Fix self-update broken by archive packaging; bump to 0.2.2#199
Closed
sdairs wants to merge 1 commit into
Closed
Conversation
`clickhousectl update` broke in 0.2.1: the release workflow now ships
`clickhousectl-{target}-v{version}.tar.gz` archives (each containing a
single dir with the binary inside), but `update.rs` was still looking
for an asset literally named `clickhousectl-{target}` — a raw binary,
no version, no extension. The asset lookup always failed with "No
compatible binary found for this platform". `npm/install.js` was
updated for the archive layout in the same dist rework; this codepath
was missed.
- update.rs: split the platform helper into `asset_target` +
`archive_name`; download the `.tar.gz`; extract the `clickhousectl`
entry via the already-vendored `flate2` + `tar` crates; feed the
bytes into the existing temp-write + chmod + atomic-rename path
- new test round-trips a release-layout tarball through the extractor
- bump clickhousectl, clickhouse-cloud-api, and npm/package.json to
0.2.2 in lockstep (plus the dep reference inside clickhousectl)
- CLAUDE.md: require lockstep bumps across both crates and the npm
package on every release, instead of the previous "only when API
client changed" rule for clickhouse-cloud-api
Note: existing 0.2.1 installs still need a one-time manual reinstall;
this fix only reaches users via 0.2.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
iskakaushik
approved these changes
May 19, 2026
Collaborator
Author
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
clickhousectl updatebroke in 0.2.1: the release workflow now shipsclickhousectl-{target}-v{version}.tar.gzarchives, butupdate.rswas still looking for a raw asset namedclickhousectl-{target}(no version, no extension), so the asset lookup always failed with "No compatible binary found for this platform". The npm installer was updated for the archive layout in the dist rework; this codepath was missed..tar.gz, extract theclickhousectlentry via the already-vendoredflate2+tarcrates, then feed the bytes into the existing temp-write + chmod + atomic-rename path. New unit test round-trips a release-layout tarball through the extractor.clickhousectl,clickhouse-cloud-api, andnpm/package.jsonto 0.2.2 in lockstep (plus the dep reference insideclickhousectl).CLAUDE.md: require lockstep version bumps on every release, replacing the prior "only when the API client changed" rule forclickhouse-cloud-api.Test plan
cargo build --workspacecargo test -p clickhousectl --bin clickhousectl update::— 5/5 pass, including the new tarball round-trip testcargo clippy -p clickhousectl --all-targets— cleanclickhousectl-{target}-v{ver}/clickhousectl)v0.2.2: install 0.2.1 from a fresh source, then runchctl updateand confirm it successfully upgrades to 0.2.2🤖 Generated with Claude Code