Skip to content

test(upstream-sql-tests): turn off the runner's own retries - #1160

Merged
ccoltx merged 1 commit into
mainfrom
polyglot/upstream-sql-no-runner-retries
Nov 19, 2026
Merged

ccoltx merged 1 commit into
mainfrom
polyglot/upstream-sql-no-runner-retries

Conversation

@polyglotAI-bot

@polyglotAI-bot polyglotAI-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

scripts/run-upstream-tests.sh now passes --dont_retry_failures to tests/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 as OK and the job is green. So a flaky test looks stable and can get into the allowlist. That is contrary to rule 5 of the harness AGENTS.md ("remove it ... rather than retrying"). With the flag, each failure fails the run.

Evidence, tests/clickhouse-test at the pinned UPSTREAM_REF (c6428ebc, v26.10.2.103-stable):

  • TestResult.check_if_need_retry sets need_retry only if not args.dont_retry_failures (and the output matches MESSAGES_TO_RETRY, and runs_count <= MAX_RETRIES).
  • The flag is defined after a parse_known_args() call, so --help does 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):

  • A probe test that fails on its first run with "No such file or directory" on stderr and passes on the next run:
    • python3 tests/clickhouse-test <probe> (as on main): [ OK ], "1 tests passed", exit 0. The failed first run shows only under "Some tests were restarted".
    • run-upstream-tests.sh with this change: [ FAIL ], "Having 1 errors!", exit 1.
  • run-upstream-tests.sh --no-stateful with SHARD_INDEX=1 SHARD_TOTAL=10 (passthrough): 295 tests passed, exit 0.
  • bash -n on the script; prettier --check on the README.

The upstream-sql-tests workflow of this PR runs the full allowlist of both backends with the flag.

Checklist

  • The harness CI runs the full allowlists with the new flag

🤖 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-test with --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.

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>
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review gate — AI review passed

Clean review from: Cursor Bugbot.

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@polyglotAI-bot
polyglotAI-bot marked this pull request as ready for review November 19, 2026 13:15
@polyglotAI-bot
polyglotAI-bot requested review from a team, kavirajk and mshustov as code owners November 19, 2026 13:15
Copilot AI balanced review requested due to automatic review settings November 19, 2026 13:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_failures to 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

@security-ai-gate-reviewer security-ai-gate-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved by the AI review gate on 5aa32c0. Details in the approver's comment on this pull request.

@security-ai-gate-reviewer

Copy link
Copy Markdown

AI review gate — auto-approved

5aa32c0ff7de is approved by security-ai-gate-reviewer[bot], an automated identity, not a human. The approval stands on the required AI review: Cursor Bugbot concluded green on this commit and the AI review gate is SUCCESS (its own comment has the verdict), and the change touches no path that requires a human reviewer. It is bound to this commit: a new push dismisses it and the approver re-evaluates.

History (latest 5 heads, newest first)

  • 5aa32c0ff7de approved — green: Cursor Bugbot

@ccoltx
ccoltx merged commit 902a183 into main Nov 19, 2026
82 of 83 checks passed
@ccoltx
ccoltx deleted the polyglot/upstream-sql-no-runner-retries branch November 19, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants