문제: High·P1을 고친 뒤에도 P2·P3 약 90건이 남았다. 연결·구독·메시지 크기 상한이 없는 전송(WebSocket·gRPC·GraphQL deadline), 낙관적 충돌의 500, upsert 경쟁, Mongo 무제한 timeout, 샘플 목록 N+1, 갈라진 복사본 (TenantId 3벌, 이벤트 ID 문법 5곳, SQLState 표 2벌), 문서를 읽는 PR 테스트와 캐시를 막는 lane 설정 등이다. 새 기능을 어디에 어떤 순서로 만드는지 알려 주는 문서와 도구가 없었다. MinIO 공식 이미지가 사라져 객체 저장소 lane이 돌지 않았다. 방법: 영역별 묶음으로 실패 테스트를 먼저 쓰고 고쳤다. 고치는 중에 찾은 결함도 함께 고쳤다(durable operation id가 UUIDv4라 이벤트가 전부 DEAD, S3 어댑터 생성·작은 chunk 읽기 실패, Redis 조건부 기록의 EVALSHA 권한). MinIO는 pgsty/minio를 digest로 고정했다(Chainguard는 태그·실행 사용자· mc 이미지 문제로 버림). docs/manual/에 작업 순서와 판단 지점을 쓰고, scripts/new-feature.sh가 5개 leaf에 뼈대를 만든다. 생성→빌드→통과 왕복을 verifyFeatureScaffold가 mainCheck에서 본다. 묶음별 결과와 결정은 리뷰 README 14절에 있다. 위험·한계: 파생 서비스 동작이 바뀐다. JDBC batch 50 기본, 운영 jar에서 H2 제거, 트랜잭션 30초 제한, 격리 수준을 Hikari에서 고정, gRPC· WebSocket·GraphQL 새 한도, correlation ID 규칙 밖이면 서버가 교체, 샘플 키 오류 코드 IDEMPOTENCY_KEY_INVALID. 새 leaf 두 개 (composition:durable-operation, adapter:inbound:messaging)와 새 마이그레이션(postgresql V20·V21, notification V11·V12, sample V8_1, grpc-ledger V002)이 생긴다. V21 유일 인덱스는 기존 중복이 있으면 실패한다(runbook에 확인 쿼리). 검증: ci, mainCheck(생성 명령 왕복 포함), integrationCheck(MinIO 포함 전 컨테이너 lane), -p optional-platforms ci integrationCheck 통과. Refs: docs/reviews/2026-11-01-maturity-review/README.md 14절 BREAKING CHANGE: JDBC batch 기본 켜짐, H2 운영 의존 제거, 트랜잭션 기본 제한 30초, gRPC·WebSocket·GraphQL 서버 한도 기본값 추가, 샘플 Idempotency-Key 오류 코드 변경.
264 lines
11 KiB
YAML
264 lines
11 KiB
YAML
name: pr-adapters
|
|
|
|
# Stage 1, the adapter half: the lanes a pull request must clear that `ci-quality-gates.yml` cannot
|
|
# reach.
|
|
#
|
|
# It replaces web-pr.yml, websocket-pr.yml, httpclient-contract.yml and jpa-pr.yml, which were four
|
|
# files split by module rather than by stage. Splitting by module is what made the duplication
|
|
# invisible: each file opened with its own "unit and architecture" job running
|
|
# `:<leaf>:test verifyCleanArchitectureDependencies`, and all four of those were already inside the
|
|
# root `check` that ci-quality-gates.yml runs on every pull request with no path filter. Four jobs,
|
|
# four runners, four Gradle configurations, zero additional coverage. They are gone; what is left
|
|
# here is only what `check` does not run.
|
|
#
|
|
# What `check` does not run, and therefore what this file is for:
|
|
# * lanes with their own source set — the servlet system contract, a second servlet container,
|
|
# a real Nginx;
|
|
# * lanes parameterised per run — one PostgreSQL major per job, one HTTP transport per job.
|
|
# Each of those genuinely cannot run inside `check`, which is the test for whether a job belongs
|
|
# here at all.
|
|
#
|
|
# Path filtering is per job rather than per workflow. The four files it replaces each carried an
|
|
# `on.pull_request.paths` list, so the whole file was skipped or run as a unit; a change touching
|
|
# web and JPA started two workflows and a change touching neither still started none. Here one
|
|
# `changes` job computes the answer once from the pull request's own diff and every lane reads it.
|
|
# The filter is a plain `git diff` rather than a filter action: this repository pins every action by
|
|
# commit SHA and adding a third-party action to compute a boolean is a supply-chain decision, not a
|
|
# convenience.
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# One diff, read once. `workflow_dispatch` answers "everything changed", because a manual run is
|
|
# somebody asking for the lanes and there is no base ref to compare against.
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
outputs:
|
|
web: ${{ steps.filter.outputs.web }}
|
|
websocket: ${{ steps.filter.outputs.websocket }}
|
|
httpclient: ${{ steps.filter.outputs.httpclient }}
|
|
jpa: ${{ steps.filter.outputs.jpa }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
with:
|
|
# Both endpoints of the pull request's diff have to be present locally; the default
|
|
# shallow fetch has neither the base commit nor the merge base.
|
|
fetch-depth: 0
|
|
- name: Decide which adapter lanes this diff can affect
|
|
id: filter
|
|
env:
|
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
run: |
|
|
set -euo pipefail
|
|
if [ "${GITHUB_EVENT_NAME}" != 'pull_request' ]; then
|
|
changed='ALL'
|
|
else
|
|
if [ -z "${BASE_SHA}" ] || [ -z "${HEAD_SHA}" ]; then
|
|
echo "::error::pull request diff endpoints are missing; refusing to report no lanes"
|
|
exit 1
|
|
fi
|
|
changed="$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}")"
|
|
fi
|
|
# Fail closed rather than reporting "nothing changed": an empty diff on a pull request
|
|
# means the comparison did not work, and a filter that answers false on a broken
|
|
# comparison silently turns every lane below off.
|
|
if [ "${changed}" != 'ALL' ] && [ -z "${changed}" ]; then
|
|
echo "::error::the pull request diff is empty; the comparison did not run"
|
|
exit 1
|
|
fi
|
|
printf 'changed files:\n%s\n' "${changed}"
|
|
emit() {
|
|
lane="$1"
|
|
shift
|
|
if [ "${changed}" = 'ALL' ]; then
|
|
printf '%s=true\n' "${lane}" >> "${GITHUB_OUTPUT}"
|
|
printf 'lane %s: true (manual run)\n' "${lane}"
|
|
return 0
|
|
fi
|
|
for pattern in "$@"; do
|
|
if printf '%s\n' "${changed}" | grep -qE -- "${pattern}"; then
|
|
printf '%s=true\n' "${lane}" >> "${GITHUB_OUTPUT}"
|
|
printf 'lane %s: true (%s)\n' "${lane}" "${pattern}"
|
|
return 0
|
|
fi
|
|
done
|
|
printf '%s=false\n' "${lane}" >> "${GITHUB_OUTPUT}"
|
|
printf 'lane %s: false\n' "${lane}"
|
|
}
|
|
# This workflow and the composite action every lane below uses are in every lane's path
|
|
# set: a change to either changes what the lanes do, and a gate that does not re-run when
|
|
# its own definition changes is a gate nobody has seen run in its current form.
|
|
common='^\.github/workflows/pr-adapters\.yml$|^\.github/actions/'
|
|
emit web \
|
|
'^src/adapter/inbound/web/' \
|
|
'^src/application-core/src/.*/operation/' \
|
|
'^src/application-core/src/.*/idempotency/' \
|
|
'^src/adapter/outbound/persistence-jpa/src/.*/operation/' \
|
|
'^docs/web/' \
|
|
"${common}"
|
|
emit websocket \
|
|
'^src/adapter/inbound/websocket/' \
|
|
'^docs/websocket/' \
|
|
"${common}"
|
|
emit httpclient \
|
|
'^src/adapter/outbound/httpclient/' \
|
|
'^src/app-bootstrap/src/.*/httpclient/' \
|
|
'^docs/httpclient/' \
|
|
'^scripts/verify-httpclient-docs\.py$' \
|
|
"${common}"
|
|
emit jpa \
|
|
'^src/adapter/outbound/persistence-jpa/' \
|
|
'^src/app-bootstrap/src/.*/jpa/' \
|
|
'^src/config/architecture/modules\.json$' \
|
|
'^docs/jpa/' \
|
|
'^docs/adr/ADR-JPA-' \
|
|
'^infra/jpa/' \
|
|
"${common}"
|
|
|
|
# The servlet system contract on both containers the template supports (Tomcat, Jetty). Real
|
|
# sockets, so neither lane is part of `check`.
|
|
web-servlet-containers:
|
|
needs: changes
|
|
if: needs.changes.outputs.web == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 40
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the servlet system contract on Tomcat and Jetty
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:inbound:web:systemTest
|
|
:adapter:inbound:web:webJettyCompatTest
|
|
--stacktrace
|
|
- name: Publish the test reports
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: web-servlet-containers-reports
|
|
path: src/adapter/inbound/web/build/reports/tests/
|
|
if-no-files-found: warn
|
|
|
|
websocket-container-matrix:
|
|
needs: changes
|
|
if: needs.changes.outputs.websocket == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the runtime contract on the second servlet container
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:inbound:websocket:websocketJettyTest
|
|
--stacktrace
|
|
|
|
# Docker-gated, and the lane fails rather than skipping. Upgrade handling is the single most
|
|
# common WebSocket deployment failure and it is invisible from either side alone.
|
|
websocket-nginx-contract:
|
|
needs: changes
|
|
if: needs.changes.outputs.websocket == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the upgrade and forwarded-header contract behind a real Nginx
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:inbound:websocket:websocketNginxTest
|
|
--stacktrace
|
|
|
|
# One transport per job, so a transport that stops satisfying the shared contract fails on its own
|
|
# row instead of disappearing into an aggregate run. `check` runs this lane once, unparameterised.
|
|
httpclient-stable-contract:
|
|
needs: changes
|
|
if: needs.changes.outputs.httpclient == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
transport: [apache, jdk]
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Certify one transport against the shared contract
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:outbound:httpclient:httpClientStableContractTest
|
|
-Phttpclient.contract.transports=${{ matrix.transport }}
|
|
--stacktrace
|
|
|
|
# Only the Spring 7.0 lane. httpClientSecurityTest and spring62ApiSurfaceScan used to run here
|
|
# too; both are `dependsOn` of this leaf's `check`
|
|
# (src/adapter/outbound/httpclient/build.gradle), so ci-quality-gates.yml already ran them on the
|
|
# same pull request. spring70CompatibilityTest is deliberately outside `check` and is what is left.
|
|
httpclient-security-and-compatibility:
|
|
needs: changes
|
|
if: needs.changes.outputs.httpclient == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the next-major Spring compatibility lane
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:outbound:httpclient:spring70CompatibilityTest
|
|
--stacktrace
|
|
|
|
# 16 and 18 — the ends of the Stable matrix. 17 runs in the integration stage. What this does not
|
|
# do is skip the container lane on a runner without Docker: PostgreSqlContainerFactory throws,
|
|
# because a skipped contract reports success for a database nobody tested.
|
|
jpa-postgresql-contract:
|
|
needs: changes
|
|
if: needs.changes.outputs.jpa == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
postgresql: ["16", "18"]
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Certify the platform against PostgreSQL ${{ matrix.postgresql }}
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:outbound:persistence-jpa:jpaPlatformContractTest
|
|
-Pjpa.matrix.versions=${{ matrix.postgresql }}
|
|
--stacktrace
|
|
|
|
jpa-migration-smoke:
|
|
needs: changes
|
|
if: needs.changes.outputs.jpa == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # actions/checkout@v4.2.2
|
|
- uses: ./.github/actions/setup-gradle-java
|
|
- name: Run the migration upgrade smoke scenarios
|
|
working-directory: src
|
|
run: >-
|
|
./gradlew
|
|
:adapter:outbound:persistence-jpa:jpaPlatformMigrationTest
|
|
--stacktrace
|