Skip to content

Cherry pick #118933 to 26.3: Split the ASan integration test jobs into eight batches - #120160

Merged
PedroTadim merged 4 commits into
backport/26.3/118933from
cherrypick/26.3/118933
Sep 15, 2026
Merged

PedroTadim merged 4 commits into
backport/26.3/118933from
cherrypick/26.3/118933

Conversation

@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Original pull-request #118933

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

alexey-milovidov and others added 3 commits September 9, 2026 01:15
`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]>
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]>
…r-8-batches

Split the ASan integration test jobs into eight batches
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Sep 15, 2026
@Algunenano Algunenano removed their assignment Sep 15, 2026
Resolve the `ci/defs/defs.py` conflict by keeping this branch's
`LLVM_IT_NUM_BATCHES` and the constant that follows it, grafting in only
`ASAN_IT_NUM_BATCHES`, then regenerate the workflows with praktika.

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

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants