Repository navigation
Revert "Test bugfix validation against multiple build types" - #97011
Merged
alexey-milovidov merged 1 commit intoFeb 15, 2026
Merged
Conversation
Contributor
alexey-milovidov
deleted the
revert-96868-bugfix-validation-multiple-build-types
branch
February 15, 2026 16:51
pull Bot
pushed a commit
to Spencerx/ClickHouse
that referenced
this pull request
Sep 20, 2026
`Bugfix validation (unit tests)` built the merge-base "before" binary under a single build type (`BUILD_TYPE = BuildTypes.AMD_ASAN_UBSAN`, introduced by b5abadc and never changed) and refuted the PR's regression gtest whenever every touched test passed on it. A regression test whose asserted property is only observable under a different sanitizer passes on that binary either way, so `main()` reported `Result.Status.FAIL` / "Failed to reproduce the bug." and `new_tests_check.py:220-227` turned that into a red `Finish Workflow` for a unit-only bugfix PR. The refutation was guaranteed by construction and independent of whether the fix and the test were correct: the run could not observe what it was asked to judge. This is an asymmetry with the job's own siblings, not an oversight in the abstract. `ci/jobs/scripts/bugfix_validation.py:9-10` already validates functional/integration tests across `[amd_asan_ubsan, amd_tsan, amd_msan, amd_debug]` and passes if any arm reproduces. Those validators can afford four because they download prebuilt master binaries, while this job must build each arm cold (~1h, ~0% sccache hits, documented in `configure_before_binary`), which is why its set was never widened. Escalate lazily instead: keep ASan+UBSan as the first arm and try the next build type only when an arm ran every touched test with none failing. The arms share one build directory, emptied between them fail-closed, because configuring a different `SANITIZE` value on top of the previous `CMakeCache.txt` builds one sanitizer while the report names another. FAIL after the last arm still blocks, preserving the contract set by 0154e71 ("only on failed-to-reproduce"), and `new_tests_check.py` is untouched. Each arm's `Result` carries its build type, which is a correctness requirement rather than cosmetics: `Result.from_commands_run` derives the log path from the result name (`{TEMP_DIR}/{normalize_string(name)}.log`), so two arms sharing a name write one file and the second overwrites the configure and compile logs of the arm that started the escalation. `run_gtests` now pins `external_symbolizer_path`. A sanitizer report is symbolized before the process aborts, and with no unversioned `llvm-symbolizer` on PATH the runtime falls back to `addr2line`, which does not finish on the multi-GB binary: measured locally, two runs of the TSan before-binary sat at 900 s and 420 s with no output while the writer thread held `Context::mutex` inside `Addr2LineProcess::ReadFromSymbolizer`, and with the option set the same run aborts in 8 s with a fully symbolized report. `ci/docker/test-base/Dockerfile` creates that symlink deliberately, but this job runs in binary-builder, which installs `llvm-symbolizer-<version>` and symlinks only profdata/cov/bolt/merge-fdata. Measured on ClickHouse#115659's two gtests overlaid on a tree without its fix: the TSan before-binary aborts on a data race between `Context::getReadSettings` and `SettingsImpl::set` in 8-9 s, 5 of 5 runs; ASan+UBSan reports `fail: 0, passed: 9`, matching what CI reported; with the fix applied TSan is green 3 of 3. Fed through praktika's own runner, the aborted run yields `Result.Status.FAIL` with the crashed test recovered as `Context.GetReadSettingsRace`, which is the reproduction branch of `main()`. One arm took 57.7 min against the job's 240-min timeout, and 14 of 3782 `Bugfix validation (unit tests)` rows over 180 days (0.37%) reach a second arm. Scope: ASan+UBSan and TSan. `amd_msan` and `amd_debug` stay excluded, so a regression test that needs one of them is still refuted by a run that cannot observe it; adding either is a one-element change to `BEFORE_BUILD_TYPES` plus a timeout increase. ClickHouse#96868 validated bugfixes against multiple build types eagerly and was reverted three hours later by ClickHouse#97011. This differs by escalating lazily on a job that already builds cold, two arms rather than five, no S3 artifact dependency, and no change to job scheduling or `ci/defs/`. The eight new arms in `ci/tests/test_unit_tests_bugfix_validation.py` are mutation-proven: removing the return after a reproduction, deleting the escalation, dropping the refutation status, escalating from the "ran no touched test" branch, making the build-dir reset best-effort, and collapsing the per-arm result names each redden their own arm.
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.
Reverts #96868
Didn't work from the first try.
Version info
26.2.1.750