Repository navigation
Conversation
|
Pre-PR validation gate (session: cron:clickhouse-ci-task-worker:20260528-111500) a) Deterministic trigger? Yes. The cap fires exactly when b) Root cause explained? Yes. The 180s budget is consumed by marginal randomized combos on debug builds. For c) Fix matches root cause? Yes. Raising the threshold to 300s gives the marginal randomized configs enough headroom (all 4 historical trips fall under 300s) while keeping the cap in place for the genuinely-slow tail. d) Test intent preserved? Yes. The cap still exists and still trips for tests that are actually too slow. 26% of historical "too long" trips (70 in 30 days, p95 = 483s) remain caught at 300s. The "Make it faster" gate continues to apply. e) Demonstrated in both directions? The change is data-driven from CIDB: at 180s the test family trips 266 times, at 300s it would trip 70 times. No local reproduction is needed because the failure shape is the comparison f) Fix is general, not a narrow patch? Yes. This is the broader |
|
cc @alexey-milovidov for review per your #76867 (comment) directive. The change is the per-test |
|
Workflow [PR], commit [6b690f8] AI ReviewSummaryThis PR raises the Findings💡 Nits
Final VerdictStatus: ✅ Approve |
| # Applies only in `--flaky-check` mode. Tests tagged `long` are exempt. | ||
| # 180s was too tight for randomized debug-build runs (e.g. `--max_insert_threads` | ||
| # combined with `enable_parallel_replicas` + `page_cache_inject_eviction`). | ||
| TEST_MAX_RUN_TIME_IN_SECONDS = 300 |
There was a problem hiding this comment.
Now that TEST_MAX_RUN_TIME_IN_SECONDS is 300, there are still flaky-check comments that describe the timeout or budget as 180s: tests/queries/0_stateless/01903_csvwithnames_subset_of_columns.sh:14 and tests/queries/0_stateless/04070_s3_disk_settings_override.sh:8,11. This PR already removes the stale literal from 01114_database_atomic.sh; please update the remaining references too, or phrase them in terms of TEST_MAX_RUN_TIME_IN_SECONDS, so future tag/rationale decisions do not keep using the old cap.
There was a problem hiding this comment.
Thanks, addressed in 15da082896a0. Replaced the literal 180s with backticked TEST_MAX_RUN_TIME_IN_SECONDS references in the two flagged files, plus two more that had the same pattern:
01903_csvwithnames_subset_of_columns.sh:14(flagged)04070_s3_disk_settings_override.sh:8,11(flagged)02435_rollback_cancelled_queries.sh:5(also180s default budget; also clarified that the600sbudget is the separate--timeoutper-test cap)02475_bson_each_row_format.sh:3(more than 180 secondsjustifying thelongtag)
Left alone the two unrelated 180s references that describe the server-side SystemLogBase waitFlush deadline (a separate constant in C++ source), not the flaky-check cap:
02818_memory_profiler_sample_min_max_allocation_size.sh:403096_order_by_system_tables.sql:5
…TIME_IN_SECONDS Follow-up to clickhouse-gh[bot] inline review on PR ClickHouse#106034. The bot flagged 01903_csvwithnames_subset_of_columns.sh:14 and 04070_s3_disk_settings_override.sh:8,11 as still using the literal '180s' to describe the flaky-check per-test budget. Same pattern as the 01114_database_atomic.sh update already in this PR: replace the literal with a backtick reference to the `clickhouse-test` constant `TEST_MAX_RUN_TIME_IN_SECONDS`, so future bumps of the cap do not leave behind stale literals across test-comment rationale. Two additional files were updated for the same reason: - 02435_rollback_cancelled_queries.sh:5 - 'exceeds the 180s default budget' was the same flaky-check cap; clarified that the 600s budget is the `--timeout` (regular per-test cap), which is a separate constant and stays correct. - 02475_bson_each_row_format.sh:3 - 'more than 180 seconds' was the same flaky-check cap, justifying the `long` tag. Two remaining 180s references in tests/queries/0_stateless/ were intentionally left alone, because they describe the server-side `SystemLogBase` `waitFlush` deadline (a separate 180s constant in C++ source), not the flaky-check cap: - 02818_memory_profiler_sample_min_max_allocation_size.sh:4 - 03096_order_by_system_tables.sql:5
The 180s `TEST_MAX_RUN_TIME_IN_SECONDS` cap in `tests/clickhouse-test` is enforced only in `--flaky-check` mode (with `--test-runs > 1` and tests not tagged `long`). It was too tight for randomized debug-build runs: 64% of the 266 `Test runs too long (> 180s)` failures across 30 days fell in the marginal 180-240s range, dominated by combinations of `--max_insert_threads`, `enable_parallel_replicas`, `parallel_replicas_for_non_replicated_merge_tree`, and `page_cache_inject_eviction` on multi-million-row debug tests. The 4 historical `02352_lightweight_delete` flaky-check trips on PR ClickHouse#76867 were 185-243s; all fall under 300s. Bumping to 300s keeps the cap meaningful (74 historical failures over 30 days still trip, p95 of the trip distribution is 483s) while removing the false positives that just need a few more seconds under unlucky randomized configs. Update the stale `180s` reference in `01114_database_atomic.sh` to reference the constant by name so future bumps do not require an additional edit. Follow-up to ClickHouse#76867
…TIME_IN_SECONDS Follow-up to clickhouse-gh[bot] inline review on PR ClickHouse#106034. The bot flagged 01903_csvwithnames_subset_of_columns.sh:14 and 04070_s3_disk_settings_override.sh:8,11 as still using the literal '180s' to describe the flaky-check per-test budget. Same pattern as the 01114_database_atomic.sh update already in this PR: replace the literal with a backtick reference to the `clickhouse-test` constant `TEST_MAX_RUN_TIME_IN_SECONDS`, so future bumps of the cap do not leave behind stale literals across test-comment rationale. Two additional files were updated for the same reason: - 02435_rollback_cancelled_queries.sh:5 - 'exceeds the 180s default budget' was the same flaky-check cap; clarified that the 600s budget is the `--timeout` (regular per-test cap), which is a separate constant and stays correct. - 02475_bson_each_row_format.sh:3 - 'more than 180 seconds' was the same flaky-check cap, justifying the `long` tag. Two remaining 180s references in tests/queries/0_stateless/ were intentionally left alone, because they describe the server-side `SystemLogBase` `waitFlush` deadline (a separate 180s constant in C++ source), not the flaky-check cap: - 02818_memory_profiler_sample_min_max_allocation_size.sh:4 - 03096_order_by_system_tables.sql:5
15da082 to
feef6a9
Compare
Algunenano
left a comment
There was a problem hiding this comment.
I don't understand the point of this change. Tests are clustering around the 180s mark because that was the limit that we put when we introduced the check. If we raise it to 300s, then tests will cluster around the 300s mark. This isn't solving anything.
The proper fix is to fix old tests by making them faster. Also, failures in flaky check are good since it's surfacing existing issues. This is just hiding them so we don't see slow CI
|
Thanks for the review, and you're right. Bumping the cap from 180s to 300s just moves the clustering to the new limit and hides slow CI rather than fixing it. The flaky-check surfacing slow tests is the point of the check, not noise to suppress. Closing this PR. The right fix is per-test: make the genuinely slow tests faster, or tag legitimately heavy tests |
|
Closing per @Algunenano's review: the global flaky-check timeout bump is the wrong approach. Right fix is per-test (make slow tests faster or tag heavy ones |
@groeneai Notice how things are working properly: If #76867 is the PR making this test slower and the CI is detecting this, then that PR CI should be red and not merged |
Follow-up to #76867 per @alexey-milovidov directive.
The
TEST_MAX_RUN_TIME_IN_SECONDScap intests/clickhouse-testfires only in--flaky-checkmode (with--test-runs > 1and tests not taggedlong). At180s it was too tight for randomized debug-build runs.
CIDB data (30 days,
check_name LIKE '%flaky check%' AND test_context_raw LIKE '%runs too long%'):64% of all trips were in the marginal 180-240s range. The 4 historical
02352_lightweight_deletetrips on PR #76867 are 185s, 199s, 222s, 243s, allunder unlucky randomized combos (
--max_insert_threads {1,2,3}+enable_parallel_replicas 1+page_cache_inject_eviction Trueon the 1M-rowdebug insert). With 300s the cap still catches the 74 historical trips at
300s+ (p95 = 483s) while removing the marginal false positives.
The constant is the only consumer (only used by the failure message and the
single
flaky_checkcheck at the end ofTestCase.process_result_impl),so a single-line bump is sufficient.
Also update the stale
180sreference in01114_database_atomic.shtorefer to the constant by name so the next bump does not need a paired edit.
CI report referenced in the directive: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=76867&sha=b27932443a4b9a7c5e08fb381274ad9b2b0658e5&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20flaky%20check%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...