Repository navigation
Perf CI: end the dashboard wait before the job timeout - #128236
alexey-milovidov merged 1 commit into
Conversation
When the performance dashboard does not register a run, `perf_dashboard_gate` waits its whole 600 s budget, counted from the start of the uploads and unrelated to the job's 7200 s timeout. A shard whose benchmarks end late (amd_release master_head 4/6 at ~111 min) is then killed by praktika during the wait, before `judge_without_dashboard` can judge it by its own report, so the shard reports no verdict at all (job 123987608243). Count the job's own time instead: `JOB_START` is taken at import, the job's timeout is read from `info.job_config`, and `end` = start + timeout - 300 s. - The uploads get min(600, time left before `end`) seconds, but at least 60 s, so a late shard still makes its uploads instead of failing them as "not attempted", which the gate would turn into a plain FAIL. - The gate's deadline is min(upload deadline, `end`), and the gate starts no request once its deadline has passed. - The dashboard confirmation rerun is bounded by `end`, and is skipped (its rows stay blocking) when no time is left. The 300 s reserve covers a poll in flight (<= 3 GETs x 60 s), the uploads' floor (<= 60 s), a cut confirmation's SIGTERM grace (<= 100 s) and the ~30 s tail. A job config without a usable timeout now fails at the start of a non-local master_head run. release_base and local runs are unchanged. 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; 2 findings) plus my own review (4 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261030-131900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261030-130200 |
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [a2df91b] Summary: ✅
AI ReviewSummaryThe PR limits Final VerdictStatus: ✅ Approve |
added, there was a switch to the new cidb which caused temporary missing results but they are now there again and it should work as usual |
|
Thanks. Confirmed: the dashboard serves master runs again, and 4/6 passed on c759533 in 110 minutes without waiting. The change still matters for the next outage: 4/6's report ends about 108 minutes into its 120-minute timeout, so the full 600 s wait leaves about a minute (2d61726 made it with ~75 s to spare, five runs before it were killed). I updated the description; if you'd rather not keep it, I'll close it. |
a48a934
On 2026-10-30 the performance dashboard backend was switched to a new CIDB (explained by egor-click on ClickHouse#128236). For about 3 minutes (14:09:54Z to 14:13:05Z, measured from the polls of 6 shards) it answered HTTP 500 with ClickHouse code 60 for the tables it reads: failed to resolve performance comparison run: code: 60, message: Unknown table expression identifier 'perf_test_times_v1' failed to load performance comparison rows: code: 60, message: Unknown table expression identifier 'query_metrics_v2' `dashboard_did_not_answer` knew no signature for this message, so the 500 was a `PerfDashboardError`; the poll loop keeps the first hard error, and `main` failed the shard instead of judging it by its own report. Four `Performance Comparison (arm_release, master_head, N/6)` jobs whose 600 s wait ended inside the window failed this way (ClickHouse#126879 6/6, ClickHouse#128209 1/6 and 3/6, ClickHouse#128097 2/6), all with 0 slower queries. Shards whose wait outlived the window got the same requests answered with 200 and passed. The request cannot cause this answer: the table names are the backend's own storage, and identical requests (same run id and test) were served after the window. It is the case the class documents, "the dashboard, or the CIDB tables it reads, did not answer", so add the measured signature next to the two existing ones. Only a 5xx with an application envelope is affected; a 4xx with this text, a non-JSON body, and every other 5xx keep their classification, and a real hard error seen before or after it still wins. Validated locally against a fake dashboard serving the logged bodies: the incident replay fails on master and reaches the own-report fallback with the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`upload_budget` gives the REPORT-stage uploads at least 60 s however late the job is, but the dashboard gate was called with `min(upload_deadline, end)`. When the benchmarks end late, the uploads start after `end`, so the gate's deadline has already passed when it starts: it raises "it was spent before the first request" without asking the dashboard, and the shard is judged by its own report, which fails on any slower row. The 3 red jobs since 2026-11-04 (master 29da6da, PRs ClickHouse#128972 and ClickHouse#129010) had 25-40 s of the uploads' 60 s left, and the dashboard answers in about 2 s with no blocking row for any of them. The gate now gets `upload_deadline`. That equals `min(upload_deadline, end)` whenever at least 60 s remain before `end` at the start of the uploads, so only a late job changes. Since the gate can now run past `end`, a dashboard GET no longer starts after the gate's deadline, and its socket timeout is `min(60, remaining)` instead of a flat 60 s. Otherwise a request started just before the deadline could wait 3 x 60 s past it in a late job. The gate's waits now end by the same bound as the uploads' 60 s floor. Related: ClickHouse#128236 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #125734
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
Performance Comparison (amd_release, master_head, 4/6)hit the 7200 s job timeout in 5 of 8 master runs on 2026-10-30 and reported nothing (e.g. job 123987608243). While the performance dashboard registered no master runs (2026-10-29 09:04Z to 2026-10-30, a since-resolved CIDB switch),perf_dashboard_gatewaited the full 600 s on every shard. That budget counts from the uploads, not from the job's timeout: on 4/6 the report ends 111 minutes in, and praktika kills it during the wait, beforejudge_without_dashboard(#125734) can judge the shard by its own report.Change: the job's end is
JOB_START + timeout - 300 s, with the timeout read frominfo.job_configlikefunctional_tests.pydoes.min(600 s, time left), at least 60 s, so a late shard still uploads instead of failing as "not attempted".min(upload deadline, end)and starts no poll after its deadline.The 300 s reserve covers a poll in flight (at most 3 x 60 s), the 60 s upload floor and the ~30 s tail. A shard with more than ~15 minutes left keeps the 600 s budget. On the failing job the gate would have given up at 11:22:45, and the shard would have passed on its report (
8 too long, 0 slower) about 4.5 minutes before the kill.4/6 is first because #127241 added a test file, which moved tests between the round-robin shards. Neither that nor the dashboard is changed here.
Validation: a local harness replays the failing job's timings on a fake clock (master: the wait ends 73 s after the kill; this branch: 285 s before it), plus 9 other cases, 7 caught mutations and a live dashboard run.
Workflow [PR]
Sync PR [sync-upstream/pr/128236]
Version info
26.11.1.945-master(included in26.11and later)