Skip to content

[CI validation only] Exercise performance coverage selection - #129861

Closed
egor-click wants to merge 17 commits into
masterfrom
codex/perf-selection-e2e
Closed

egor-click wants to merge 17 commits into
masterfrom
codex/perf-selection-e2e

Conversation

@egor-click

@egor-click egor-click commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Validation of the performance selection implementation in the linked main PR. This PR targets master and includes that implementation, a small ColumnSparse::indexImpl optimization, and one added query that expands to three queries. Do not merge this validation PR.

Full CI passed at 2d107d687be52547993a6ce2d713418a5881b413, including all 12 performance jobs. The six ordinary performance jobs ran without pr-performance or ci-force-all. They selected 241 of 823 XML files and executed all 1,666 queries on both binaries. All three added queries ran, as did every query in the 18 selected files containing more than ten queries. Jobs took 28m01s–57m47s and used 3.905 runner-hours in total, within the existing two-hour job limit.

An independent audit matched the actual CI merge checkout, disjoint shard assignments, query run IDs on both binaries, and CIDB publication. CIDB has 1,665 accepted comparisons. One comparison did not reproduce after restart and was deliberately withdrawn; its seven raw measurements per binary remain published. There were no missing queries, execution errors or unexplained publication losses.

All six jobs compared against master 6edbb4dd804d5c7d1d60796bdfcc8a768a5defa9, the CI merge's first parent. The first stacked attempt used an older reference binary that blocked two JSON queries. Both now have complete comparisons, and the earlier window-test slowdown is absent against the current reference. The earlier measured results remain preserved; this comparison does not establish their cause.

Validation run: https://github.com/ClickHouse/ClickHouse/actions/runs/42339482393

Related: #129327
Related: #129705

Changelog category (leave one):

  • CI Fix or Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Validate coverage-selected performance execution in CI.

Add separate instrumented shards to `NightlyCoverage`. Reuse `perf.py` to
collect setup, first execution, repeated execution, and teardown coverage,
with expanded-query hashes and snapshot manifests. Export source coverage
through the existing CIDB coverage pipeline; do not publish performance
measurements from instrumented runs.

Context:
#129176
#129303
Add a `suite=performance` input to `NightlyCoverage`, keeping the per-test
instrumented build and all eight performance coverage shards. Scheduled
runs and `suite=all` keep the full coverage workflow.

#129327
All eight shards timed out while rewriting the 100M-row hits dataset with
LLVM instrumentation, before the test batch started. Attach the existing
parts and rename `datasets.hits_v1` to `test.hits`, like the PGO collector.
Record the dataset layout in the snapshot manifest. Keep the release-binary
timing job's data preparation unchanged.

#129327
https://github.com/ClickHouse/ClickHouse/actions/runs/41868661430
Give instrumented setup and fill statements a 30-minute execution limit.
Set the client socket timeout above both setup and benchmark statement
limits, allowing the server to report timeouts. Keep benchmark query
budgets and ordinary performance comparison behavior unchanged.

The coverage shard exceeded the normal 300-second limit while filling
100 million rows for `array_index_low_cardinality_strings.xml`.

https://github.com/ClickHouse/ClickHouse/actions/runs/41882280734/job/126764987340
#129327
Run each query once under `first` and once under `warm`. Let large XML
files use the remaining collection budget instead of stopping after one
hour. Keep the six-hour shard limit and twenty-minute export reserve.

Validated collector behavior, dispatch selection, generated workflows,
and assignment of all 808 eligible XML files exactly once.

Related: #129327
CI: https://github.com/ClickHouse/ClickHouse/actions/runs/41893002522
CI: https://github.com/ClickHouse/ClickHouse/actions/runs/41882280734/job/126764987340
Add the optional `performance_shards` dispatch input so a corrected branch
revision can retry missing coverage without repeating successful shards.
Validate the requested shard numbers and keep scheduled collection unchanged.

Increase the coverage runner's default SQL statement budget to 30 minutes.
The six-hour shard limit and 20-minute export reserve remain in force.

Validated 17 collector tests, eight dispatch tests, generated workflows,
lint and diff checks. Real collection must confirm the longer query limit.

Related: #129327
CI: https://github.com/ClickHouse/ClickHouse/actions/runs/41918941469/job/126887932781
CI: https://github.com/ClickHouse/ClickHouse/actions/runs/41918941469/job/126887933123
CI: https://github.com/ClickHouse/ClickHouse/actions/runs/41882280734/job/126764987340
Restore validated whole-test artifacts from an explicit earlier workflow SHA,
retaining source/binary identity and per-test provenance. Interrupted XML tests
restart from setup; incomplete shards still cannot publish coverage.

Allow an explicit twelve-hour manual recovery budget for large XML files while
keeping the scheduled collector at six hours and preserving all sixteen shard
assignments and first-plus-one-warm execution. Retain completed Result records
and per-test wall time when a later test fails.

Related: #129327
https://github.com/ClickHouse/ClickHouse/actions/runs/41918941469
https://github.com/ClickHouse/ClickHouse/actions/runs/41882280734/job/126764987340
Require an immutable coverage artifact URL and unpacked SHA256 when resuming. Verify the binary before fixture setup so normal build-cache selection cannot change the executable used for saved coverage.

CI: https://github.com/ClickHouse/ClickHouse/actions/runs/42009599761
Partition only the original shard assignment, verify its pinned archive, and restore complete whole tests into their assigned recovery slots. Preserve normal scheduled sharding and require all recovery manifests before treating the source shard as complete.

CI: https://github.com/ClickHouse/ClickHouse/actions/runs/42042533306/job/127297514435
PR: #129327
Assign every eligible whole XML by longest-first measured collection cost.
Admit new tests with explicit estimates, invalidate weights for changed inputs,
and support refreshing weights from complete compatible manifests.

Remove one-off split recovery and raise the default collection budget to
twelve hours: `string_sort.xml` alone measured 6h36m51s. Preserve first-plus-one
warm collection, generic pinned resume and explicit phase completeness.

#129327
https://github.com/ClickHouse/ClickHouse/actions/runs/41918941469
https://github.com/ClickHouse/ClickHouse/actions/runs/42195391179
Reuse the shared selectors with query-only XML ownership, the approved
300-owner cutoff, header rule and fixed 196-test set. Run every query in
selected XMLs on six shards; full-run labels use eight existing-style shards.
Validate completed coverage identities before selecting and publish reasons.

Temporarily allow the implementation branch as a PR target for the requested
stacked CI validation; remove that target after validation.

Related: #129327
Coverage validation: https://github.com/ClickHouse/ClickHouse/actions/runs/42269560085
Keep the updated review-thread CI gate and apply the performance six/eight
shard decision before `ci-force-all`. Regenerate and lint the workflows.

Related: #129327
Coverage validation: https://github.com/ClickHouse/ClickHouse/actions/runs/42269560085
Temporary stacked CI validation: reuse the ColumnSparse optimization and add a query template to verify coverage selection and execution of every selected query. Do not merge this validation branch.

Related: #129327

Source change: #129705
@clickhouse-gh

clickhouse-gh Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2d107d6]

Summary: ✅


AI Review

Summary

This temporary validation PR combines per-query performance coverage collection and whole-XML test selection with a ColumnSparse::indexImpl optimization and three new query expansions. No actionable code findings were identified at 2d107d687be52547993a6ce2d713418a5881b413. The advertised final validation remains pending.

Tests
  • ⚠️ The current validation run had not produced performance-job results when reviewed. Complete the run and audit the six ARM shards' selection artifacts, raw query identities, and CIDB publication: the selected union must contain fewer than all eligible XML files, every selected XML must execute all active queries, and all three added query expansions must appear. The earlier implementation run supplies supporting execution evidence, but does not establish these results for this PR head.
Final Verdict

Status: ⚠️ Request changes — supply the final validation audit above. No code changes or new inline findings are requested. Keep this validation-only PR unmerged as its description directs.

Read performance query identities and execution errors in their published
formats, and export blocking dashboard verdicts for subsequent selections.
Assemble complete coverage from compatible successful shard attempts while
preserving exact manifest binding, freshness and phase validation.

Related: #129327
Related: #129861
CI: https://github.com/ClickHouse/ClickHouse/actions/runs/42322389618
Coverage validation: https://github.com/ClickHouse/ClickHouse/actions/runs/42269560085
@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Nov 7, 2026
Choose the six- or eight-shard performance family in a PR configuration
pre-hook so `ci-force-all` cannot bypass the mutual exclusion. Remove the
temporary stacked-PR workflow target; validation continues against master.

Validated with the generated YAML, repository yamllint configuration and
10 focused routing/selection checks. The preceding implementation passed
all six selected performance shards with complete query publication.

#129327
https://github.com/ClickHouse/ClickHouse/actions/runs/42326271407
#129861
https://github.com/ClickHouse/ClickHouse/actions/runs/42269560085
@egor-click
egor-click changed the base branch from codex/perf-query-coverage to master November 7, 2026 04:40
Keep the original `ColumnSparse::indexImpl` change and the three new query expansions. Use the completed main implementation and the normal master reference-build path.

Related: #129327
Related: #129861
Previous execution: https://github.com/ClickHouse/ClickHouse/actions/runs/42324990414
Validated implementation: https://github.com/ClickHouse/ClickHouse/actions/runs/42326271407
@clickhouse-gh

clickhouse-gh Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 2d107d687 with master 48a8c9858 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 6edbb4dd8; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

7 translation units recompiled, 6 s compile time in total, 7 of them have a recent master baseline.

Job report

@egor-click egor-click closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant