{{ message }}
fix(cli): rank chm-v* tags by semver and polish upgrade UX - #3149
Merged
Conversation
Follow-up to the chm upgrade alias: pick the newest published release instead of the first GitHub API match, normalize pin tags, and print copy-pasteable fallbacks on download failures. Also accept dashboard flags after the subcommand and make hosts/chart/table errors explicit. Co-Authored-By: duyetbot <bot@duyet.net> Co-authored-by: duyet <duyet@users.noreply.github.com>
Contributor
☁️ Cloudflare Preview Deployment
|
duyet
marked this pull request as ready for review
August 19, 2026 13:08
duyet
commented
Aug 19, 2026
duyet
left a comment
Member
Author
There was a problem hiding this comment.
Review: the diff matches the PR body. GitHub refuses a self-APPROVE on this token, so this is a comment review.
update.rspaginates releases, ranks publishedchm-v*tags by semver (newest_chm_tagskips drafts/prereleases), andnormalize_release_tagacceptschm-v0.2.0/v0.2.0/0.2.0/chm-0.2.0.- Download/API errors go through
with_fallback; unsupported targets still point atcargo installonly (no install.sh). install.shhas the same newest-published-tag pick (grep-based JSON, no jq),CHM_VERSIONnormalization, andCHM_INSTALL_SELF_TEST=1covering the draft-first / Helm-tag / prerelease fixture.main.rsglobal = trueon dashboard flags,--versionincludes the target triple, HTTP errors include copy-pasteable hints.- Docs (crate README, diagnostics-cli.mdx, standalone-cli.md) stay in sync.
Required CI (unit-tests, dashboard, plus rust-cli) is already green. Marked ready; arming squash auto-merge.
This was referenced Aug 19, 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.

Follow-up to #3147 for #3145. The alias itself already shipped; this pass fixes remaining upgrade-path bugs and CLI polish found while verifying that work.
Summary
chm upgrade/chm updateandscripts/install.shnow pick the newest publishedchm-v*tag by semver (not the first GitHub API match), normalize pin tags like0.2.0/chm-0.2.0, and print a copy-pasteable fallback on download failures. Dashboard flags work after the subcommand (chm hosts --base-url …).Changes
rust/ch-monitor-cli/src/update.rs: paginate GitHub releases;normalize_release_tag; download/API errors include install.sh / cargo fallbackscripts/install.sh: same newest-published-tag pick (skip drafts/prereleases);CHM_VERSIONnormalization;CHM_INSTALL_SELF_TEST=1rust/ch-monitor-cli/src/main.rs:--versionincludes target triple; help text for every command;global = trueon--base-url/--host-id/--api-key/--config; explicit hosts/chart/table HTTP errors; empty-result messagesdocs/content/guide/guides/diagnostics-cli.mdx,docs/knowledge/standalone-cli.mdLeft alone
chm updatestill works; telemetry stays("cli_run", "update")for both commandsCHM_LICENSE_KEYhonor-system ping unchangedTest plan
CHM_INSTALL_SELF_TEST=1 bash scripts/install.shcargo test --lockedinrust/ch-monitor-cli(running)cargo clippy --locked -- -D warningscargo fmt --all -- --checkchm --help/chm hosts --base-url http://127.0.0.1:9error copypnpm run lint— not applicable (Rust CLI / docs / install script)pnpm run build— not applicabledocs/content/docs/content/ai-agent.mdx— not applicableNotes for reviewer
Guess, then verified: install.sh
head -n 1onchm-v*grep matches GitHub created_at order (and can include drafts/prereleases). Live API currently returns a draftchm-v0.1.0before publishedchm-v0.1.1. Rust already ranked by semver; the installer did not.Pin
chm-0.2.0previously becamechm-vchm-0.2.0. Unsupported-target errors still point atcargo installonly (install.sh would refuse that platform too).Co-Authored-By: duyetbot bot@duyet.net