Skip to content

Add checksum verification to CLI installation and upgrades - #370

Merged
AmoebaProtozoa merged 3 commits into
tidbcloud:mainfrom
AmoebaProtozoa:codex/add-installer-checksums
Oct 15, 2026
Merged

AmoebaProtozoa merged 3 commits into
tidbcloud:mainfrom
AmoebaProtozoa:codex/add-installer-checksums

Conversation

@AmoebaProtozoa

@AmoebaProtozoa AmoebaProtozoa commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Add SHA-256 verification to CLI installation and upgrade downloads. Upgrades resolve a concrete release version, then download install.sh and checksums.txt from that release. The installer is verified before execution, and the release archive is verified before extraction.

The release build stamps the installer with the release version, publishes it as a release asset, and includes its SHA-256 in the generated checksum manifest. This keeps installer versions and checksums in the release pipeline without embedding a revision or checksum in the CLI.

Both upgrade modes share the same verification flow. Version lookup, download, and checksum failures stop the upgrade. Custom mirrors remain supported over HTTPS, with checksum manifests fetched from the official GitHub release.

The new upgrade flow requires the installer asset and checksum entry, which will be published automatically starting with the next release.

Validation:

  • go test -race -cover -count=1 ./...
  • golangci-lint v1.64.7 run ./... with Go 1.24.0
  • Shell syntax checks and GoReleaser v2.1.0 configuration validation
  • Local snapshot build for all supported platforms, with every generated manifest entry verified, including install.sh
  • Tests cover release version selection, installer and archive checksum validation, download failures, mirror validation, and release installer generation.

@pingcap-cla-assistant

pingcap-cla-assistant Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot Bot added the size/XL label Oct 15, 2026
@ti-chi-bot ti-chi-bot Bot added size/XXL and removed size/XL labels Oct 15, 2026
@AmoebaProtozoa
AmoebaProtozoa marked this pull request as ready for review October 15, 2026 06:04
@AmoebaProtozoa
AmoebaProtozoa merged commit d462e3a into tidbcloud:main Oct 15, 2026
7 checks passed
@AmoebaProtozoa
AmoebaProtozoa deleted the codex/add-installer-checksums branch October 15, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants