Repository navigation
Run targeted stateless and integration checks in the merge queue - #125571
Merged
Merged
Conversation
A pull request tested against an older `master` can break tests that landed after its last CI run. #117198 was last tested on 2026-10-11 21:34, merged on 2026-10-12 13:16, and broke two `test_storage_delta` tests added to `master` in between, on every lane, until the automatic revert in #125455. `MergeQueueCI` now runs `Stateless tests (amd_binary, targeted)` and `Integration tests (amd_binary, targeted)` on the merge group, on the `amd_binary` build the queue already makes. They select the tests covering the changed lines of the queued PR, plus the changed tests and the modules owning changed files (integration). The changed stateless tests are left to the merge-queue flaky check, and the tests that failed earlier in the PR are not rerun: its CI already did, and a flaky one would only bounce the PR from the queue. `Targeting` takes the PR number from the merge group head ref and the diff from the PR itself, because the merge group commit is not the PR head. Both jobs stop at 40 minutes from their start: the stateless one via `--global_time_limit` (3 repetitions instead of 50), the integration one via the pytest session timeout, which a targeted check does not treat as a failure. Related: #117198 Related: #125455
Contributor
|
Workflow [PR], commit [ec4a0d6] Summary: ✅ AI ReviewSummaryThe PR adds targeted stateless and integration checks to Missing context / blind spots
Final VerdictStatus: ✅ Approve LLVM Coverage ReportMeasured on commit ec4a0d6.
Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage). Newly covered: +125 lines in 39 files (-88 lines lost coverage) · Details |
…argeted checks The coverage selection cannot see a test until a `master` coverage run records it, so a test that landed on `master` after the PR's last CI run escapes it. The `Config Workflow` job of the merge queue (which unshallows the repository) now finds the stateless tests and integration test modules changed on the first-parent history of the queue base after the PR head commit time (or after the merge base, if the PR merged `master` since), keeps the 30 stateless and 10 integration ones whose names share most words with the files the PR changes, and stores them. Both merge-queue targeted checks add them to the selection as mandatory tests. The window and ranking follow #126406. Replayed on the merge-queue commits of the two known cases: for #117198 the integration selection includes `test_storage_delta/test_writes_interop.py` and `test_storage_delta/test.py`; for #124131 the stateless selection includes `05339_string_filters_during_scan_parquet_short_dictionary_values`. The merge-queue targeted jobs are no longer cached: their selection depends on the queue entry and the attempt, neither of which is in the digest.
The merge queue is meant to fail fast, so its targeted checks stop at 3 failed tests (`--max-failures 3` for `clickhouse-test`, `--maxfail` for pytest, with the sequential integration phase getting what remains of the limit and dropped once it is reached), do not rerun the failed integration tests, and stop at 20 minutes from their start, the budget of the merge-queue flaky check, instead of 30. Reaching the time limit stops the tests without failing the job, as before. The merge-queue flaky check keeps its 20-minute limit and 5 failures. The changed stateless tests and those `master` changed after the PR's last CI run run only in the merge-queue flaky check, which already reruns them since #126406; the targeted integration check reruns the integration test modules `master` changed. Related: #123832 Related: #125292
…tion check The flaky and targeted integration checks sort the selected modules by name so the tests of one module stay consecutive. Under the 20-minute cap of the merge-queue targeted check, which ends the run without failing it, that let a large coverage selection run first and the PR's changed modules and the modules `master` changed since the PR CI be cut off, with the job green. There, order the modules by their first position in the selection instead, which keeps the tests of one module consecutive too.
…geted check `--dist=loadfile` (pytest-xdist 3.8.0) schedules the modules by descending test count unless `--no-loadscope-reorder` is given, so the priority order of the previous commit was undone at scheduling: a large coverage-only module ran before a smaller changed one. Pass `--no-loadscope-reorder` to both pytest phases of the merge-queue targeted check. Checked with one changed module and a five-case module: without the flag the five cases ran first, with it the changed module ran first.
…r mandatory sequential modules The integration modules `master` changed since the PR CI now also include the modules of packages whose supporting files changed (configs, data, package-local helpers), with the same mapping as for the PR's own changes, moved to `Targeting.owning_test_modules`. A fixture-only change on `master`, e.g. `test_database_disk/configs/database_disk.xml`, selected nothing before. The parallel phase runs before the sequential one, so in the merge-queue targeted check a large coverage selection could use the 20-minute budget before a changed, owning or drift module of the sequential phase started, and the job passed without it. When the sequential phase has such a module, the parallel phase now gets half of the budget.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 2, 2026
In the merge queue the stateless targeted check skips the changed and the previously failed tests, so for a diff without coverage lines nothing resolved `selection_cutoff`, and `selection_manifest` from `master` failed with `KeyError: 'cutoff'`. https://github.com/ClickHouse/ClickHouse/actions/runs/41423304278/job/125212228455 #125571
fm4v
enabled auto-merge
November 2, 2026 15:04
fm4v
disabled auto-merge
November 2, 2026 15:07
fm4v
enabled auto-merge
November 2, 2026 16:02
JTCunning
pushed a commit
to JTCunning/ClickHouse
that referenced
this pull request
Nov 3, 2026
`Stateless tests (amd_binary, targeted)` and `Integration tests (amd_binary, targeted)` in `MergeQueueCI` stopped at 20 minutes from their start. The integration job hit the limit on broad selections and silently ran only a fraction of them (e.g. 370 of 1618 selected test items for the merge-queue entry of ClickHouse#128706). The merge-queue flaky check keeps its 20-minute limit. Related: ClickHouse#125571
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #117198
Related: #125455
Related: #124131
Related: #126406
Related: #123832
Related: #125292
A pull request tested against an older
mastercan break tests that landed after its last CI run, andmastercan break the PR's own tests in the meantime. The merge queue reruns only the PR's changed stateless tests (and, since #126406, the stateless testsmasterchanged since the PR CI), and no integration tests at all. Two recent cases it missed:mastergainedtest_storage_delta/test.py::test_writes_timestamp_ntz_annotation_nestedandtest_storage_delta/test_writes_interop.py, and both broke on every lane for sixmastercommits, until the automatic revert in Revert "Iceberg variant type" #125455.CREATE OR REPLACEon aplain_rewritabledatabase disk #123832 was last tested on 2026-10-04 and passed the queue on 2026-10-11 (only style check, fast test, build and docs examples ran; the flaky check skipped itself). Its new arm oftest_database_disk/test.py::test_copy_of_temporary_table_under_unrelated_namehad been broken by Fix server startup after an interruptedCREATE OR REPLACEon a non-atomic database disk #123902 (merged 2026-10-09) and failed on everymasterrun until Fix test_copy_of_temporary_table_under_unrelated_name after the duplicate-UUID rule of #123902 #125292.MergeQueueCInow runs two targeted checks on the merge group, on theamd_binarybuild the queue already makes (release, no sanitizers, no ThinLTO, the lightest full build):Stateless tests (amd_binary, targeted): the tests covering the changed lines of the queued PR.Integration tests (amd_binary, targeted): the changed modules, the modules owning changed files, the modules covering the changed lines, and up to 10 integration test modulesmasteradded or changed after the PR's last CI run (the window and the ranking of Rerun the testsmasterchanged since the PR CI in the merge queue #126406, extended to integration tests).The changed stateless tests and the stateless tests
masterchanged are left to the merge-queue flaky check, which already reruns them. The tests that failed earlier in the PR are not rerun: its CI already did, and a flaky one would only bounce the PR from the queue.Targetingtakes the PR number from the merge group head ref (Info.linked_pr_number) and the diff from the PR itself, because the merge group commit is not the PR head. The jobs are not cached: their selection depends on the queue entry and on the attempt.The merge queue is meant to fail fast:
--max-failures 3forclickhouse-test,--maxfailfor pytest; the sequential integration phase gets what remains of the limit and is dropped once it is reached). The integration job does not rerun its failed tests.--global_time_limitfor stateless, the pytest session timeout for integration). The stateless job repeats its selection 3 times instead of 50.Replayed
Targeting.get_merge_queue_drift_testson the merge commit of #123832: 30 stateless and 10 integration modules selected; the PR's owntest_database_disk/test.pyis selected as a changed module.Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/125571]
Version info
26.11.1.1140-master(included in26.11and later)