Repository navigation
Report the exception in the performance comparison Run Errors table and count tests, not rows - #116491
Conversation
compare.sh picks one error blurb per failing performance test with a
three-tier fallback: match a line naming an exception, else a line of the
"socket.timeout: timed out" shape, else the first ten lines of the log.
Both selective patterns were written in GNU basic-regex syntax, with
escaped grouping, alternation and quantifier, but they are executed by
ripgrep, whose dialect reads those escapes as the literal characters
"(", "|" and "+". Tier one therefore searched for the literal text
"(Exception|Error):" and tier two for one non-space followed by a literal
plus, a colon and a space. Neither can match a Python traceback.
The patterns are valid regexes, so ripgrep exits 1 for "no match" rather
than 2 for "bad pattern", and the || chain silently took head -10 on
every failing test. head -10 captures the TOP of a traceback, so the
exception at the bottom was never recorded. Deleting six backslashes
restores the original intent: basic-regex \(A\|B\):[^:] and rust-regex
(A|B):[^:] are the same language, as are ^[^ ]\+: and ^[^ ]+: .
ripgrep has no POSIX-basic mode, so no flag makes the old spelling mean
what it said.
head -10 then emitted ten lines, sed prefixed each with the test name,
and report.py did error_tests += len(run_error_rows), counting rows under
a name that says tests, so one failing test scored ten. Counting distinct
test names makes the variable's name true.
Measured in default.perf_run_errors_v1, the sink for run-errors.tsv:
345,311 groups of exactly ten rows per (run, test) and zero groups of one
or two, even though --max-count=2 can only ever emit one or two, so the
selective tiers had never once fired. In the 30 days to 2026-08-26 the
"errors" term reds 142 Performance Comparison master_head runs across 47
pull requests, plus 9 runs on master whose message begins with exactly
"10 errors". Of the release_base rows, 113,800 of 113,810 are argparse
usage text while zero contain the "unrecognized arguments" line that
actually names the defect; that line matches tier two.
This cannot turn a red shard green. head -10 is kept and a ripgrep exit
of 1 still falls through, so a non-empty error log still yields at least
one row, and report.py hardcodes the plural " errors" for every count, so
the substring gate in performance_tests.py still fails the shard on
"1 errors". Only the number and the text change.
Verified on the artifacts of a real failing job (PR ClickHouse#109409, arm_release
master_head 4/6): before the change, running report.py in that run's
extracted working directory reproduces its own message
"10 errors, 11 too long, 4 unstable" byte for byte, and the extraction
block reproduces its run-errors.tsv byte for byte; after the change the
same inputs give "1 errors, ..." and two rows naming the ServerException
and the 300 s timeout. Per .claude/CLAUDE.md the tests for a CI script
change are throwaway and not committed, and ci/tests is being removed in
Remove ci/tests (attempt 2).
Related: ClickHouse#109409
Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex): 0 findings. One nit from my own
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20260826-105700 |
|
Workflow [PR], commit [7dfc7c1] Summary: ✅
AI ReviewSummaryThis PR fixes the Final Verdict✅ No new findings in the current head. I would approve this change pending normal CI completion. |
|
cc @azat, could you review this? Both selective |
CI finish ledger - 7dfc7c1CI is fully finished at this commit and no check failed, so no ledger row is owed. Evidence: no check queued or in progress; Config Workflow, Style check and Finish Workflow all Session id: cron:our-pr-ci-monitor:20260826-143000 |
3527197
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed the
Performance Comparisoncheck reporting a single failing performance test as ten errors, and made its Run Errors table show the exception instead of the top of the traceback.Description
A failing performance test is reported as
10 errors, and the ten rows it puts in thereport's Run Errors table are the first ten lines of a Python traceback, never the exception
line at the bottom. In the 30 days to 2026-08-26 the
errorsterm reds 141Performance Comparison (*, master_head, *)runs across 46 pull requests, plus 9 runs onmasterwhose message begins with exactly10 errors.Root cause:
compare.shextracts the blurb withrg, but both selective patterns were writtenin GNU basic-regex syntax (
\(,\|,\+). ripgrep's dialect reads those escapes as theliteral characters
(,|,+, so neither can match a traceback. They are valid regexes, sorgexits 1 rather than erroring and the||chain silently falls through tohead -10. Inthe CIDB sink
default.perf_run_errors_v1that is, as of 2026-08-26, 345,880 groups of exactlyten rows per run and test and zero of one or two, though
--max-count=2emits at most two.I delete six backslashes, and count distinct tests rather than rows in
report.py, which iswhat the
error_testsname already claimed.This cannot turn a red shard green:
head -10is kept andrgexiting 1 still falls through,so a non-empty error log still yields at least one row, and
report.pyhardcodes the plural" errors"for every count, so the substring gate inperformance_tests.pystill fails theshard on
1 errors. Only the number and the text change.Validated against the artifacts of one real failing job:
beforehand my local run reproduces its
10 errors, 11 too long, 4 unstablebyte-for-byte,afterwards the same inputs give
1 errors, ...and the table holds the two lines naming thetimeout. CI-script tests are throwaway per
.claude/CLAUDE.md, andci/testsis being removedin #115650.
Related: #109409
Workflow [PR]
Sync PR [sync-upstream/pr/116491]