ci: split the api IT shard into two hash partitions so it fits its 90-minute budget - #7695
Merged
Merged
Conversation
…-minute budget The HTTP-level "api" shard (!ui & !slow) has grown to ~135 classes and ~83 min of test time, and since 2026-10-01 it has been cancelled at the 90-minute job cap on nearly every master push and nightly, on both databases, with every class it reached green. Its classes cost a near-uniform 40-60 s each, so no tag can move a long pole out of it. -Dit.partition=k/n now keeps the selected classes whose top-level class name hashes into partition k of n: ClassPartitionFilter, a JUnit PostDiscoveryFilter registered through META-INF/services and applied after the tag filter. The partitions are disjoint and complete by construction - a new IT lands in exactly one of them without being tagged - and nested classes stay with their enclosing class. Without the property every class is kept, so the PR smoke gate and local runs are unchanged. build.yml and nightly.yml run "api" as api-1 and api-2 (1/2, 2/2) on both the H2 and the PostgreSQL leg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iliyan-velichkov
force-pushed
the
ci-split-api-shard
branch
from
October 5, 2026 13:15
9766b39 to
0ac5047
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
Since 2026-10-01, the
integration-tests-{h2,postgresql} (api, !ui & !slow)jobs have been cancelled at theirtimeout-minutes: 90on nearly every master push and nightly. It happened on about 20 jobs, including today's 37275439965, 37275382075 and nightly 37255397525. This is not a hang. In the cancelled h2 job of 37275439965, 133 classes had completed, all green, and the JVM was still starting a new class every ~40 s until the cancel. The sum of their test times is 83.2 min, plus the ~3 min build. Even the last green h2 run took 89 of its 90 minutes. The shard grew from 83 classes (57 / 62 min, the measurement behind #7283) to ~135. Its classes still cost a near-uniform 40-60 s each, almost all of it the per-method Spring context, so, asci.mdalready said,@Tag("slow")cannot rebalance it. Splitting it needs a partition mechanism.Change
ClassPartitionFilter(tests-integrations,support/) is a JUnit PlatformPostDiscoveryFilter, registered throughMETA-INF/servicesand applied after the-Dit.groupstag filter. With-Dit.partition=k/nit keeps the classes whose top-level class name hashes into partitionkofn. The partitions are disjoint and complete by construction: a new IT lands in exactly one of them without being tagged, and nested classes (MessagingFacadeIT$TopicTest) stay with their enclosing class. A name-pattern split (-Dit.test) could silently drop classes; this one cannot. Without the property every class is kept, so the PR smoke gate and local runs are unchanged. A malformed value fails the run instead of selecting nothing.it.partitionis a root-pom property (empty by default), passed to the failsafe forks as thedirigible.it.partitionsystem property.build.ymlandnightly.yml: on both DB legs,apibecomesapi-1/api-2(partition: "1/2"/"2/2", same tag expression!ui & !slow & !upgrade, keeping theupgradeexclusion from tests: an UpgradeFromPreviousReleaseIT boots the build on a deployment the previous release wrote (#7641) #7685). The other shards pass an empty partition.ci.mdand the workflow comments describe the split, and say to go to/3when a partition nears the cap again.Verification
-Dit.groups="!ui & !slow & !upgrade"with-Djunit.platform.execution.dryRun.enabled=true, re-run after rebasing on master21e7d4942d:1/2: 64 classes2/2: 76 classesUpgradeFromPreviousReleaseITis in none of them.!ui & !slow, the split was 135 = 64 + 71.ClassPartitionFilterTest: 14/14 green. It covers no or blank partition, exactly one partition per class for n = 1..3, nested classes and methods following their top-level class, descriptors without a class source, and malformed values refused.formatter:validateontests-integrations, with the cache wiped. The workflow YAML parses.api-1/api-2run on GitHub Actions. That happens on the first master push or aworkflow_dispatchof the nightly after merge.Separately, the PostgreSQL
slowshard failure (Liquibase changelog lock) is fixed in #7693.🤖 Generated with Claude Code