Problem
A new clickhousectl release can be advertised before its downloadable archives exist on builds.clickhouse.com. The CLI discovers new versions through GitHub Releases (including its background update notice), but clickhousectl update, the quick-install script, npm installation, and cargo-binstall download from the builds mirror. During the gap, users see an available update and then hit a missing download.
Today the main ClickHouse repository's NightlyUpload workflow runs daily at 06:13 UTC. Its Upload clickhousectl job discovers the latest GitHub release, copies missing assets to s3://clickhouse-builds/clickhousectl/, and skips objects already present. Most runs do nothing; a new release can wait until the next daily run.
Move ownership of that mirroring into this repository's release workflow so the same release run uploads and verifies the assets immediately. This is a scoped onboarding task for a new CLI engineer; the owner will select the assignee.
Existing implementation and consumers
The current contract is four .tar.gz archives, one each for x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, x86_64-apple-darwin, and aarch64-apple-darwin. Preserve clickhousectl-{target}-{tag}.tar.gz and the existing internal archive layout. Public URLs are https://builds.clickhouse.com/clickhousectl/<archive-name>. Copy the release bytes; do not rebuild or repackage them. PyPI wheels are a separate output.
Work
- Adapt the existing uploader into this repo and integrate it with the release workflow for the exact tag being released, rather than discovering whichever release happens to be latest. Reuse the complete, smoke-tested artifact set from that run or its tagged GitHub release assets.
- Coordinate with the S3/infrastructure owner to obtain and configure upload credentials for this repository. Prefer an approved GitHub OIDC role if available, otherwise the approved release-secret mechanism. Scope access to the clickhousectl bucket prefix and use the appropriate protected release environment. The existing self-hosted runner's access must not be assumed to transfer to this repo. Record the owner/setup dependency; never place credential values in the issue or repository.
- Make publication ordering close the race: all expected public builds URLs must serve the matching archives before GitHub advertises the version as latest and before dependent package publication such as npm. A draft-release → upload/verify → publish sequence, or uploading the same workflow artifacts before public release creation, can achieve this. Simply adding a job after the current public release step leaves an update-availability window.
- Support safe retries and partial-upload recovery for a specific tag. Validate existing objects rather than silently accepting a mismatched archive. Report failures clearly and prevent publication from proceeding when mirroring/verification fails. Keep uploads restricted to valid release-tag runs; a manual workflow run on a branch must not upload branch-named artifacts.
- Coordinate cutover with the main ClickHouse repository: after the replacement is proven, retire its clickhousectl nightly upload job through the workflow's source/generation path. Preserve old release objects. Record both implementation and upstream cleanup PRs here.
Acceptance criteria
Milestone: v0.5.1. Follow-up tracker: #939. No credential provisioning or workflow implementation is performed by raising this issue.
Problem
A new clickhousectl release can be advertised before its downloadable archives exist on
builds.clickhouse.com. The CLI discovers new versions through GitHub Releases (including its background update notice), butclickhousectl update, the quick-install script, npm installation, and cargo-binstall download from the builds mirror. During the gap, users see an available update and then hit a missing download.Today the main ClickHouse repository's
NightlyUploadworkflow runs daily at 06:13 UTC. ItsUpload clickhousectljob discovers the latest GitHub release, copies missing assets tos3://clickhouse-builds/clickhousectl/, and skips objects already present. Most runs do nothing; a new release can wait until the next daily run.Move ownership of that mirroring into this repository's release workflow so the same release run uploads and verifies the assets immediately. This is a scoped onboarding task for a new CLI engineer; the owner will select the assignee.
Existing implementation and consumers
The current contract is four
.tar.gzarchives, one each forx86_64-unknown-linux-musl,aarch64-unknown-linux-musl,x86_64-apple-darwin, andaarch64-apple-darwin. Preserveclickhousectl-{target}-{tag}.tar.gzand the existing internal archive layout. Public URLs arehttps://builds.clickhouse.com/clickhousectl/<archive-name>. Copy the release bytes; do not rebuild or repackage them. PyPI wheels are a separate output.Work
Acceptance criteria
builds.clickhouse.comURL is verified for availability and byte/content integrity before latest-release announcement and npm publication.Milestone: v0.5.1. Follow-up tracker: #939. No credential provisioning or workflow implementation is performed by raising this issue.