Repository navigation
Remove unit tests for CI scripts - #114675
Conversation
|
Workflow [PR], commit [bc83cbe] Summary: ✅ AI ReviewSummaryThis PR removes another batch of Findings
Final VerdictChanges requested: the remaining deletion set still removes focused regression coverage for live CI and workflow paths. |
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, 5 s compile time in total, 6 of them have a recent master baseline. |
Carries over the suggestions applied in #114675 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The `.claude/CLAUDE.md` notes are split out into #114703 so that this pull request only removes `ci/tests`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Add three notes to `.claude/CLAUDE.md`: do not use try/catch to fall back to a less-optimized path, prefer functional tests over `gtest` unit tests, and throwaway CI-testing scripts do not need to be committed. Split out of ClickHouse#114675 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…-tests # Conflicts: # ci/tests/test_docs_link_checker.py
| or the hard subprocess backstop) exhausts the budget before any test produces a result, | ||
| the empty run is reported as `SKIPPED` instead of blocking the PR. | ||
|
|
||
| That downgrade must apply *only* to the timeout path. If pytest produces no results for |
There was a problem hiding this comment.
This still looks like live merge-path coverage. Integration tests (amd_asan_ubsan, flaky) is still in the PR workflow, and ci/jobs/integration_test_job.py:1308-1345 still has the subtle empty-result classification where a timeout-empty run should become SKIPPED but an empty non-timeout pytest failure must stay ERROR, even after synthetic SKIPPED rows are appended for the MAX_FLAKY_CHECK_MODULES scope cap.
I can't find surviving ci/tests coverage for either branch of that contract, so deleting this file reopens the exact regression where a harness crash before any jsonl rows are written reports green instead of blocking the PR.
|
|
||
| Fix | ||
| --- | ||
| `Artifact.Config` gained an `optional` flag. When a providing artifact marked |
There was a problem hiding this comment.
Artifact.Config.optional and Runner._skip_missing_optional_artifact are still live in every workflow run, and the LLVM coverage jobs in the PR workflow still provide LLVM_COVERAGE_FILE* artifacts through that path (ci/defs/defs.py:618-630, ci/praktika/runner.py:587-654).
I can't find other ci/tests coverage that those profdata artifacts stay optional and that a missing optional glob is skipped instead of turning the whole job ERROR. Dropping this suite means a small runner/artifact refactor can silently bring back the false-red path where llvm-profdata crashes but a passing coverage shard still blocks the PR on artifact upload.
| ) | ||
|
|
||
|
|
||
| def test_historical_insert_parses_threshold_columns(): |
There was a problem hiding this comment.
Performance comparison with master head is still a required PR job, and the effective gate still lives in ci/jobs/performance_tests.py: it reparses the report message with too_many_slow, imports all-query-metrics.tsv through the fixed INSERT_HISTORICAL_DATA schema, and relies on all cidb.is_ready() call sites being best-effort rather than assert-based (ci/jobs/performance_tests.py:74-116, 1073-1087, 1858-1878).
I can't find surviving coverage for those couplings. Without this file, a small refactor can either mis-gate 6-10 slower queries, silently drop all historical rows when compare.sh adds threshold columns, or turn a transient CIDB timeout back into a hard perf-job failure.
| `/tmp/docker_net.lock` and blow the 10-min acquire budget instead of OOMing. It | ||
| carries the same flag. | ||
|
|
||
| These modules carry `dist_each_sequential=True` in TEST_CONFIGS. |
There was a problem hiding this comment.
force_heavy_modules_sequential is still on the live PR path for flaky/targeted integration runs (ci/jobs/integration_test_job.py:874-879), and the current TEST_CONFIGS still mark test_storage_delta* / test_dns_cache with dist_each_sequential=True because they OOM or serialize on the shared Docker network under --dist=each (ci/jobs/scripts/integration_tests_configs.py:24-115).
I can't find replacement coverage that those modules are actually moved out of the parallel bucket, preserve ordering, and do not accidentally become globally sequential. Removing this suite means future TEST_CONFIGS edits can quietly reintroduce the OOM / docker_net.lock hang that only shows up on real flaky-check runs.
| `ClickHouseProc.check_fatal_messages_in_logs` ("Lost s3 keys" and | ||
| "S3_ERROR No such key thrown ..."). | ||
|
|
||
| Regression coverage for a chronic `Stateless tests (*, s3 storage, *)` failure |
There was a problem hiding this comment.
ClickHouseProc.check_fatal_messages_in_logs still contains the exact No such key grep allowlist in ci/jobs/scripts/clickhouse_proc.py:1080-1128, and I can't find surviving coverage for the contract that CacheMetadata's benign background-download NoSuchKey stays OK while a real merge/read-side 499 still fails the job.
Deleting this file reopens the chronic false-red on Stateless tests (*, s3 storage, *), because a small refactor to the ignore list would only be caught when the live health check starts turning all-green runs into blockers again.
…rops-error-message Resolves the modify/delete conflict on ci/tests/test_log_parser.py by taking master's deletion. PR ClickHouse#114675 ("Remove unit tests for CI scripts") removed most of ci/tests, and .claude/CLAUDE.md now states: "When you want to test changes in the CI scripts, you can write and run a throwaway test, but you don't need to commit it to the repository, because we don't have automated CI tests." Six follow-up commits restored 43 of the 71 deleted suites; test_log_parser.py was deliberately not among them, so re-adding it would revert a maintainer decision. The one-line parser fix is unaffected and still applies to master, which kept both the index-0 scan and every pattern with a leading '.*'. Re-verified against master with a throwaway A/B harness, one case per ERROR_PATTERNS entry: five carriers go from an empty Error section to the full message (memory limit 0->171 bytes, _LIBCPP_ASSERT 0->108, watchdog signal 9 0->107, Sanitizer CHECK failed 0->121, "is located" 0->100) while the entries without a leading '.*' stay byte-identical (Logical error 36, Segmentation fault 48, Received signal 18, header-form AddressSanitizer 63). Master's newer is_check_failed blank-line arm is preserved, and the reworded comment no longer names the renamed error_patterns attribute.
Resolves a modify/delete conflict on ci/tests/test_print_stacktraces.py by taking master's deletion. That file was removed from master in ClickHouse#114675 ("Remove unit tests for CI scripts"), which deleted 71 files under ci/tests/ on the grounds that they are not run automatically, and added to .claude/CLAUDE.md that committed CI-script tests are not wanted. Across six restore rounds in that PR, 46 suites were restored as live safety or merge-gate coverage; this one was not. Re-adding it here would partially revert a merged decision, so master's side stands. Nothing retained in master references the file, and it only imported from tests/clickhouse-test, never the reverse, so the deletion is self-contained. The fix itself is unaffected: it lives entirely in ci/jobs/fast_test.py, ci/jobs/functional_tests.py and tests/clickhouse-test, and master still carries the HTTP pre-check this PR removes plus none of the three added abort sites.
Master deleted `ci/tests/test_print_stacktraces.py` along with most of `ci/tests/` in ClickHouse#114675, and `.claude/CLAUDE.md` now states the rule the deletion follows: a throwaway test for CI scripts need not be committed, because that suite is not run automatically. The 39 files restored after that PR did not include this one, so the deletion is the intended state and the merge takes master's side. The harness change is unaffected: the budget derivation, the binary-flavor fallback and the timed-out-dump retention are the same code that was reviewed, and master's own additions to `tests/clickhouse-test` are kept. Re-ran the deleted arms as a throwaway script against the merged tree and against the pre-merge head: 12 passed and the same 5 live-server arms skipped for want of a server in both, so the merge changes no behavior.
Master removed ci/tests/test_log_parser.py in ClickHouse#114675 ("Remove unit tests for CI scripts"), which produced a modify/delete conflict against the test file this branch extends. That pull request deleted 71 files under ci/tests and then restored 39 of them over the following two days, each restore commit naming the criterion: coverage that is the only focused guard for a still-live CI job or merge gate. test_log_parser.py was not among the restored files and was not raised in that pull request's review, so this merge honours the deletion instead of reinstating it, and the branch now changes only ci/jobs/scripts/log_parser.py. The parser change itself is unaffected: master has not touched log_parser.py since cf2cfec (2026-08-05), which this branch already merged, so the file is byte-identical to the previously reviewed version. The 18 assertions the deleted file carried were kept as a throwaway harness and run against the merged tree, per the guidance added in ClickHouse#114703 that CI script changes may be validated with a throwaway test rather than a committed one. All 18 pass, and each of the five behaviours this branch introduces was confirmed still pinned by reverting it in turn: stripping the captured query id, bypassing the anchored server pattern, applying it unconditionally, scanning for the format string with the unanchored pattern, and dropping the query id passed to get_failed_query. Every one reddens the corresponding assertion.
The ci/tests directory is being removed along with the CI Tests job that runs it (ClickHouse#115650 deletes all 57 files, ci/jobs/ci_tests_job.py, the job_configs entry and the workflow step; ClickHouse#114675 already removed an earlier batch), so an arm placed there would not execute. The two files this branch added are dropped rather than relocated: the whole CI-script unit-test category is being retired, and tests/integration has no harness-self-test venue. _is_docker_compose_timeout and _timed_out_orchestration_verbs go with them. Neither is on the live path -- _is_infrastructure_error reaches _is_orchestration_lifecycle_timeout, which calls _orchestration_verb, _argv_lists and _raising_exception_lines directly -- so their only callers were the deleted asserts. Verdicts are unchanged: replaying 198 deduped real Integration tests results through the pre-deletion and post-deletion predicates gives byte-identical verdict vectors at the recorded status and at both forced statuses, and both differ from origin/master in exactly the same way. The change is validated by replaying results from the CI database instead; see the pull request description.
|
@alexey-milovidov I wonder why have you deleted I actually was thinking of giving @groeneai an example how to run e2e tests, and the example was deleted as a part of "bad tests cleanup". |
|
The example is not lost: One measured data point in case it is relevant to what gets restored: I swept |
The ci/tests suite is gone from master: ClickHouse#114675 and ClickHouse#115650 removed its contents together with the CI Tests job that ran it (ci/jobs/ci_tests_job.py, JobConfigs.ci_tests, JobNames.CI_TESTS and the generated ci_tests lane), on the grounds that it pins the internals of CI scripts rather than their observable behavior. Master keeps one unrelated file under that path, and no job executes it, so test_diagnostics_forwards_job_options.py would merge in as 439 lines that nothing can run. The observable behavior it asserted is covered end to end by this PR's own CI run: the amd_llvm_coverage DBReplicated shard reported eight deterministic configuration-specific failures that the job had been labelling flaky and force-setting to OK, which is the effect the change exists to produce.
`ci/tests/test_e2e.py` was removed in ClickHouse#114675 as part of a sweep of CI-script unit tests "we do not run automatically". Unlike the mock-heavy unit tests, this one is hand-written and end-to-end: it seeds a synthetic workspace and runs `python -m ci.praktika run` for `AST fuzzer (amd_debug)` and `Stress test (amd_debug)`, then asserts the core-collection pipeline produces the encrypted `.zst.enc` and `.rsa` artifacts and never leaks a raw `aes.key`. The `CI Tests` job runs `pytest ci/tests/`, so the restored file executes in CI rather than sitting unrun. Its imports (`WORKSPACE_PATH`, `JOB_ARTIFACTS`, `_read_fuzzer_status`, `_format_status_error` from `ci/jobs/ast_fuzzer_job.py`; `Utils` from `ci/praktika/utils.py`) still exist on master, so the file is restored verbatim. Related: ClickHouse#114675
The job's only record of a failed commits-walk fetch was the gh argv: CalledProcessError: Command '['gh', 'api', 'repos/ClickHouse/ClickHouse/ commits?sha=a3f55f0418cdd06... Two places discarded the reason. _list_commits_page ran subprocess.run with check=True, and CalledProcessError.__str__ renders only argv, so the captured stderr and stdout - the fields carrying the HTTP status - were never read (measured against a real 404: e.stderr held 'gh: Not Found (HTTP 404)' and e.stdout the full JSON body). The resulting message then passed through md_code, a table-cell name formatter whose MAX_NAME_LEN is 100, which head-truncates and so dropped the tail as well. A 404, a 403 rate limit and a 5xx therefore rendered the same 102-character string in the public pull request comment, and since the walk performs up to EXTEND_MAX_PAGES fetches the message did not say which anchor or page had failed. Report the failure instead: exit code and endpoint first, then stderr and stdout each capped at 300 characters with an explicit elision marker, mirroring the field order and cap that GH.get_output_with_retries already uses. Catch TimeoutExpired in the same place so a stalled request says it timed out. The timeout is kept: gh self-bounds connect (30 s) and TLS handshake (10 s) but not a stalled response body, measured at 240 s unbounded, so routing this through the shared praktika helper - which passes no timeout - would have regressed a bounded call site to an unbounded one. Add md_message beside md_code for the comment path, bounded head+tail so the end of a message survives. md_code and MAX_NAME_LEN are untouched, so the name callers keep their behaviour. The bound matters beyond gh: a cluster query failure reaches the same handler carrying its whole inlined SQL, which for the extended master chain measures 54952 characters against GitHub's 65536-character comment body limit. The underlying gh api failure is not addressed here. It is environmental and unreproducible outside CI - the byte-identical call succeeds 25 of 25 by hand, failures interleave with successes through the day, and carriers are both fork and non-fork pull requests. The point of this change is that the next occurrence records its own HTTP status. No committed test: ci/tests/test_build_profile_diff_job.py was removed in PR ClickHouse#114675 and .claude/CLAUDE.md asks for a throwaway test for CI scripts. Verified with a 30-assertion throwaway harness plus three mutation arms, each reverting one hunk and reddening named assertions.
`ci/tests/` is being removed, so this change stops adding to it. The review that approved ClickHouse#115825 reads, in full, "We don't use ci/tests, they will be removed.", and ClickHouse#115650 (+9/-24715) is open against that directory: its file list includes `ci/tests/test_unit_tests_bugfix_validation.py`, `ci/tests/test_new_tests_check_unit_gate.py` and `ci/jobs/ci_tests_job.py`, the runner that executes them. The first tranche, ClickHouse#114675 (+0/-6543), merged on 2026-08-15. The 15 arms added in the three earlier rounds of this change are therefore deleted rather than thinned or relocated: thinning still adds to a directory that is going away and still leaves a conflict to resolve. The earlier precedent for adding there, ClickHouse#114400, merged on 2026-08-13, before both that tranche and that review, so it does not license adding there now. What remains under `ci/tests/` is three stub signatures, and they are not arms kept by preference. `configure_before_binary` and `compile_before_binary` take a build type in this change, so without the adaptations 9 of that module's 97 existing cases raise `TypeError` and the live `CI Tests` job goes red on this PR. With them the module is 97/97 and the sibling gate module is 5/5. The correctness argument does not depend on the deleted arms. Fourteen mutants across the three earlier rounds each reddened only the case written for it and never a pre-existing one, and the last three were first run against all 109 pre-existing cases and survived, which is what established that each claim was genuinely uncovered rather than redundant. That record is evidence about this change, not shipped coverage. The module's own docstring already states that the build and run orchestration is validated separately in CI, so the file returns to exactly the coverage it had rather than below it; what is given up is a live regression guard for the escalation loop until ClickHouse#115650 lands. Separately, the module docstring claimed this job "builds the before binary in parallel with the build matrix (it starts as early as the functional/integration validators)". It does not: `ci/workflows/pull_request.py:139` is `JobConfigs.bugfix_validation_ut_job.set_run_after(CORE_BLOCKING_JOB_NAMES)`, the comment directly above it says the job is deferred behind the core blocking jobs, and that list includes every unit-test job. The clause was master's, but this change re-flowed the paragraph around it, so it is corrected here. The artifact-dependency half is true and stays: the job does not need the PR's `UNITTEST_AMD_ASAN_UBSAN` artifact, so it is not gated behind `build_amd_asan_ubsan`.
Removes most of the
ci/testsdirectory: a large body of CI-script unit tests that we do not run automatically, while retaining the focused coverage for still-live safety and merge-gate paths.The
.claude/CLAUDE.mdpart of this change was split out into #114703Related: #114703
Changelog category (leave one):
Version info
26.8.1.1481(included in26.8and later)