Repository navigation
Perf CI: find the performance reference build past master commits that have no MasterCI run - #127365
Conversation
…t have no MasterCI run A PR performance run looks for `Build (<arch>_release_performance_reference)` of the master commit it is tested on, and goes back to an older build only over commits where MasterCI skipped that job. A commit of a batched push has no MasterCI run at all, so the walk stopped there and the run was compared with the official build. On 2026-10-22 that happened for every PR based on a6c5f4a (its parent ffbc6be has no run), although 0ddba95 two commits back has a reference build of the same sources. The official build places the code differently from a PR build, and `long_primary_key` #0..ClickHouse#2 were 29-51% slower in the PR build, red on unrelated PRs. Prove "same sources" by the praktika digest MasterCI records for the job in `workflow_config_masterci.json` instead: pass over commits without a reference build and accept the newest older one only if its digest equals the one of the first commit with an official build. The last part of the digest hashes the job config, which includes the docker `--memory` computed from the Config Workflow runner's RAM, so it differs between runs with the same sources and is not compared. Any missing or unreadable record keeps the official fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding in 1 run) plus my own cold review (2 code nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261022-091900 |
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [e95b3ca] Summary: ✅
AI ReviewSummaryThe performance reference lookup can cross master commits without a Final VerdictStatus: ✅ Approve |
…rence build The praktika job digest does not include the Docker image digest when `run_in_docker` contains a colon, and `BINARY_DOCKER_COMMAND` does (`--volume=.:/ClickHouse`). A `clickhouse/binary-builder` change (compiler, PGO or BOLT profile) therefore leaves the sources digest of the reference build unchanged, as at ClickHouse#126309: `566499c799d454cd6e24` both at 2a95d09 (image 3480c0dc11) and at b1451e4 (image c815e89709). MasterCI schedules the reference build after such a change, so the old lookup stopped there, while matching by sources digest alone could take a reference built with the previous image whenever the new one is still running or failed. Compare `digest_dockers["clickhouse/binary-builder"]` of both MasterCI workflow configs as well; a missing image digest keeps the official build. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #124676
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Performance Comparison (arm_release, master_head, 3/6)has been red on unrelated PRs since 2026-10-22 05:00 UTC:long_primary_key#0..#2 are 29-51% slower. These runs compared the PR build with the official build instead of the performance reference build (#124676):The lookup goes back only over commits where MasterCI skipped the reference build. The parent
ffbc6be09ccame in a batched push and has no MasterCI run, so the lookup stopped, although0ddba953e4, two commits back, has a reference build of the same sources. On current master a build made like a PR build runs this primary key analysis slower than the official build: since 05:00 UTC, 14 of 14 such runs were more than 15% slower.Now the lookup takes the newest older reference build and uses it only if MasterCI recorded the same sources digest for the job at both commits (
digest_jobsinworkflow_config_masterci.json, without the last part, which hashes the runner-dependent job config) and the sameclickhouse/binary-builderimage digest, which the job digest does not include. Commits without a MasterCI run are passed over; a missing record or a failed fetch keeps the official build.Validation (local, read-only S3): starting at each of the last 40 master commits, on amd and arm, 75 lookups are unchanged and 5 that fell back to the official build now find a matching reference build. Missing or malformed reports, configs and digests fall back to the official build.
Not covered: a batched push where a commit other than the head changed sources while MasterCI skipped the build at the head (
26bf52e980) has no reference build with the same sources, so it still uses the official build.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127365]
Version info
26.11.1.589-master(included in26.11and later)