Repository navigation
CI: run only the selected tests in the sanitizer functional tests in PRs - #114730
Conversation
The sanitizer flavors of `Stateless tests` ran the whole suite in every pull request: 17 jobs for the ASan/UBSan, TSan and MSan builds. Under the assumption that the stress tests with sanitizers are a stronger check than a plain functional run, those jobs are now trimmed down to the tests selected for the change. The new `selected tests` option of `ci/jobs/functional_tests.py` runs an ordinary functional test run over the subset that `Targeting` already computes for the targeted check: the tests the pull request changes, the tests that already failed in this pull request, and the tests covering the changed lines according to the coverage database. Unlike the `targeted` check, it does not rerun that selection many times - it is a plain run with a shorter list of tests. The selection is a few hundred tests, so the batches of the full-suite jobs collapse into a single job per flavor: 17 jobs become 8. What still covers the whole suite in a pull request: the debug and plain binary functional test jobs, and the stress tests, which run the functional tests under every sanitizer with heavy concurrency and randomized settings. The master workflow is unchanged and keeps running the full suite in every flavor. Also in this change: * When the selection cannot be fetched (the coverage database or the GitHub diff is unavailable), the job runs the full suite instead of testing less than it would have without the selection, and says so in the report. This also makes a local run of these jobs work. * Tests the job flavor would never run (`no-parallel` tests in a `parallel` job and vice versa) are dropped from the selection, and the job is skipped when nothing is left for it. * `clickhouse-test` exits with code 1 when every test it was given is filtered out - e.g. all the selected tests are tagged `no-tsan` in a TSan job. For a run over an explicit list of tests (flaky, targeted, `selected tests`) that is now reported as SKIPPED instead of a failure; for a full-suite run it stays a failure, since there it means a broken filter. Regenerated `.github/workflows/pull_request.yml` via `python3 -m ci.praktika yaml`. Closes: #114725 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [b9854a8] Summary: ✅ AI ReviewSummaryThis PR trims most pull-request sanitizer stateless jobs down to a Findings
Final VerdictKeep at least one sequential selected-test lane alive for CI-script-only PRs, and extend the stateless-harness allowlist to cover the remaining direct selected-test metadata plumbing such as |
Reverted in the next commit. Without a changed test or a source change there is nothing to select, so the new jobs skip and the code path that actually runs a subset is never reached in this pull request's CI. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The `selected tests` jobs ran the changed test on the previous commit - see the report linked from the pull request description - so the touch has served its purpose. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
Only report an empty explicit list as skipped when `clickhouse-test` proves that filtering caused it.
|
🕵 Addressed the WasmEdge coverage finding in 5ea7b18: the five established full-suite MSan/WasmEdge shards are retained. Every existing Wasm UDF functional test is tagged |
|
📊 Cloud Performance Report 🟢 AI verdict: This PR changes only the CI test-selection harness (trimming sanitizer functional-test jobs to selected tests), documentation, and developer tooling — none of it is in the query-execution path — so no per-query timing change can be attributed to the code. The flagged clickbench improvements (Q13, Q16, Q18, Q30, Q31, Q33) and the Q28 regression were downgraded to not-sure as measurement/environment variance. Three large deltas — clickbench Q23 (×2.3 faster), tpch Q7 (×8.4 faster), and tpch Q8 (×2.1 faster) — remain locked by the automatic trust override, but given the PR touches nothing these queries run, they should be read the same way; the broad, one-directional shift across unrelated queries is the tell-tale of an environment difference, not a real change. clickbench🟢 1 improved · Flagged queries (8 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 2 improved Flagged queries (2 of 22)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. Debug info
|
|
We are removing |
…ted job ClickHouse#122111 made the targeted stateless and integration jobs SKIP instead of ERROR when a test-selection CIDB request times out on every attempt (`CIDBTimeoutError`). The first selection read, the strict previously-failed lookup in `Targeting.get_previously_failed_tests_with_info`, re-wrapped any exception as a plain `RuntimeError`, so a timeout there lost its class before reaching either `except CIDBTimeoutError` handler and the shard still ERRORed ("Failed to load test selection" in the stateless job, an uncaught exception in the integration job). On a `pr-bugfix` PR that drops `Bugfix validation` and fails `Finish Workflow / Post Hooks`. Re-raise `CIDBTimeoutError` unchanged in strict mode. Every other failure (a refused connection, an answered non-OK response) stays wrapped and keeps failing the job, as ClickHouse#114730 intends. Best-effort mode is unchanged. CIDB shows 3 such errors, all on 2026-09-24/25 during the CIDB overload ClickHouse#122111 targets (PRs ClickHouse#118823, ClickHouse#117436, ClickHouse#114865). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The sanitizer flavors of
Stateless testsran the whole suite in every pull request: 17 jobs for the ASan/UBSan, TSan and MSan builds. Under the assumption in the issue - that the stress tests with sanitizers are a stronger check than a plain functional run - the ASan/UBSan and TSan jobs now run only the tests selected for the change. The MSan/WasmEdge jobs retain their established full-suite configuration because every existing Wasm UDF functional test is taggedno-msan, so the selected-test runner cannot currently exercise that surface.The new
selected testsoption ofci/jobs/functional_tests.pyruns an ordinary functional test run over the subset thatTargetingalready computes for the targeted check: the tests the pull request changes, the tests that already failed in this pull request, and the tests covering the changed lines according to the coverage database. Unlike thetargetedcheck, it does not rerun that selection many times - it is a plain run with a shorter list of tests. The selection is a few hundred tests, so the batches of the converted full-suite jobs collapse into a single job per flavor.What still covers the whole suite in a pull request: the MSan/WasmEdge, debug, and plain binary functional test jobs, plus the stress tests, which run the functional tests under every sanitizer with heavy concurrency and randomized settings. The master workflow is unchanged and keeps running the full suite in every flavor.
Also in this change:
no-paralleltests in aparalleljob and vice versa) are dropped from the selection, and the job is skipped when nothing is left for it.clickhouse-testexits with code 1 when every test it was given is filtered out - e.g. all the selected tests are taggedno-tsanin a TSan job. For a run over an explicit list of tests (flaky, targeted,selected tests) that is now reported as SKIPPED instead of a failure; for a full-suite run it stays a failure, since there it means a broken filter.Unit tests for the new logic are in
ci/tests/test_selected_tests_run.py..github/workflows/pull_request.ymlwas regenerated viapython3 -m ci.praktika yaml.Verification in this pull request's own CI
This pull request changes no source file and no test under
tests/queries, so nothing is relevant to select and the new jobs correctly report SKIPPED. To exercise the path that actually runs a subset, commit 8536243 temporarily touched00001_select_1.sql(reverted in the following commit). On that commit, with all builds served from the cache:Stateless tests (amd_tsan, parallel, selected tests)andStateless tests (amd_asan_ubsan, distributed plan, parallel, selected tests)ran, and the report shows the three selection passes followed by the single selected test -00001_select_1 OK 1.01s.Stateless tests (amd_asan_ubsan, db disk, distributed plan, sequential, selected tests)skipped, because the only changed test is parallel-safe and the flavor filter left it nothing to run.Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114730&sha=85362432c858e0cd9aadbf57f2895888b9d35863&name_0=PR
Possible follow-up, not done here: once the test list is short, the job start dominates the run - in the TSan run above,
Start ClickHouse Server(which prepares the stateful datasetstest.hits,test.visits, TPC-DS and TPC-H) took 324 seconds out of a 418-second job. Skipping the stateful preparation when no stateful test is selected needs a reliable way to tell, so it is left out of this change.Closes: #114725
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Workflow [PR]
Sync PR [sync-upstream/pr/114730]
Version info
26.8.1.1652(included in26.8and later)