Repository navigation
Perf CI: gate the check on the performance dashboard's confirmed regressions - #120927
Conversation
…rdict The `Check Results` status of a `master_head` performance shard failed only when more than 10 queries were "slower". A single large regression therefore passed: #120176 was merged with `tpcds` query 71 going from 0.24 s to 5.67 s (+2225%) on arm, reported as `1 slower` and green, while the performance dashboard classified it as `confirmed_regression`: https://performance.ci.clickhouse.com/runs/pr-120176-a42ceaeced57aba347467f9940f33abe4fb50388 The dashboard computes a run from the tables this job uploads in the REPORT stage and judges every changed query with a confidence tier built from the raw per-run samples of both sides, the quantile shift and the recent master history of the same query. In `master_head` mode that verdict now decides the status: after the uploads, the job waits until the dashboard serves this shard's data (the `/tests/<test>` detail lists this arch), fetches `/runs/<run>/confidence` for `client_time`, keeps the slowdown rows of this shard and arch, and fails the check when any of them is `confirmed_regression`. The confirmed rows are added to `Check Results` with a link to the dashboard's query page. If the dashboard does not answer within ten minutes the check fails with the reason instead of passing an unjudged run. The `release_base` mode keeps its delta gate on slower counts, because that comparison is cumulative since the release branch point and is not what the dashboard's PR runs describe. Related: #120921
|
Workflow [PR], commit [e6a5981] Summary: ✅
AI ReviewSummaryThis PR switches the Findings
Final Verdict
|
| print(f"Waiting for the performance dashboard: {reason}") | ||
| time.sleep(DASHBOARD_POLL_INTERVAL_SEC) | ||
|
|
||
| rows = fetch_dashboard_slowdowns(run_id, arch, shard_queries) |
There was a problem hiding this comment.
perf_dashboard_gate only retries the run lookup / dashboard_has_shard probe. Once that loop breaks, fetch_dashboard_slowdowns hits /runs/<run>/confidence exactly once.
That means a transient HTTP error there, or a short lag where the test page is already visible but the confidence view is still being computed, turns the whole master_head check red immediately even though DASHBOARD_INGEST_TIMEOUT_SEC still has budget left. This violates the PR's "wait up to ten minutes for a dashboard verdict" contract and will make the perf gate flaky.
Please keep polling until the same deadline covers a successful confidence fetch as well, or gate directly on the per-test /runs/<run>/tests/<test>/confidence endpoint and treat "no row yet" as "keep waiting".
The performance image inherits `TZ=Europe/Amsterdam` from `test-base`, and the job wrote `datetime.now()` and `datetime.fromtimestamp()` into the UTC `event_date`, `event_time` and `check_start_time` columns, so every row was two hours ahead in summer. For a run that uploads after 22:00 UTC, `event_date` is the next day. The performance dashboard lists runs only up to the current UTC date, so it did not list such a master run until UTC midnight, and the dashboard gate failed the shard with `no master run for sha <sha> yet`. Every red master perf shard since #120927 started between 18:00 and 24:00 UTC. Example: `Performance Comparison (amd_release, master_head, 5/6)` of master `8b9fd5bf05d1` started at 21:12:24 UTC per `checks`, while its `perf_test_times_v1` rows carry `check_start_time` 23:10:52 and `event_date` 2026-09-20. The previous commit of this branch skipped the gate on master, which would have removed the only regression verdict of `master_head` on master; it is reverted.
In `master_head` mode a master run looked up its own run on the performance dashboard and failed the check when the dashboard did not list it within 600 s (`no master run for sha <sha> yet`). About 20% of the red performance checks since ClickHouse#120927 were master runs failing this way. A master run has nothing to block, so the gate now runs only for PRs; run errors still fail the check.
The REPORT-stage uploads of a performance shard probed CIDB once and
skipped the whole step when that probe failed ("CIDB not ready -
skipping"), and a failed INSERT was not retried either. That was fine
while the tables were informational (ClickHouse#108712), but since ClickHouse#120927 the
performance dashboard computes the master_head verdict from exactly
these tables. A CIDB refusal of seconds or an overload of minutes
therefore dropped the shard's rows, and perf_dashboard_gate then waited
600 s for data that was never sent and failed the shard with "dashboard
did not serve this shard within 600s", blaming the dashboard.
Measured: ClickHouse#113589 arm 6/6 skipped all three uploads on "Connection
refused" and failed after 614 s. On 2026-09-25 a CIDB overload
(TOO_MANY_SIMULTANEOUS_QUERIES, read timeouts) failed 70 shards on 21
PRs and master. In 74 of the 76 occurrences since 2026-09-22 that are
not the time zone shape fixed by ClickHouse#121847, an upload was skipped or
failed. The same run of ClickHouse#122252 is the control: amd 1/6 uploaded and
got its verdict in 2 s, while arm 6/6 skipped the uploads and failed.
Now one helper runs all four INSERT sites. In master_head mode the
three tables the verdict is computed from (query_metric_runs_v1,
query_metrics_v2, perf_test_times_v1) are retried every 60 s until one
600 s deadline, which is taken when the uploads start and shared with
the gate's wait. The other tables keep a single attempt, and nothing is
sent after the deadline. Every attempt carries the same
insert_deduplication_token, because some INSERTs that timed out on the
client had committed on the server. If one of the three inputs was not
uploaded, the gate fails at once and names it instead of polling the
dashboard. A shard without a verdict still fails, as ClickHouse#120927 designed,
and release_base keeps its single call.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A
master_headperformance shard failed only when more than 10 queries wereslower, so a single large regression passed. #120176 was merged green whiletpcdsquery 71 went from 0.24 s to 5.67 s (+2225%) on arm: the shard reported1 slower, and the performance dashboard classified the same row asconfirmed_regression: https://performance.ci.clickhouse.com/runs/pr-120176-a42ceaeced57aba347467f9940f33abe4fb50388The dashboard computes a run from the tables this job uploads in the REPORT stage and judges every changed query with a confidence tier built from the raw per-run samples of both sides, the quantile shift, and the recent master history of that query. This PR makes that verdict the gate in
master_headmode:/runs/<run>/tests/<test>detail lists this arch), then fetches/runs/<run>/confidence?metrics=client_time;confirmed_regressionfailCheck Resultsand are added to it as failed rows linking the dashboard's query page (likely_regressionandnoiserows are only logged);The
release_basemode keeps its delta gate on slower counts: that comparison is cumulative since the release branch point and is not what the dashboard's runs describe.Checked against the live API with a throwaway script: the arm shard of PR 120176 yields exactly
tpcds #71andtpcds #58as blocking, the amd shard 2/6 of PR 120677 yields nothing, master run ids resolve via/runs?scope=master&q=<sha>, and an unknown run fails closed after the timeout. The perf jobs of this PR exercise the wiring end to end.Related: #120921
Related: #120176
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/120927]
Version info
26.10.1.181(included in26.10and later)