Repository navigation
Fix flaky 01169_old_alter_partition_isolation_stress test - #99018
Conversation
The bare `wait` after `kill -TERM` returned non-zero (exit status 143 from killed background processes), causing `set -e` to abort the script before `wait_for_queries_to_finish` could run. This left orphan `$CLICKHOUSE_CLIENT` processes still executing queries when the test runner dropped the database, producing `UNKNOWN_DATABASE` exceptions in stderr. Change `wait` to `wait ||:` to match the pattern used in the newer version of this test (`01169_alter_partition_isolation_stress.sh`). https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=0a82f6f26d88670d510d421f25d7bf878ccdf1f7&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%2C%202%2F2%29 Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Workflow [PR], commit [d13c736] Summary: ✅ AI Review1) SummaryThis PR changes 2) Missing context (if any)
3) Findings (by severity)Blockers
Majors
4) Tests & Evidence
5) ClickHouse Compliance Checklist (Yes/No + short note)
6) Performance & Safety Notes
7) User-Lens Review
8) Final Verdict
|
The job failed when a PR only changed non-source files (e.g. `.sh` test scripts): `lcov --extract` produced empty output, `genhtml` failed on the empty input, and then `llvm_coverage_job.py` crashed trying to compress the non-existent `llvm_coverage_diff_html_report` directory. Two fixes: - In `generate_diff_coverage_report.sh`: after `lcov --extract`, check if the output contains any `SF:` records; exit 0 early if not. - In `llvm_coverage_job.py`: guard compress and archive operations on the diff report directory actually existing. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=99018&sha=df6f0da97c5b87721cde0190e310431d826349d5&name_0=PR&name_1=LLVM%20Coverage Co-Authored-By: Claude Opus 4.6 <[email protected]>
When changed files have no coverage data, the diff HTML report is never created. Guard the diff URL in `coverage_comment.json` and in `report_links` on the diff report actually existing, to avoid broken S3 links in the GitHub PR comment and job results. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…artition-isolation-stress
|
Merged the fix from #99032 into this branch to resolve the LLVM Coverage job failure. It was broken in #96738 when the diff coverage report was introduced — the job crashes when a PR has no C++ source code changes. cc @alexbakharew |
|
The LLVM Coverage job is fixed in this PR: #99103 |
| kill -TERM $PID_1 | ||
| kill -TERM $PID_2 | ||
| wait | ||
| wait ||: |
There was a problem hiding this comment.
wait ||: masks any unexpected non-zero exits from background threads, not only the intentional termination after sending SIGTERM. This relaxes the test and can hide real exceptions in thread_insert/thread_select. Please wait on PID_1 and PID_2 explicitly and only ignore expected termination codes.
Summary
waitafterkill -TERMreturned non-zero (exit status 143 from killed background processes), causingset -eto abort the script beforewait_for_queries_to_finishcould run$CLICKHOUSE_CLIENTprocesses still executing queries when the test runner dropped the database, producingUNKNOWN_DATABASEexceptions in stderrwaittowait ||:to match the pattern used in the newer version of this test (01169_alter_partition_isolation_stress.sh)CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=0a82f6f26d88670d510d421f25d7bf878ccdf1f7&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%2C%202%2F2%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
🤖 Generated with Claude Code
Note
Low Risk
Low risk test-only change: it relaxes error handling around
waitafter terminating background threads to avoid aborting underset -e. Main risk is masking unexpected non-zero exits from the killed background processes, but behavior matches the newer test variant.Overview
Prevents
01169_old_alter_partition_isolation_stress.shfrom failing early afterkill -TERMby changing a barewaittowait ||:underset -e.This ensures cleanup (
wait_for_queries_to_finish) runs even whenwaitreturns a non-zero status due to the terminated background processes, reducing flakiness and avoiding leftover queries during test teardown.Written by Cursor Bugbot for commit d13c736. This will update automatically on new commits. Configure here.
Version info
26.3.1.594