Repository navigation
Conversation
Per-job setup is a large share of each smoke shard. Halving the shards of test_smoke, test_ssi_smoke and their arm64 variants removes 144 jobs from each master and merge queue pipeline; the same tests still run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Like the smoke suites, test_base and test_base_arm64 jobs spend a large share of their time on setup. Halving their shards removes 36 jobs from each master and merge queue pipeline; the same tests still run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The reduced shard matrices preserve JVM coverage and exhaustive test assignment. Pipeline duration and cost estimates were not independently validated.
🤖 Bits Code Review · Commit 0246294
|
This PR reduces the slots, but I'm not sure it's the right approach. I believe it is ok only because the S3 Build Cache is working, but when the cached entries cannot be reused then the full suites have to run, and the lower slot numbers will make those even worse.
Imho, the tests should be conducted with a cold cache, which let me to think we need to look into changing the SKIP_BUILD_CACHE as a "cache mode" or "cache scope". |
Yes, I have the same feeling. Also we keep running ALL tests on master for a purpose to collect signals about flaky tests, so having less slots and without S3 cache we can easily get slot that will rung longer than 1h (our hard limit) and it will affect our Green CI score that we calculate on master branch. |
|
If tested with a cold cache, all tests running, and no timeouts, I think this should be worth considering! Seems like an easy win (a few test jobs slow by some minutes but not enough to affect the entire pipeline duration), barring no loss of coverage. |
What Does This Do
Halves the number of shards per JVM for the test suites whose jobs are mostly setup:
test_smoke,test_ssi_smokeand their arm64 variants: 4 shards instead of 8.test_baseandtest_base_arm64: 2 shards instead of 4.Every test still runs exactly once, in half as many jobs. Nothing else changes: same JVMs, same tasks, same rules for when the jobs run.
Why the pipeline doesn't get slower: a pipeline ends when its slowest job ends, and that is almost always a
test_instshard. Merged shards run about twice as many tests but still finish before it:test_basewas the slowest job in 9 of 372 cases in PR pipelines (6 days). Merged shards take about 11 min on PRs and 17 min on master, against 20–48 min for the slowesttest_instshard.test_smokewas the slowest job in 85 of 372 cases (about 23%). Merged shards take 18.8 min at the PR median (16.3 today), still under the slowesttest_instshard (20.4 min median). In the pipelines where smoke was already last, the pipeline can get up to about 2.5 min longer (see Trade-offs).Motivation
Cut CI runner cost without losing coverage or gating.
test_baseabout 7, smoke 8–9): pod start, clone, cache restore, Gradle configuration and report upload. That's about half of their runner time or more (GitLab runner metrics and job logs, 2026-11-07 to 11-12).Estimate, not measured after merge: about 4.3k runner-hours over 5.25 days (about 23k per 28 days), or 14% of GitLab main-pipeline runner time.
Additional Notes
Experiments
Branch pipelines on DDCI, each change against a control branch on the same base. The build cache was isolated per pipeline so every test really ran. JVMs 8, 17 and 21, one run per arm. Two control runs differed by about 3% in runner-hours.
test_smoke: jobs, runner-hours, slowest shardtest_base: jobs, runner-hours, slowest shardA second, independent experiment (cache-warm, all JVMs, two rounds) measured the
test_basehalf alone: 179 → 106 and 189 → 113 job-minutes per pipeline.Tests that it works as expected
aggregate_test_countsmatched the control: 252,568 tests, plus 4–7 entries from flaky tests retried inside jobs. In the second experiment, counts matched per job family and JVM in both rounds.abs(path.hashCode() % slots) + 1(CIJobsExtensions.kt). With half the slots, new shard k holds exactly the projects of old shards k and k + 4 (smoke) or k + 2 (base), so nothing is dropped or run twice.master739 → 559 jobs and merge queue 713 → 533 (smoke −144, base −36 in both).Trade-offs and limits
test_instshards) is merged,test_instgets shorter and smoke shards are more likely to become the slowest job in PR pipelines (today: 23% of cases, 18.8 vs 20.4 min at the PR median). One week after this PR is merged, check how oftentest_smokeis the slowest job and the PR pipeline p50; if smoke has become the bottleneck, use 6 smoke shards instead of 4.test_ssi_smoke(master and merge queue only) and the arm64 variants (manual on branches).test.configuration.splitinupload_ciapp.shcarries the job's position in the JVM × shard matrix, so these suites start new Test Optimization configuration values. Left as is on purpose; every matrix change already does this.Jira ticket: SDCT-1444
🤖 Generated with Claude Code