Skip to content

Add soft time limit to flaky check to prevent timeouts - #97214

Merged
alexey-milovidov merged 1 commit into
masterfrom
flaky-check-soft-time-limit
Feb 17, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
flaky-check-soft-time-limit

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • When there are too many modified tests, the flaky check exceeds the 2.5-hour job timeout without posting results (see Add time filters to system log table queries in tests #96710)
  • Passes --global_time_limit to clickhouse-test, calculated as the job timeout minus elapsed time minus a 5-minute margin
  • The test runner stops gracefully before the hard timeout, allowing the CI to process and report results for completed tests
  • Also applies to the targeted check, recalculating remaining time for each iteration

Test plan

  • Verify the soft time limit is printed in logs for flaky check jobs
  • Verify that when the limit is hit, clickhouse-test stops gracefully and results are posted

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

🤖 Generated with Claude Code

Version info

  • Merged into: 26.2.1.862

When there are too many modified tests, the flaky check can exceed
the 2.5-hour job timeout without posting results. This passes
`--global_time_limit` to `clickhouse-test`, calculated as the job
timeout minus elapsed time minus a 5-minute margin. The test runner
then stops gracefully before the hard timeout, allowing the CI to
process and report results for completed tests.

Reference: #96710

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [c030500]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 17, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Feb 17, 2026
Merged via the queue into master with commit 36603a8 Feb 17, 2026
143 checks passed
@alexey-milovidov
alexey-milovidov deleted the flaky-check-soft-time-limit branch February 17, 2026 19:51
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 17, 2026
alexey-milovidov added a commit that referenced this pull request Feb 21, 2026
The 5-minute margin introduced in #97214 is not enough for the cleanup
phase, which includes server shutdown, system table export via
`clickhouse local`, and log collection — all significantly slower under
sanitizers (ASan, TSan, etc.).

For example, in #96130,
the `amd_asan` flaky check hit the hard timeout during
`aggregated_zookeeper_log` export, killing the process before results
could be uploaded (0 test results in the report). The ClickHouse server
shutdown alone took ~80 seconds, and each system table export took
~50 seconds under ASan.

Changelog category: CI Fix or Improvement
Changelog entry: Increase soft timeout margin for flaky check to prevent job timeouts with empty results.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants