Support overriding the clickhouse binary with a PR build#988
Open
alexey-milovidov wants to merge 2 commits into
Open
Support overriding the clickhouse binary with a PR build#988alexey-milovidov wants to merge 2 commits into
alexey-milovidov wants to merge 2 commits into
Conversation
Add a `clickhouse_pr` env variable to the benchmark launcher. When set to a
ClickHouse/ClickHouse pull-request number, the clickhouse* systems benchmark
that PR's CI release build instead of the latest stable release; every other
system ignores it.
The value is set on the operator side (run-benchmark.sh), threaded to the VM
through cloud-init, and consumed only by the clickhouse* install scripts via a
new shared helper, lib/download-clickhouse. The helper resolves "the PR build"
as the newest PR commit whose `Build (<arch>_release)` CI check finished
successfully for the machine's architecture, then downloads the raw
self-extracting binary that build uploaded to S3:
https://clickhouse-builds.s3.amazonaws.com/PRs/<PR>/<SHA>/build_<arch>_release/clickhouse
Walking commits newest-first (falling back past a tip whose build is still
running, failed, or was skipped) implements "the last commit with a finished
release build". With no clickhouse_pr set the helper keeps the historical
`curl https://clickhouse.com/ | sh` behaviour.
The chosen PR is recorded in the log as a `ClickHouse PR:` line and parsed into
a new results.clickhouse_pr column (prepare-database.sql) so PR-build runs can
be filtered apart from normal results later.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds a
clickhouse_prenvironment variable to the benchmark launcher. When set to aClickHouse/ClickHousepull-request number, theclickhouse*systems benchmark that PR's CI release build instead of the latest stable release. Every other system ignores it.How
clickhouse_pris set on the operator side (run-benchmark.sh), threaded to the VM throughcloud-init.sh.in, and consumed only by theclickhouse*install scripts.lib/download-clickhouse, replaces the inlinecurl https://clickhouse.com/ | shin everyclickhouse*/install. With noclickhouse_prset it keeps the historical stable-download behaviour; with it set it resolves and downloads the PR build.Build (<arch>_release)CI check finished successfully for the machine's architecture (amd/arm), then the raw self-extracting binary that build uploaded to S3:GITHUB_TOKEN); fails loudly with a clear message if no successful build exists.Filtering results
The chosen PR is written to the log as a
ClickHouse PR:line and parsed bysink.parserinto a newresults.clickhouse_prcolumn so PR-build runs can be filtered apart from normal results (empty on a normal run). It is intentionally left out of the publishedoutputJSON, so the website payload is unchanged.Important
prepare-database.sqlis the schema definition; the live sink needs a manual migration to pick up the new column. SQL is in the PR discussion / provided to the operator.Scope
Touches the seven
clickhouse*systems that download the universal binary:clickhouse,clickhouse-trash-schema,clickhouse-web,clickhouse-parquet{,-partitioned},clickhouse-datalake{,-partitioned}. Leavesclickhouse-tencent(hardcoded PR build) andclickhouse-cloud(managed) alone.Testing
amdandarmproduced the correct, known-good S3 URL scheme.wgetstubbed: nativearmand forced-x86_64→amdboth resolve correctly; no-clickhouse_prfalls back to the stable installer; missing-build case exits 1 with a clear message; candidate ordering is head-first, newest→oldest, deduped.ClickHouse PR:extraction verified:81944→81944, empty →''.bash -n;cloud-init.shrenders and validates with and without the PR set; thesink.parserSELECT (18 cols) aligns with thesink.resultstable.🤖 Generated with Claude Code