Skip to content

Do not select performance tests from a coverage collection that covered no test - #131772

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:perf-selection-skip-empty-coverage-cohort
Nov 15, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:perf-selection-skip-empty-coverage-cohort

Conversation

@groeneai

@groeneai groeneai commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #131309
Related: #131751
Related: #117346

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

...

Description

Since 2026-11-15 05:58Z, PR Performance Comparison (*_release, master_head, N/6) shards run the whole suite with all queries and are killed at the 7200 s job timeout: 19 shards on 13 PRs, on both architectures. Example: arm_release 3/6 of #131743, 142 tests, all with --max-queries 0, 98 min of benchmarks.

The NightlyCoverage run at 79929b2c, the first after the switch to clang-23 (#117346), crashed the coverage server on every test (the fix is in the open #131751). All 16 per_query_coverage manifests are published with 0 collected and 843 failed tests. Since #131309 such shards are published and accepted, and coverage_cohort returns the newest group that reaches 16 shards, so this cohort displaced the complete one from f3bfabe1. With no covered test, select makes every XML mandatory.

coverage_cohort now moves a complete group in which no test was collected to superseded_artifacts (reason Coverage collection covered no test) and keeps walking to an older group. A collection that collected at least one test is still accepted as partial coverage, as #131309 intends. If no usable group exists within 72 hours, selection fails with the existing No complete compatible performance coverage error instead of a 2-hour run. Reverting #131309 is the alternative, but it no longer applies cleanly (conflict with cd097214 in this file).

Validated offline by replaying coverage_cohort on the recorded CIDB jobs and S3 manifests: master picks 79929b2c (0 covered tests, all 851 non-long tests mandatory), this change picks f3bfabe1 (842 covered, 10 mandatory). Synthetic cohorts confirm that one failed shard or a single collected test is still accepted.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/131772]

Version info

  • Merged into: 26.11.1.2338-master (included in 26.11 and later)

…ed no test

The NightlyCoverage run at 79929b2c (the first after the switch to clang-23)
crashed the coverage server on every test. All 16 per_query_coverage shards
still published a manifest (0 collected, 843 failed tests), and since ClickHouse#131309
coverage_cohort accepts such shards and returns the newest identity group that
reaches 16 shards. That empty cohort displaced the complete one from f3bfabe,
validate_manifests produced no covered test, select made every XML mandatory
with all queries, and the 6-shard PR performance jobs were killed at the
7200 s job timeout on both architectures.

A complete group in which no test was collected is now recorded in
superseded_artifacts with the reason "Coverage collection covered no test",
removed from the walk, and an older group is used. A collection with at least
one collected test is still accepted as partial coverage, as ClickHouse#131309 intends.
Without any usable group in 72 hours the existing "No complete compatible
performance coverage" error ends selection instead of a full run.

Validated offline on the recorded CIDB jobs and S3 manifests: master picks
79929b2c (0 covered, 851 mandatory), this change picks f3bfabe (842 covered,
10 mandatory); synthetic cohorts keep one failed shard and a single collected
test accepted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (2 nits).

# Sev Finding Verdict Evidence / action
1 💡 When every complete group in 72 h covered no test, the existing No complete compatible performance coverage error is raised before superseded_artifacts reaches performance_selection.json AGREE, not blocking Same pre-existing behaviour as the No published coverage manifest rows; no code change
2 💡 Description wording on the open coverage-crash fix AGREE, fixed Description updated before publication

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding.

Session id: cron:clickhouse-review-slot-8:20261115-091700

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. Offline replay of coverage_cohort on the recorded CIDB jobs (cutoff 2026-11-15 06:00:00, 72 h window) and S3 manifests: master picks the 79929b2c cohort with 0 collected tests on every run.
b Root cause explained? The 79929b2c NightlyCoverage run crashed on every test, its 16 manifests are published with 0 collected tests, and since #131309 the newest complete group wins, so select sees no covered test, makes all 851 XMLs mandatory with all queries, and 6 PR shards exceed 7200 s.
c Fix matches root cause? Yes. The cohort walk supersedes a complete group that collected nothing and uses an older one; no timeout, shard count or query budget is changed.
d Test intent preserved / new tests added? CI-script change, so no test of the test infrastructure; validated locally by the replay, 6 synthetic controls and 2 mutations.
e Both directions demonstrated? Master: 79929b2c, 0 covered, 851 mandatory. This change: f3bfabe1, 842 covered, 10 mandatory, 16 shards superseded. Dropping the new continue brings 79929b2c back.
f Fix is general across code paths? coverage_cohort is the only cohort chooser (one caller, snapshot()); the stateless and integration selectors already skip unhealthy snapshots.
g Fix generalizes across inputs (params/datatypes/wrappers)? Controls: one failed shard and a single collected test are still accepted; all-empty with no older cohort raises the existing error; two empty cohorts before a healthy one; an older healthy cohort with the same identity.
h Backward compatible? (maintainer-approved exception only) Yes. No setting or artifact format change; new superseded_artifacts entries have the existing shape.
i Invariants and contracts preserved? A returned cohort is still 16 shards of one identity, chosen newest first; a dropped group can never be returned or reported twice; the error path is the existing ValueError.

Session id: cron:clickhouse-impl-slot-40:20261115-090400

@clickhouse-gh

clickhouse-gh Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [eec50f4]

Summary: ✅


AI Review

Summary

PR #131772, reviewed at eec50f40c1c2017b3bb316bddfcdacba16fa8e30, updates coverage_cohort to skip complete coverage cohorts with no collected tests and continue searching for usable coverage. No actionable findings. All 11 focused checks passed, including recorded-manifest replay reducing mandatory tests from 851 to 10, partial coverage, repeated empty cohorts, compatible older cohorts, retries, and rejection when no usable cohort exists.

Final Verdict

Status: ✅ Approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). manual approve Manual approve required to run CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants