Repository navigation
Split the ASan integration test jobs into eight batches - #118933
Conversation
`Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6)` reported `Timeout` on master with `xdist.dsession.Interrupted: session-timeout: 7200.0 sec exceeded` after `974 passed, 10 skipped ... in 7360.29s`. Nothing failed and nothing hung - the longest quiet gap in the whole run was 136 s - the batch simply held more work than the two-hour pytest `--session-timeout` allows, and was cut off with 20 of its 1004 modules still to go. This is chronic rather than a one-off. Over the last three weeks the six old-analyzer batches reported `Timeout` 133 times between them, on every one of the six. The job is required on every pull request, on master and on backport branches, so each occurrence is a red required check on an unrelated change. The cause is capacity, not balance. The integration suite measures about 112000 test-seconds; six batches of three xdist workers can absorb at most 129600, so the packing runs at 86% of the budget on average and the heaviest shard lands at 119.7 of the 120 available minutes. Scoring `get_optimal_test_batch` over the 1139 modules actually in `tests/integration/`, weighted by per-module `sum(test_duration_ms)` measured on the failing commit itself, reproduces the failure exactly: batch 5 of 6 - the batch that timed out - is the heaviest, at 100% of budget. At eight batches the heaviest shard is 82 minutes, 68% of the budget, and the measured spread across shards narrows from 1.24 to 1.09. Batches are the right lever rather than a longer timeout. Aggregate compute is unchanged, because the work is the same and only the parallelism differs, so the only cost is one more per-batch setup (about 3 minutes) - and the job returns its answer 25% sooner than it does today. Both ASan flavors move together. `integration_test_asan_master_jobs` (`amd_asan_ubsan, db disk`, release branches) runs the same suite with the same worker count against the same budget and sits at the same 96-103 minutes per shard, so the measurement that rules out six for one rules it out for the other; it has simply had far fewer runs in which to show it since #116591 took it from four to six. The shared count now lives in `ASAN_IT_NUM_BATCHES` so the two cannot drift apart. `CORE_BLOCKING_JOB_NAMES` selects these jobs by substring, so the blocking gate picks up all eight batches with no change. While measuring this: `TEST_DURATIONS` in `ci/jobs/scripts/integration_tests_configs.py` sums to about 97000 test-seconds against a measured 112000, so the packer reports every shard as evenly packed (printing weights of `[5384, 5384, 5384, 5384, 5384, 5383]` for a run whose real shards ranged over 97 to 120 minutes). Refreshing that table is separate periodic maintenance - it is documented as such, and it repacks every integration flavor at once - so it is left for its own change. Eight batches hold with the table as it is. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=417aa9966eed1467f418da9b4deae15ef020c5f3&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%205%2F6%29 Related: #116591 Related: #115963 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [3377d59] Summary: ✅ AI ReviewSummaryThis PR centralizes the ASan integration-test shard count in Missing context / blind spots
Final Verdict✅ No blocking issues found. |
Algunenano
left a comment
There was a problem hiding this comment.
LGTM, but we should also consider making some tests faster, removing unnecessary ones, or transforming them to stateless tests when possible. Otherwise the problem keeps getting larger and larger
Conflicts in the generated `.github/workflows/master.yml` and `.github/workflows/pull_request.yml` were resolved by taking master's generated files and regenerating them from the merged `ci/defs` with `python3 -m ci.praktika yaml`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
🕵 I resolved the conflict in favour of this PR's The sync PR is |
Yes, recently we've added many tests for unimportant, irrelevant corner cases, where the case does not justify the complexity of the test. We can do a pass of finding and trimming them. |
Cherry pick #118933 to 26.6: Split the ASan integration test jobs into eight batches
Cherry pick #118933 to 26.7: Split the ASan integration test jobs into eight batches
Cherry pick #118933 to 26.8: Split the ASan integration test jobs into eight batches
Cherry pick #118933 to 26.3: Split the ASan integration test jobs into eight batches
Backport #118933 to 26.8: Split the ASan integration test jobs into eight batches
Backport #118933 to 26.7: Split the ASan integration test jobs into eight batches
Backport #118933 to 26.6: Split the ASan integration test jobs into eight batches
Backport #118933 to 26.3: Split the ASan integration test jobs into eight batches
Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6)reportedTimeouton master withxdist.dsession.Interrupted: session-timeout: 7200.0 sec exceededafter974 passed, 10 skipped ... in 7360.29s. Nothing failed and nothing hung — the longest quiet gap in the whole run was 136 s. The batch simply held more work than the two-hour pytest--session-timeoutallows, and was cut off with 20 of its 1004 modules still to go.This is chronic rather than a one-off: over the last three weeks the six old-analyzer batches reported
Timeout133 times between them, on every one of the six. The job is required on every pull request, on master and on backport branches, so each occurrence is a red required check on an unrelated change.The cause is capacity, not balance. The integration suite measures about 112000 test-seconds; six batches of three xdist workers can absorb at most 129600, so the packing runs at 86% of budget on average and the heaviest shard lands at 119.7 of the 120 available minutes. Scoring
get_optimal_test_batchover the 1139 modules actually intests/integration/, weighted by per-modulesum(test_duration_ms)measured on the failing commit itself, reproduces the failure exactly — batch 5 of 6, the batch that timed out, is the heaviest:Batches are the right lever rather than a longer timeout. Aggregate compute is unchanged, because the work is the same and only the parallelism differs, so the only cost is one more per-batch setup (about 3 minutes) — and the job returns its answer 25% sooner than it does today.
Both ASan flavors move together.
integration_test_asan_master_jobs(amd_asan_ubsan, db disk, release branches) runs the same suite with the same worker count against the same budget and sits at the same 96–103 minutes per shard, so the measurement that rules out six for one rules it out for the other; it has simply had far fewer runs in which to show it since #116591 took it from four to six. The shared count now lives inASAN_IT_NUM_BATCHESso the two cannot drift apart.CORE_BLOCKING_JOB_NAMESselects these jobs by substring, so the blocking gate picks up all eight batches with no change.Noted while measuring, and deliberately not changed here:
TEST_DURATIONSinci/jobs/scripts/integration_tests_configs.pysums to about 97000 test-seconds against a measured 112000, so the packer reports every shard as evenly packed — it printed weights of[5384, 5384, 5384, 5384, 5384, 5383]for the run whose real shards ranged over 97 to 120 minutes. Refreshing that table is separate periodic maintenance (it is documented as such, and it repacks every integration flavor at once), so it belongs in its own change. Eight batches hold with the table as it is.CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=417aa9966eed1467f418da9b4deae15ef020c5f3&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%205%2F6%29
Related: #116591
Related: #115963
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/118933]
Version info
26.9.1.1282(included in26.9and later)26.8.5.14,26.7.9.15,26.6.7.21,26.3.33.88