문제: 성능 lane의 기계 의존 상한(httpclient 스트리밍 힙 증가, Mongo 시간 gate)이 performance.assertions.enabled 뒤에 있었고 기본값이 자리마다 달랐다(httpclient build false, Mongo build true, Mongo 테스트 코드 false). workflow만 GRADLE_OPTS로 켰다. 그래서 desktop에서 손으로 돌린 ./gradlew :performanceCheck가 httpclient 힙 상한을 재지 않고 통과했다 (2026-11-05 r10 게이트). JPA pool lane도 전에 같은 속성 뒤에서 아무 상한도 비교하지 않았다(PoolLaneClaimTest). 방법: 규칙을 build-logic strict-lane convention 한 곳에 둔다. - PERFORMANCE lane 테스트 JVM에 performance.assertions.enabled=true를 넣는다. 빌드(-P, GRADLE_OPTS)나 lane(systemProperty, jvmArgs, task 설정)이 true 아닌 값을 주면 테스트 전에 실패하고, 지우거나 true로 바꾸라고 알려 준다. true는 받아 준다(파생 서비스 workflow가 넘긴다). - PERFORMANCE lane은 skip된 테스트가 있으면 실패한다. - httpclient·Mongo 테스트는 조건 없이 단언하고 잰 값을 한 줄 남긴다. 두 leaf의 속성 선언과 integration-main·release workflow의 GRADLE_OPTS 줄을 지웠다. 사람과 workflow가 같은 명령을 쓴다. verifyStrictLaneStages가 읽는 run: 줄은 그대로다. 버린 대안: 두 leaf 기본값만 true로(정의가 leaf마다 남아 다음 lane이 다시 복사한다), 속성 삭제만(옛 속성을 기본값 false로 읽는 파생 서비스 테스트가 조용히 건너뛴다), 측정 전용 태스크(쓸 곳이 없다: 숫자만 볼 때는 JMH, 실패한 단언과 매 실행 출력이 값을 남긴다). 같은 원인으로 함께 고친 문서: httpclient support-matrix·release-checklist의 없는 lane 이름 spring62CompatibilityTest와 빠진 main push 주기. 위험·한계: 손으로 돌린 performanceCheck가 이제 상한을 실제로 재므로 느린 기계에서는 실패할 수 있다. JVM 인자 공급자(jvmArgumentProviders)가 넣는 -D는 보지 않는다. Docker가 없을 때 skip되는 통합·시스템 lane은 지금 모두 실패한다(전부 skip이면 executed no test, 아니면 skip 안 되는 컨테이너 테스트가 실패) — 거짓 통과가 아니어서 고치지 않았다. 검증(desktop ~/b4-logs, flock 아래, 노트북과 같은 트리 — git diff sha256 일치): - RED(고치기 전 트리 + 새 테스트): build-logic 새 테스트 4건이 UnexpectedBuildSuccess로 실패 — aPerformanceLaneFailsOnAnExceededBound WhenTheBuildSetsNoAssertionsProperty, …FailsBeforeTestingWhenTheBuild TurnsItsAssertionsOff, …FailsWhenItsOwnDeclarationTurnsTheAssertionsOff, …FailsWhenOneOfItsTestsIsSkipped. jvmArgs 경로(…FailsWhenItsJvmArguments TurnTheAssertionsOff)도 같은 실패. 실제 lane: 속성 없이 httpClientPerformanceTest rc=0인데 "skipped machine-dependent bound" 출력. - GREEN: -p build-logic check javadoc rc=0. :performanceCheck rc=0(lane 5개 테스트 26, skip 0; httpclient 힙 증가 5,243,880 B / 상한 16,777,216 B, Mongo p50·p95·p99 1ms, examined/returned 1.0, pool 대기 0). -p optional-platforms performanceCheck rc=0(grpc 1). 두 명령에 -Pperformance.assertions.enabled=false → rc=1, 6개 lane 모두 테스트 전 실패. =true → rc=0. verifyStrictLaneStages --dry-run 두 빌드 rc=0, architectureCheck rc=0, ci·mainCheck·integrationCheck·releaseCheck· performanceCheck --dry-run --configuration-cache rc=0, :mainCheck --continue --warning-mode=fail rc=0, -p optional-platforms ci rc=0, persistence-mongo:check rc=0, verify-httpclient-docs.py rc=0. - 이 변경 밖 실패: :ci :verifyDependencyLocks --continue와 httpclient:check가 CircuitBreakerStatusAccountingTest JDK 2건으로 rc=1. 기준 커밋 3d73b6f1에서도 10/10 실패(이 트리도 10/10). ci의 다른 task는 모두 통과했다. Refs: docs/upgrade/2026-11-maturity-review.md B-43, docs/testing/TESTING_STRATEGY.md 6절 BREAKING CHANGE: PERFORMANCE lane은 performance.assertions.enabled가 true가 아니거나 skip된 테스트가 있으면 실패한다. 자기 성능 lane의 그 속성 선언(false)과 skip을 없앤다.
283 lines
16 KiB
YAML
283 lines
16 KiB
YAML
name: integration-main
|
|
|
|
# Stage 2: is the merged state healthy.
|
|
#
|
|
# The question this stage answers is different from stage 1's. Stage 1 asks whether a diff is safe
|
|
# and blocks a merge; stage 2 asks whether main is healthy and does not — the merge has already
|
|
# happened. That difference is the point, and it is what lets a control exist without being an
|
|
# obstacle: a gate here still fails loudly, it just fails after the thing it is reporting on.
|
|
#
|
|
# Two kinds of work live here.
|
|
#
|
|
# 1. The lanes that need a machine that is not simultaneously compiling something else — load,
|
|
# abuse, graceful shutdown, TCP fault injection, resource bounds. They were web-nightly.yml and
|
|
# httpclient-nightly.yml, two module-shaped files whose only real difference was the cadence they
|
|
# shared. They now run on every push to main as well as nightly, which is strictly more often
|
|
# than before.
|
|
#
|
|
# 2. The container-backed lanes, run as the root category aggregates `:integrationCheck` and
|
|
# `:performanceCheck` rather than one workflow line per lane. A lane nobody runs is not coverage;
|
|
# it is a file that looks like coverage — and naming lanes here one by one is how fourteen of
|
|
# them came to run nowhere (review 2026-11-01 08-01). The pull-request gate's
|
|
# `verifyStrictLaneStages` now fails when a strict lane is in no stage a workflow executes. They
|
|
# are here rather than in stage 1 because every one of them starts containers or real servers,
|
|
# and the pull-request budget is minutes for the whole gate.
|
|
#
|
|
# What is deliberately NOT here: the web "Advanced capability" nightly lane that used to exist as
|
|
# web-advanced-nightly.yml (websocket-advanced-nightly.yml went with the websocket Advanced code,
|
|
# deleted 2026-09-25). The web leaf's build file says it outright — "They also run inside `test`,
|
|
# deliberately ... excluding them from the PR gate to make this lane look meaningful would mean the
|
|
# PR gate stopped covering a fifth of the leaf" — so `webAdvancedTest` selects tagged tests that
|
|
# `:<leaf>:test` already runs, and `:<leaf>:test` runs inside the root `check` on every pull request
|
|
# and every push to main. The strict lane itself survives in release.yml, where its
|
|
# fail-on-nothing-discovered guard is worth a job.
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
schedule:
|
|
# 03:00 UTC. Late enough that the day's merges are in, early enough that a failure is triaged
|
|
# before the next working day starts.
|
|
- cron: '0 3 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
# The documentation-drift gates that used to run here are gone rather than demoted.
|
|
#
|
|
# They were four hand-written parsers: README shell blocks compared against the Gradle task graph,
|
|
# runbook identifiers compared against every declared Java type, a leaf count written in prose
|
|
# compared against the registry, and a Markdown table compared against the declared source sets.
|
|
# Each was a custom parser for a file format nobody controls, and each made a documentation edit a
|
|
# precondition for a build. A stale sentence is a defect, but it is not one a build can be failed
|
|
# for, and link-check.yml already answers the one documentation question with a stable machine
|
|
# answer: does this link resolve.
|
|
|
|
jobs:
|
|
# The main-branch stage of the Gradle gates (`:mainCheck`): the environment contract, full-boot
|
|
# qualification, the sample web contract, the public-path baseline, the conditional transport
|
|
# lanes, the messaging contract lanes and each leaf's document-contract lanes. API surfaces are
|
|
# in the pull-request `check` (owner decision 20). The rest left the pull-request gate (review
|
|
# 2026-09-24 BUILD, item 12); none of them is deleted.
|
|
main-check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- name: Require the committed public-path security baseline
|
|
run: |
|
|
set -euo pipefail
|
|
readonly snapshot='docs/security/public-paths-snapshot.txt'
|
|
if [[ ! -s "${snapshot}" ]] || ! git ls-files --error-unmatch "${snapshot}" >/dev/null 2>&1; then
|
|
echo "::error::${snapshot} is missing, empty or not committed; verifyPublicPathSnapshot must not create its own baseline."
|
|
exit 1
|
|
fi
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the main-branch stage
|
|
working-directory: src
|
|
# `--continue`: one failed lane (an external image that cannot be pulled, say) must not stop
|
|
# the other main-stage gates from reporting (review 2026-11-01 08-04).
|
|
run: ./gradlew :mainCheck --continue --warning-mode=fail --stacktrace
|
|
|
|
# Storability only: the `--dry-run` below plans `integrationCheck` without running a lane. The
|
|
# lanes run in `integration-check`.
|
|
#
|
|
# Two questions. Can every task in the repository-wide gates be *stored* (a property of the task
|
|
# graph, so `--dry-run` answers it for all of them in seconds)? And is a stored entry *reused* while
|
|
# the build still executes its work (checked on the two core leaves)?
|
|
configuration-cache:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Require every repository-wide gate to be storable
|
|
working-directory: src
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
for gate in ci mainCheck integrationCheck releaseCheck; do
|
|
echo "::group::${gate}"
|
|
./gradlew "${gate}" --dry-run \
|
|
--configuration-cache --configuration-cache-problems=fail --stacktrace
|
|
output="$({ ./gradlew "${gate}" --dry-run \
|
|
--configuration-cache --configuration-cache-problems=fail --stacktrace; } 2>&1)"
|
|
printf '%s\n' "${output}"
|
|
echo '::endgroup::'
|
|
grep -Fq 'Reusing configuration cache.' <<<"${output}" || {
|
|
echo "::error::Gradle did not reuse the configuration cache for ${gate}."
|
|
exit 1
|
|
}
|
|
done
|
|
- name: Store configuration cache for the everyday core build
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:domain-core:check
|
|
:application-core:check
|
|
--configuration-cache
|
|
--configuration-cache-problems=fail
|
|
--stacktrace
|
|
- name: Require configuration-cache reuse
|
|
working-directory: src
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
output="$({ ./gradlew :domain-core:check :application-core:check \
|
|
--configuration-cache --configuration-cache-problems=fail --stacktrace; } 2>&1)"
|
|
printf '%s\n' "${output}"
|
|
grep -Fq 'Reusing configuration cache.' <<<"${output}" || {
|
|
echo '::error::Gradle did not reuse the configuration cache on the second identical build.'
|
|
exit 1
|
|
}
|
|
|
|
# The integration stage: every integration-category strict lane (`:integrationCheck`).
|
|
#
|
|
# This job replaced six jobs that named lanes one by one — the MongoDB lanes, app-bootstrap's
|
|
# Testcontainers lane, the moved messaging/object-storage/sample contracts, six of the
|
|
# persistence-jpa PostgreSQL contracts and the httpclient fault injection. Naming lanes was how
|
|
# eleven persistence-jpa readiness lanes ended up running nowhere: a lane added to Gradle without a
|
|
# workflow line was declared, failed closed, and executed on no machine (review 2026-11-01 08-01).
|
|
# The aggregate is the list now. A lane joins it by declaring `integration()`, and the root
|
|
# `verifyStrictLaneStages` (pull-request gate) fails when a strict lane is in no stage a workflow
|
|
# executes.
|
|
#
|
|
# `--continue` so that one red lane does not hide the others: every failed lane is named in the
|
|
# same run. Lanes that need an input this job does not have (the Redis topology coordinates, the
|
|
# protected AWS sandbox) are `explicitOnly`; the aggregate prints which ones it left out.
|
|
# The container lanes take the build-wide `exclusiveRealServerLane` slot one at a time, so the
|
|
# job's length is the sum of the lanes. Split the aggregate across jobs when it outgrows its
|
|
# timeout rather than going back to naming lanes.
|
|
#
|
|
# Measured length (one local run of `:integrationCheck`, 2026-11-01, 37 lanes, images already
|
|
# pulled, machine load 24): 794 s for the command, of which the lanes' test JVMs took about 624 s
|
|
# in sum — mongoSecurityIntegrationTest 89, jpaPlatformContractTest 104, messagingCertificationTest
|
|
# 70, mongoCompatibilityTest 69, jpaPlatformMigrationTest 66, mongoFailoverTest 59, the eleven JPA
|
|
# readiness lanes 57 together, httpClientFailureInjectionTest 27, sample integrationTest 23,
|
|
# messaging starter integrationTest 21, the rest under 10 each — and the remainder was compilation
|
|
# and container start-up between lanes. A hosted runner adds cold image pulls (about 5 GB
|
|
# uncompressed across the PostgreSQL, MongoDB, Kafka, nginx, httpbin and Toxiproxy images) and a
|
|
# cold Gradle cache; expect 25 to 40 minutes (an estimate, not a measured hosted run). The 240-minute timeout is a ceiling for a hung container, not a budget.
|
|
integration-check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 240
|
|
env:
|
|
# Reuse would hand the failover lane a replica set another lane had already faulted.
|
|
TESTCONTAINERS_REUSE_ENABLE: "false"
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run every integration-category strict lane
|
|
working-directory: src
|
|
run: ./gradlew :integrationCheck --continue --stacktrace
|
|
- name: Publish the integration lane reports
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: integration-check-reports
|
|
path: src/**/build/reports/tests/
|
|
if-no-files-found: warn
|
|
|
|
# The performance stage: every performance-category strict lane (`:performanceCheck`) — Tomcat and
|
|
# Jetty load, slow-client and graceful shutdown, the Hikari pool contract, the httpclient pool,
|
|
# streaming, retry and rotation bounds, the MongoDB resource budget. They measure behaviour that
|
|
# degrades gradually rather than breaking outright, which is the kind of regression a per-PR gate
|
|
# never catches. This job replaced `web-load-abuse-and-shutdown`, which despite its name ran
|
|
# `:adapter:inbound:web:test` and `webJettyCompatTest` — two lanes the pull-request and main stages
|
|
# already run — and never the load lanes (review 2026-11-01 08-01), and `httpclient-performance`.
|
|
# No assertions switch: the strict-lane convention asserts every performance lane's bounds, so this
|
|
# job and a person on a workstation run the same command and get the same bounds.
|
|
performance-check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120
|
|
env:
|
|
TESTCONTAINERS_REUSE_ENABLE: "false"
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run every performance-category strict lane
|
|
working-directory: src
|
|
run: ./gradlew :performanceCheck --continue --stacktrace
|
|
# The optional gRPC build's performance lanes (grpcPerformanceTest). A separate build, so a
|
|
# separate command; its own verifyStrictLaneStages counts this line (review 2026-11-03 RR-06-03).
|
|
- name: Run every optional-platform performance-category strict lane
|
|
if: always()
|
|
working-directory: src
|
|
run: ./gradlew -p optional-platforms performanceCheck --continue --stacktrace
|
|
- name: Publish the performance lane reports
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: performance-check-reports
|
|
path: src/**/build/reports/tests/
|
|
if-no-files-found: warn
|
|
|
|
httpclient-http3-experimental:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
# Experimental by design (D-08): the result is reported, never used to block a merge. Registered
|
|
# advisory so that "this job cannot fail the
|
|
# build" is written down rather than inferred from a field two hundred lines into a workflow.
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Exercise the experimental HTTP/3 opt-in
|
|
working-directory: src
|
|
run: ./gradlew :adapter:outbound:httpclient:test -Phttp3.tests.enabled=true --stacktrace
|
|
|
|
# The optional gRPC platform build declares one strict INTEGRATION lane —
|
|
# `grpc-operation-ledger-jpa:integrationTest`, which certifies the atomic
|
|
# `INSERT ... ON CONFLICT DO NOTHING` claim that durable mutation idempotency rests on against a
|
|
# real PostgreSQL. It was registered in Gradle, listed in `strictTestLanes`, and invoked by
|
|
# nothing: `-p optional-platforms ci` reaches `checkAll`, `qualityCheck` and the dependency
|
|
# verifier, none of which runs a lane whose category is INTEGRATION, and release.yml's gRPC gate
|
|
# names only the three grpc-testkit lanes.
|
|
#
|
|
# Stage 2 rather than stage 1 for the same reason as every other job in this file: the lane starts
|
|
# a Testcontainers PostgreSQL, and the pull-request budget is minutes for the whole gate.
|
|
grpc-optional-platform-integration:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
TESTCONTAINERS_REUSE_ENABLE: "false"
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Certify the gRPC operation ledger against real PostgreSQL
|
|
working-directory: src
|
|
run: ./gradlew -p optional-platforms integrationCheck --stacktrace
|
|
- name: Publish the optional-platform lane reports
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: grpc-optional-platform-integration-reports
|
|
path: src/optional-platforms/**/build/reports/tests/
|
|
if-no-files-found: warn
|
|
|
|
# Dynamic half of the compose-profile contract. Every blocking lane the matrix declares runs on
|
|
# main and nightly; a partial lane run is reproduction only and cannot satisfy this job. The count
|
|
# is not written here on purpose — a number in prose drifts the moment a lane is added, and the
|
|
# matrix file is the thing this job reads.
|
|
#
|
|
# The lanes boot the qualification image (src/Dockerfile COMPOSITION=qualification: every
|
|
# capability module present). The script selects it; release.yml builds the default image.
|
|
compose-runtime-smoke:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 180
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- name: Run every blocking Compose runtime lane
|
|
run: bash scripts/run-compose-runtime-smoke.sh --matrix src/config/runtime/compose-profile-contracts.json
|
|
- name: Publish sanitized runtime-smoke evidence
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: compose-runtime-smoke-evidence
|
|
path: src/app-bootstrap/build/evidence/runtime-smoke
|
|
if-no-files-found: warn
|