Repository navigation
test(upstream-sql-tests): turn off the runner's own retries - #1160
Conversation
tests/clickhouse-test runs a failed test again when its output contains one of its MESSAGES_TO_RETRY (for example "No such file or directory"), and reports the test as OK when it passes then. So a flaky test looks stable and can get into the allowlist. Pass --dont_retry_failures, so that each failure fails the run, as the allowlist rule "prune flakes instead of retrying" requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI review gate — AI review passedClean review from: Cursor Bugbot. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change disabling upstream test retries to keep intermittent failures visible.
No open issues 🎉
What changed in this PR
This PR disables automatic retries in the upstream SQL test harness so intermittent failures remain visible and do not appear stable enough for the allowlist. It does not change client behavior, public APIs, or security-sensitive code.
Changes:
- Pass
--dont_retry_failuresto the upstream test runner. - Document why retries are disabled and how this supports allowlist reliability.
| File | Description |
|---|---|
tests/clickhouse-test-runner/scripts/run-upstream-tests.sh |
Disables runner retries and explains the reason. |
tests/clickhouse-test-runner/README.md |
Updates allowlist guidance to describe failure reporting without retries. |
Review effort: Balanced
There was a problem hiding this comment.
Auto-approved by the AI review gate on 5aa32c0. Details in the approver's comment on this pull request.
AI review gate — auto-approved
History (latest 5 heads, newest first)
|
Summary
scripts/run-upstream-tests.shnow passes--dont_retry_failurestotests/clickhouse-test.Without the flag, the upstream runner runs a failed test again when its output contains one of
MESSAGES_TO_RETRY(for example "No such file or directory", "Permission denied", "Connection reset by peer", "(total) memory limit exceeded"), at most 3 times. When the test passes on a retry, the runner reports it asOKand the job is green. So a flaky test looks stable and can get into the allowlist. That is contrary to rule 5 of the harnessAGENTS.md("remove it ... rather than retrying"). With the flag, each failure fails the run.Evidence,
tests/clickhouse-testat the pinnedUPSTREAM_REF(c6428ebc, v26.10.2.103-stable):TestResult.check_if_need_retrysetsneed_retryonly ifnot args.dont_retry_failures(and the output matchesMESSAGES_TO_RETRY, andruns_count <= MAX_RETRIES).parse_known_args()call, so--helpdoes not list it, but the runner accepts it.The same change was made in the C# harness after a review: ClickHouse/clickhouse-cs#747.
No allowlist change, no client change (no CHANGELOG entry: the harness is not a published package).
Test
In a local stack (server 26.10.4.207, upstream tests at the pin):
python3 tests/clickhouse-test <probe>(as onmain):[ OK ], "1 tests passed", exit 0. The failed first run shows only under "Some tests were restarted".run-upstream-tests.shwith this change:[ FAIL ], "Having 1 errors!", exit 1.run-upstream-tests.sh --no-statefulwithSHARD_INDEX=1 SHARD_TOTAL=10(passthrough): 295 tests passed, exit 0.bash -non the script;prettier --checkon the README.The
upstream-sql-testsworkflow of this PR runs the full allowlist of both backends with the flag.Checklist
🤖 Generated with Claude Code
Note
Low Risk
Test harness-only change; it makes CI stricter without touching client or runtime code.
Overview
The upstream SQL harness now invokes
tests/clickhouse-testwith--dont_retry_failures, so failures are not silently re-run when output matches the upstream runner’s retryable error messages.That closes a gap where intermittently failing tests could pass on retry, look stable, and land on
upstream-allowlist.txt. The README allowlist guidance now states that flaky tests surface as real failures under this behavior.Reviewed by Cursor Bugbot for commit 5aa32c0. Bugbot is set up for automated code reviews on this repo. Configure here.