refactor: 빌드 최적화 및 ci 수정

This commit is contained in:
donghyeon-ka
2026-09-17 15:24:31 +09:00
parent ad99ee6f4e
commit eaf189590e
22 changed files with 171 additions and 42 deletions
+13
View File
@@ -0,0 +1,13 @@
# Optional gRPC platforms
The default application does not depend on `grpc/*` or `grpc-advanced/*`, so those 18 projects are
kept out of the main multi-project build. This build preserves their existing project paths and
internal project dependencies while making their configuration opt-in.
```bash
./gradlew -p optional-platforms ci
./gradlew -p optional-platforms :grpc:grpc-testkit:grpcInProcessContractTest
```
`adapter:inbound:grpc` remains in the main application build because it is an application adapter;
the reusable gRPC platform libraries are optional capability code and live here.
+23
View File
@@ -0,0 +1,23 @@
ext.sourceRevision = providers.gradleProperty('gitRevision')
.orElse(providers.environmentVariable('GIT_SHA'))
.orElse(providers.environmentVariable('GITHUB_SHA'))
.getOrElse('unknown')
tasks.register('checkAll') {
group = 'verification'
description = 'Runs every gRPC optional-platform leaf check.'
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:check" }
}
tasks.register('qualityCheck') {
group = 'verification'
description = 'Runs production-bytecode static analysis for every optional-platform leaf.'
dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:qualityCheck" }
}
tasks.register('ci') {
group = 'verification'
description = 'Runs the optional gRPC platform verification surface.'
dependsOn tasks.named('checkAll')
dependsOn tasks.named('qualityCheck')
}
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// The Advanced boundary itself: capability grades, the `ca-skeleton.grpc.advanced.*` feature-flag
// contract, the module guard that refuses an unflagged capability, and the per-capability
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Compatibility bridges: gRPC-Web, the Servlet HTTP/2 profile, the Spring Integration bridge, the
// Reactor adapter, and the Kotlin coroutine/Flow boundary.
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Channelz/CSDS diagnostics for administrators, with the redactor that keeps socket authority,
// credentials, certificate material, metadata and payload out of a snapshot, plus the advanced
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Protobuf Edition lanes. Edition 2024 is an opt-in Advanced lane that must produce cross-consumer
// compile evidence before anything public moves onto it; Edition 2026 is a watch lane that records
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Resilience and discovery capabilities that Stable refuses: read-only unary hedging, the custom
// name resolver SPI, the custom load balancer SPI, and the proxyless xDS experimental profile.
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// The streaming shapes the Stable plan deliberately excludes: client streaming sessions with
// dedup/checkpoint/resume, bidirectional sessions with independent per-direction sequences, and the
+11 -13
View File
@@ -1,9 +1,8 @@
# grpc — local authority for the gRPC platform family
이 문서는 `grpc:*` family의 **local authority**다. leaf 목록·gradle path·허용 의존성은
`src/config/architecture/modules.json`이 SSOT이며 이 문서는 그것을 복제하지 않는다. 여기서 정하는
것은 registry가 표현할 수 없는 것들이다: family별 framework 규칙, 증거 등급, Stable 범위의 경계,
그리고 `runtime_memberships`가 비어 있다는 사실의 의미.
이 문서는 `grpc:*` family의 **local authority**다. gRPC platform은 기본 application build와 분리된
`src/optional-platforms` build가 소유한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급,
Stable 범위의 경계와 application에 채택될 때 필요한 계약이다.
Root 정책(`CLAUDE.md` / `AGENTS.md`)과 충돌하면 root가 이긴다.
@@ -70,17 +69,16 @@ capability flag 뒤에 있다. `GrpcPlatformStartupValidator`가 Stable catalog
`grpc-spring-boot-starter`는 어떤 advanced module도 참조하지 않는다. registry의
`allowed_dependencies`가 이를 build time에, `GrpcStableBuildInvariant`가 runtime에 강제한다.
## Runtime membership이 비어 있다는 것의 의미
## Optional build에 있다는 것의 의미
registry의 모든 `grpc:*` leaf는 현재 `runtime_memberships`가 비어 있다. `messaging:*`가 처음
착지했을 때와 같은 상태다:
`grpc:*`와 `grpc-advanced:*`는 기본 `ca-skeleton` settings에 include되지 않는다. 따라서 일반
`:app-bootstrap:build`는 이 18개 project를 configure하지 않는다. 플랫폼 자체는
`./gradlew -p optional-platforms ci`로 검증하고, application runtime에 실제 채택하려면 composition root가
명시적으로 dependency를 가져오는 별도 변경이 필요하다.
- **배포 아티팩트가 싣고 있지 않다.** build-only다.
- 애플리케이션에 배선하려면 registry의 `runtime_memberships`를 먼저 바꾸고
`verifyRuntimeModuleMembership`을 통과시켜야 한다. 코드만 추가하는 것으로는 런타임에 들어가지 않는다.
- **런타임에 있다는 것과 자격이 증명됐다는 것은 다르다.** 현재 in-process·Netty·fault lane은 실제로
실행되어 통과하지만, 실제 배포 환경에서의 soak·performance baseline은 없다. `GrpcStableReleaseGate`가
그 구분을 문서가 아니라 코드로 붙들고 있다.
런타임 포함 여부와 qualification은 별개다. in-process·Netty·fault lane이 통과해도 실제 배포 환경의
soak/performance baseline을 자동으로 의미하지 않는다. 지원 범위는 release gate와 support matrix가
별도로 정의한다.
## application이 이 family에 도달하는 경로
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Operational surface: the standard health registry, the reflection exposure policy, the drain
// coordinator, and the secret-free runtime policy snapshot an administrator reads.
+5 -3
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.grpc-platform-module'
plugins {
id 'ca.grpc-platform-module'
}
// Client runtime: named channel profiles, channel runtime generations with drain, the typed stub
// factory that refuses to hand a raw Channel to application code, and client metadata/credentials.
@@ -7,6 +9,6 @@ dependencies {
api project(':grpc:grpc-core-api')
api project(':grpc:grpc-policy')
api "io.grpc:grpc-api:${grpcVersion}"
api "io.grpc:grpc-stub:${grpcVersion}"
api "io.grpc:grpc-api"
api "io.grpc:grpc-stub"
}
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Contract governance: Buf format/lint/breaking policy, the single codegen owner declaration, and
// the descriptor/schema-hash release artifact with its consumer-compile gate.
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// The platform's port layer: identifiers, method policy, execution evidence, failure model,
// deadline primitives and request context.
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Stable discovery: Static/DNS resolvers, pick_first/round_robin load balancing, and the
// Kubernetes VIP / headless / mesh routing profiles. Custom resolvers, custom load balancers and
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Bounded observability: logical RPC vs physical attempt vs stream lifecycle, with a cardinality
// policy that refuses payload, raw metadata and any actor/tenant/object/stream/idempotency
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Durable mutation idempotency: the operation ledger entity, its state machine, the vendor-neutral
// repository port and the Spring Data JPA binding, plus the migration that owns the unique
+5 -3
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.grpc-platform-module'
plugins {
id 'ca.grpc-platform-module'
}
// Validation, context propagation, status/rich-error mapping, TLS/credential profiles, deadline
// and cancellation, retry ownership and eligibility, idempotency and completion recovery, server
@@ -9,6 +11,6 @@ dependencies {
// api: interceptors, context binders and the error mapper name io.grpc types in public
// signatures, so an adopter cannot compile against this module without them.
api "io.grpc:grpc-api:${grpcVersion}"
api "io.grpc:grpc-stub:${grpcVersion}"
api "io.grpc:grpc-api"
api "io.grpc:grpc-stub"
}
+3 -1
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.platform-module'
plugins {
id 'ca.platform-module'
}
// Schema source of truth: the `.proto` files plus the rule engine that judges them.
//
+5 -3
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.grpc-platform-module'
plugins {
id 'ca.grpc-platform-module'
}
// Server boundary: the ArchUnit-shaped application boundary rules, the typed service adapter SPI,
// the interceptor order contract, and the Netty server/executor/admission profiles.
@@ -10,6 +12,6 @@ dependencies {
api project(':grpc:grpc-core-api')
api project(':grpc:grpc-policy')
api "io.grpc:grpc-api:${grpcVersion}"
api "io.grpc:grpc-stub:${grpcVersion}"
api "io.grpc:grpc-api"
api "io.grpc:grpc-stub"
}
+4 -2
View File
@@ -1,5 +1,7 @@
apply plugin: 'ca.platform-module'
apply plugin: 'ca.spring-config'
plugins {
id 'ca.platform-module'
id 'ca.spring-config'
}
// The platform's composition boundary: typed properties, auto-configuration and the startup
// validator that refuses a deployment whose configuration contradicts a Stable invariant.
+7 -5
View File
@@ -1,4 +1,6 @@
apply plugin: 'ca.grpc-platform-module'
plugins {
id 'ca.grpc-platform-module'
}
// Certification. The Stable plan splits this across four modules (core / in-process / netty /
// fault); this repository already expresses "these two runs are not the same kind of evidence" with
@@ -50,11 +52,11 @@ dependencies {
api project(':grpc:grpc-codegen')
api project(':grpc:grpc-operation-ledger-jpa')
api "io.grpc:grpc-api:${grpcVersion}"
api "io.grpc:grpc-stub:${grpcVersion}"
api "io.grpc:grpc-api"
api "io.grpc:grpc-stub"
// The transports the lanes stand on. In-process is fast contract evidence; Netty is the only
// transport this platform certifies, and the lane separation is what keeps them distinguishable.
implementation "io.grpc:grpc-inprocess:${grpcVersion}"
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"
implementation "io.grpc:grpc-inprocess"
implementation "io.grpc:grpc-netty-shaded"
}
+59
View File
@@ -0,0 +1,59 @@
pluginManagement {
includeBuild('../build-logic')
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
}
versionCatalogs {
libs {
from(files('../gradle/libs.versions.toml'))
}
}
}
rootProject.name = 'optional-platforms'
include ':grpc'
project(':grpc').projectDir = file('../grpc')
include ':grpc-advanced'
project(':grpc-advanced').projectDir = file('../grpc-advanced')
include ':grpc:grpc-admin'
project(':grpc:grpc-admin').projectDir = file('../grpc/grpc-admin')
include ':grpc:grpc-client'
project(':grpc:grpc-client').projectDir = file('../grpc/grpc-client')
include ':grpc:grpc-codegen'
project(':grpc:grpc-codegen').projectDir = file('../grpc/grpc-codegen')
include ':grpc:grpc-core-api'
project(':grpc:grpc-core-api').projectDir = file('../grpc/grpc-core-api')
include ':grpc:grpc-discovery'
project(':grpc:grpc-discovery').projectDir = file('../grpc/grpc-discovery')
include ':grpc:grpc-observability'
project(':grpc:grpc-observability').projectDir = file('../grpc/grpc-observability')
include ':grpc:grpc-operation-ledger-jpa'
project(':grpc:grpc-operation-ledger-jpa').projectDir = file('../grpc/grpc-operation-ledger-jpa')
include ':grpc:grpc-policy'
project(':grpc:grpc-policy').projectDir = file('../grpc/grpc-policy')
include ':grpc:grpc-proto-contract'
project(':grpc:grpc-proto-contract').projectDir = file('../grpc/grpc-proto-contract')
include ':grpc:grpc-server'
project(':grpc:grpc-server').projectDir = file('../grpc/grpc-server')
include ':grpc:grpc-spring-boot-starter'
project(':grpc:grpc-spring-boot-starter').projectDir = file('../grpc/grpc-spring-boot-starter')
include ':grpc:grpc-testkit'
project(':grpc:grpc-testkit').projectDir = file('../grpc/grpc-testkit')
include ':grpc-advanced:grpc-advanced-bootstrap'
project(':grpc-advanced:grpc-advanced-bootstrap').projectDir = file('../grpc-advanced/grpc-advanced-bootstrap')
include ':grpc-advanced:grpc-advanced-compat'
project(':grpc-advanced:grpc-advanced-compat').projectDir = file('../grpc-advanced/grpc-advanced-compat')
include ':grpc-advanced:grpc-advanced-diagnostics'
project(':grpc-advanced:grpc-advanced-diagnostics').projectDir = file('../grpc-advanced/grpc-advanced-diagnostics')
include ':grpc-advanced:grpc-advanced-edition'
project(':grpc-advanced:grpc-advanced-edition').projectDir = file('../grpc-advanced/grpc-advanced-edition')
include ':grpc-advanced:grpc-advanced-resilience'
project(':grpc-advanced:grpc-advanced-resilience').projectDir = file('../grpc-advanced/grpc-advanced-resilience')
include ':grpc-advanced:grpc-advanced-streaming'
project(':grpc-advanced:grpc-advanced-streaming').projectDir = file('../grpc-advanced/grpc-advanced-streaming')