Skip to content

[SDCT-1444] Merge small CI jobs to cut per-job setup overhead - #13406

Closed
PabloRzBo wants to merge 1 commit into
masterfrom
pablo/sdct-1444-merge-small-ci-jobs
Closed

PabloRzBo wants to merge 1 commit into
masterfrom
pablo/sdct-1444-merge-small-ci-jobs

Conversation

@PabloRzBo

@PabloRzBo PabloRzBo commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Cuts about 2 runner-hours from every full GitLab pipeline (−7.5%) by running fewer, larger jobs where setup costs more than the work. Every check and test still runs exactly once, and the pipeline is not slower.

  • test_base (and test_base_arm64): 2 shards per JVM instead of 4.
  • muzzle: 4 shards instead of 8.
  • check_inst and check_smoke: 2 shards instead of 4.
  • check_base also runs the profiling and debugger checks (replaces check_profiling and check_debugger).
  • The spotless job also runs checkInstrumentationNaming and checkConfigurations (replaces check-instrumentation-naming and config-inversion-linter).

Motivation

Each GitLab job spends a fixed 3–6 minutes before doing any work: pod start, git clone and submodules, dependency-cache restore, chown of .gradle and Gradle configuration. In one full pipeline, test_base [8, 1/4] ran about 160 s of tests in a 574 s job; muzzle and the check_* jobs spent about 3–3.5 minutes on setup on the shared runners. None of these jobs sets the pipeline's duration (test_base was on the critical path in 9 of about 270 PR pipelines; muzzle and check_* almost never), so fewer shards save runner time without making the pipeline longer.

Additional Notes

Results

Measured on DDCI with a control branch on the same base (97096d1, comment-only change in both, so both run the full suite), two rounds started at the same time:

Group Control (jobs, job-min) This change (jobs, job-min)
test_base 24, 179 / 189 12, 106 / 113
muzzle 8, 55 / 50 4, 34 / 34
check_inst + check_smoke 8, 33 / 34 4, 18 / 19
check_base + profiling + debugger 3, 11 / 12 1, 4 / 4
spotless + naming + config linter 3, 10 / 10 1, 4 / 4
Whole pipeline 228 jobs, 26.5 h (round 1) 204 jobs, 24.2 h; −122 / −121 job-min per round
  • Pipeline duration: 23.3 vs 24.0 min (round 1); not slower in round 2.
  • Saving per removed job: about 6.2 min for a test_base shard and 3.8 min for a small shared-runner job, which matches the measured setup cost.
  • Extrapolated to the last 6 days of pipelines (PRs, merge queue, master, including test_base_arm64): about 6.6k job-hours per 28 days (about 2.5% of GitLab runner time).

Tests

Check Result
Same tests as control aggregate_test_counts identical per job family and JVM (total, passed, failed, skipped) in both rounds: 483,751 tests per pipeline
Same muzzle checks 7,860 muzzle results in both arms, now in 4 shards
Failure reporting --continue on the merged Gradle invocations so one failing task doesn't hide the others
Pipelines 2 green rounds per arm

Trade-offs and limits

  • Merged shards are about twice as long when tests really run. Both rounds were cache-warm (most test results restored from the S3 build cache). From the last 2 weeks of successful jobs, test_base shards are p95 18.8 / max 27.3 min and muzzle shards p95 8.3 / max 13.1 min; with about 6 min of fixed setup, merged shards should be about 32 min (p95) and 48 min (worst case) for test_base and about 11 min for muzzle, under the 1-hour job timeout. A retried flaky shard also reruns twice as many tests.
  • Not exercised on branches: test_base_arm64 (manual on PRs), master/merge-queue rules, a run with planted failures in merged jobs, and the populate_dep_cache change (scheduled pipeline only).
  • Job names change: check_profiling, check_debugger, check-instrumentation-naming and config-inversion-linter disappear. The only required GitLab status is dd-gitlab/default-pipeline.

Jira ticket: SDCT-1444

🤖 Generated with Claude Code

Run test_base on 2 shards instead of 4 and muzzle on 4 instead of 8,
check_inst and check_smoke on 2 instead of 4, fold the profiling and debugger
checks into check_base, and run checkInstrumentationNaming and
checkConfigurations in the spotless job. Every check and test still runs once;
--continue keeps all failures reported in merged Gradle invocations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PabloRzBo PabloRzBo added tag: no release notes Changes to exclude from release notes type: refactoring comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM labels Nov 12, 2026
@datadog-official

datadog-official Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.75% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 95399d0 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.06 s 13.95 s [+0.0%; +1.5%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.97 s 13.03 s [-1.5%; +0.5%] (no difference)
startup:petclinic:appsec:Agent 17.23 s 17.18 s [-0.7%; +1.2%] (no difference)
startup:petclinic:iast:Agent 17.08 s 17.19 s [-1.4%; +0.1%] (no difference)
startup:petclinic:profiling:Agent 16.91 s 16.66 s [+0.1%; +2.8%] (maybe worse)
startup:petclinic:sca:Agent 17.23 s 16.93 s [+1.0%; +2.6%] (maybe worse)
startup:petclinic:tracing:Agent 16.20 s 16.36 s [-1.9%; -0.1%] (maybe better)

Commit: 95399d07 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@PabloRzBo PabloRzBo changed the title Merge small CI jobs to cut per-job setup overhead [SDCT-1444] Merge small CI jobs to cut per-job setup overhead Nov 12, 2026
@PabloRzBo

Copy link
Copy Markdown
Contributor Author

Closing: the owner decided to keep a single, scoped CI PR for SDCT-1444. The test_base 4→2 shard change from this PR now lives in #13409 together with the smoke shard change; the muzzle/check-job merges are not pursued for now. Can be reopened if needed.

@PabloRzBo PabloRzBo closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant