Skip to content

ci(java): split java lane into fast/slow + shared PG sidecar (~3× faster, crash-resistant)#162

Merged
dmealing merged 1 commit into
mainfrom
ci/java-speedup
Jul 4, 2026
Merged

ci(java): split java lane into fast/slow + shared PG sidecar (~3× faster, crash-resistant)#162
dmealing merged 1 commit into
mainfrom
ci/java-speedup

Conversation

@dmealing

@dmealing dmealing commented Jul 4, 2026

Copy link
Copy Markdown
Member

Problem

The Java local-ci job took ~10m and intermittently died to runner shutdown/cancel ("received a shutdown signal / operation was canceled"). Two root causes: (1) it ran the full 14-module reactor + double-conformance + JaCoCo single-threaded, and (2) local-ci.yml never wired the shared Postgres sidecar, so java+kotlin integration booted ~30-40 serial Testcontainers Postgres — the main wall-clock sink and, contending on one Docker daemon with the other 3 ports, the crash vector.

Changes

  • Split java into two parallel jobs. java-fast (java+kotlin conformance — the correctness signal) and java-slow (full reactor + docker integration). A cancel/OOM mid-integration no longer kills the fast verdict. ci-local.sh grows --only java-fast|java-slow; --only java (and a plain local run) still runs both lanes in order, byte-equivalent to before.
  • Shared Postgres sidecar for every integration-running job (ts/python/csharp/java-slow). Each port already honors METAOBJECTS_TEST_PG_URL and CREATEs a per-scenario database. The sidecar publishes 5432 to a dynamic host port so concurrent jobs on the shared self-hosted host never collide on a fixed port.
  • Skip JaCoCo in the reactor (-Djacoco.skip=true) — its coverage gate is haltOnFailure=false, so it's pure instrumentation overhead for a pass/fail signal.
  • Deliberately not adding -T 1C: this reactor has a documented shared-render-jar race under parallel module builds (integration-test.sh).

Verified

Full workflow_dispatch run on this branch — all jobs green:

Job Before After
java (combined) ~9.8m java-fast 0m46s · java-slow 3m00s (parallel)
ts 5.3m 2m17s
python 2.6m 0m34s
csharp 2.0m 0m56s

Java correctness signal: 10m → <1m. Full Java lane: ~3× faster. Every port benefits from removing the shared-daemon container contention.

🤖 Generated with Claude Code

The Java local-ci job took ~10m and intermittently died to runner
shutdown/cancel. Two structural fixes:

- Split `java` into two parallel jobs: `java-fast` (java+kotlin
  conformance, ~2-3m — the correctness signal) and `java-slow` (full
  reactor + docker integration). A cancel/OOM mid-integration no longer
  kills the fast verdict, and the conformance signal surfaces quickly.
  ci-local.sh grows `--only java-fast|java-slow`; `--only java` (and a
  plain local run) still runs both lanes in order, byte-equivalent to
  before.
- Give every integration-running job (ts/python/csharp/java-slow) a
  shared Postgres SIDECAR instead of each scenario booting its own
  Testcontainers Postgres (java+kotlin alone booted ~30-40 serial
  containers — the main wall-clock sink and daemon-contention/crash
  vector). Each port already honors METAOBJECTS_TEST_PG_URL and CREATEs a
  per-scenario database. The sidecar publishes 5432 to a DYNAMIC host
  port so concurrent jobs on the shared self-hosted host never collide.
- Skip JaCoCo in the reactor (`-Djacoco.skip=true`): its coverage gate is
  haltOnFailure=false, so it never fails the build — pure instrumentation
  overhead for a pass/fail signal.

Deliberately NOT adding `-T 1C`: this reactor has a documented shared-
render-jar race under parallel module builds (integration-test.sh).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ew1XfYSbEAezxjs9opynAe
@dmealing
dmealing merged commit eed48d9 into main Jul 4, 2026
9 checks passed
@dmealing
dmealing deleted the ci/java-speedup branch July 4, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant