Repository navigation
Perf CI: build the report when no query ran on both servers - #129874
Conversation
Since ClickHouse#128261 a PR that changes only performance tests runs the Iceberg jobs on the changed tests only, so often no query is measured on both servers (the Iceberg rewrite refuses every changed test, only partial queries, or a skipped test). Then analyze_queries crashed: query-run-metric-names.tsv is empty, so its scalar subquery throws INCORRECT_RESULT_OF_SCALAR_SUBQUERY, and the per-query loop never creates analyze/commands.txt and analyze/query-metric-stats.tsv. The denorm file was never written, report() stopped at its first read, before it wrote all-query-metrics.tsv and the other comparison files, the check said "Errors while building the report." instead of the per-test errors, and "Insert historical data" failed with FileNotFoundError. Create the two files before the loop, the same way confirm_changes already does for its own files, and take any(n) from the names file: an aggregate without GROUP BY returns one row, [] for an empty file and the only row otherwise. The Total ratio of a report with no compared query is the neutral 1x instead of nan, as for a test whose changes are all demoted. A run with compared queries writes the same files as before. Validated by replaying compare.sh (stage=analyze_queries) in the performance-comparison image on the CI artifacts of ClickHouse#101273, ClickHouse#113575 and ClickHouse#126132 (before: the CI errors; after: an empty errors.log, and "20 errors" with the Iceberg rewrite hint for ClickHouse#101273), and on a MergeTree job of ClickHouse#101273 (same analysis and report files). Related: ClickHouse#101273 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review (2 rounds, head 5791ccf)
Round 2 (the |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261107-010000 |
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [5791ccf] Summary: ✅
AI ReviewSummaryThe change fixes Final VerdictStatus: ✅ Approve |
|
Yes, it is Iceberg, and the cause is the test each of these PRs adds, not the harness. The
With no query measured on both servers, the report then failed to build ( Fix: I will mark each test |
1b54a5f
Related: #101273
Related: #113575
Related: #128261
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The performance comparison report is now built when no query ran on both servers, so the Iceberg jobs of a pull request that changes only performance tests no longer fail with
Errors while building the report.Description
Since #128261, a PR that changes only performance tests runs the six
Performance Comparison (arm_release, master_head, iceberg_*, N/3)jobs on the changed tests only. When no query of those tests ran on both servers, all six fail withErrors while building the report.andInsert historical data: FileNotFoundError ... report/all-query-metrics.tsv. In the last 7 days this hit 130 runs on 19 PRs, for example:https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=101273&sha=965b8489c351d4649438deb2a58704c75c19f785&name_0=PR&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%20iceberg_s3%2C%203%2F3%29
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=113575&sha=73fcf71e32db31bac34230643871c144022c4d9b&name_0=PR&name_1=Performance%20Comparison%20%28arm_release%2C%20master_head%2C%20iceberg_local%2C%201%2F3%29
analyze_queriesincompare.shcomputes statistics only for queries measured on both servers. With none,analyze/query-run-metric-names.tsvis empty, so the scalar subquery over it throwsINCORRECT_RESULT_OF_SCALAR_SUBQUERY, and the per-query loop never createsanalyze/commands.txtandanalyze/query-metric-stats.tsv.reportthen stops at its first read of the missingquery-metric-stats-denorm.tsv, before it writesall-query-metrics.tsv, andErrors while building the report.replaces the per-test errors.The change creates the two files before the loop, takes
any(n)from the names file, which is[]for an empty file, and makes theTotalratio of such a report the neutral-1xinstead of+nanx. A normal run writes the same files as before.Validation: I replayed
compare.sh(stage=analyze_queries) in theclickhouse/performance-comparisonimage on the CI artifacts of #101273, #113575 and #126132, before and after the change. Before, all three reproduce the CI errors. After,report/errors.logis empty: #113575 and #126132 report success, and #101273 reports20 errorswith the hint to add each test totests/performance/iceberg_skip_list.txtor mark it<test iceberg="0">, because its geo types have no Iceberg equivalent (#128261 fails such a test on purpose). A MergeTree job of #101273 gives the same analysis and report files before and after.Workflow [PR]
Sync PR [sync-upstream/pr/129874]
Version info
26.11.1.2472-master(included in26.11and later)