ci(release): needs 대기 원인과 공개 경로·mainCheck 설명을 지금 동작에 맞춘다 #29
@@ -344,9 +344,10 @@ jobs:
|
||||
# run (63), and on every push, where the nightly jobs it waited for are skipped (79). A throwaway
|
||||
# workflow started by hand reproduced it with nothing else in it (2026-11-11, three variants):
|
||||
# every job with both `needs` and `if` stayed Blocked, whatever the `if` said and whether or not
|
||||
# the jobs it needed had passed. A job without `needs` is queued when the run starts, and the one
|
||||
# runner (capacity 1) takes a run's jobs in the order they were created, which is their order in
|
||||
# this file. A second runner would let this job overlap the others; it would still run.
|
||||
# the jobs it needed had passed. A job without `needs` is runnable when the run starts, and the one
|
||||
# runner (capacity 1) takes the job that became runnable first, so a run's jobs go in the order they
|
||||
# were created, which is their order in this file. A second runner would let this job overlap the
|
||||
# others; it would still run.
|
||||
performance:
|
||||
if: ${{ github.event_name != 'push' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -142,6 +142,16 @@ jobs:
|
||||
|
||||
# Build, inventory and scan the image; on a tag also push it. It waits on every evidence job:
|
||||
# `needs` does not reach across workflows, so a gate in another file could still be running.
|
||||
#
|
||||
# What `needs` costs on this runner. Gitea gives the runner the job that became runnable first,
|
||||
# across every repository the runner serves. A job without `needs` is runnable when its run is
|
||||
# created; this one only when the last gate finishes, so it waits behind every job created before
|
||||
# that moment, other repositories' jobs included. Manual run 157 (2026-11-12): the gates finished at
|
||||
# 17:50 UTC and this job started at 20:52, after four frontend pull-request runs created between
|
||||
# 17:03 and 17:47; app-image-signing waited two hours more the same way. Their job time is what a
|
||||
# release costs; the wait is the queue's. On an idle runner the wait is zero, so cut a release tag
|
||||
# when no other run is queued. Kept as it is: without `needs` an image could be published before a
|
||||
# gate failed, and folding the signing into this job would put the key in a job that builds.
|
||||
app-image-release:
|
||||
needs:
|
||||
- release
|
||||
|
||||
@@ -14,7 +14,7 @@ registry, settings, build-logic, 루트 라이프사이클이 정하는 것을
|
||||
- 테스트가 저장소 파일을 읽으면 그 파일을 그 leaf의 test task `inputs`로 선언한다.
|
||||
- 저장소 문서와 대조하는 테스트는 `mainStage()` 레인(`document-contract` 태그)으로 leaf `mainCheck`에서 돈다.
|
||||
- 문서가 아닌 저장소 파일(빌드 스크립트, workflow, Compose, 다른 leaf 소스)을 읽어야 merge 전에 막을 수 있는 계약은 그 파일만 입력으로 둔 별도 레인(app-bootstrap `repository-contract`)에 둔다.
|
||||
- 저장소 루트(`ca.repository.root`)는 이 두 레인에만 준다. 그래서 태그 없이 저장소를 읽는 테스트는 `test`에서 실패한다.
|
||||
- 저장소 루트(`ca.repository.root`)는 `document-contract`·`repository-contract` 태그 레인에만, 그 leaf의 `build.gradle`이 레인 선언의 `systemProperty`로 준다. convention은 주지 않는다. 그래서 태그 없이 저장소를 읽는 테스트는 `test`에서 실패한다.
|
||||
- 문서를 파싱해 대조하는 Gradle 검사는 두지 않는다. 문서 검사는 Gradle 밖 `scripts/check-docs.py`·`scripts/check-work-docs.py`다.
|
||||
|
||||
## lane 캐시와 성능 lane
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.gradle.api.tasks.bundling.AbstractArchiveTask;
|
||||
import org.gradle.api.tasks.bundling.Jar;
|
||||
import org.gradle.api.tasks.compile.JavaCompile;
|
||||
import org.gradle.api.tasks.testing.Test;
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat;
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion;
|
||||
import org.gradle.testing.base.TestingExtension;
|
||||
|
||||
@@ -270,6 +271,11 @@ public final class JavaConventionsPlugin implements Plugin<Project> {
|
||||
//
|
||||
// The container images the lanes start come from gradle/container-images.properties,
|
||||
// each as `ca.test.image.<key>`, with the file as an input (review 2026-11-01 08-04).
|
||||
//
|
||||
// A failing test prints its message and cause chain, not only the exception type and line
|
||||
// (Gradle's default). The Gitea runner keeps no test report, so the job log is all there is:
|
||||
// main push run 221 (2026-11-13) failed a gRPC deadline test with only
|
||||
// "AssertionFailedError at GrpcP1BoundaryWireTest.java:276" to show for it.
|
||||
File images = containerImageCatalog(project);
|
||||
Map<String, String> containerImages = containerImages(images);
|
||||
project.getExtensions().getExtraProperties().set("testContainerImages", containerImages);
|
||||
@@ -279,6 +285,7 @@ public final class JavaConventionsPlugin implements Plugin<Project> {
|
||||
.configureEach(
|
||||
test -> {
|
||||
test.systemProperty("user.timezone", "UTC");
|
||||
test.getTestLogging().setExceptionFormat(TestExceptionFormat.FULL);
|
||||
containerImages.forEach(
|
||||
(key, image) -> test.systemProperty(CONTAINER_IMAGE_PROPERTY_PREFIX + key, image));
|
||||
test.getInputs()
|
||||
|
||||
+21
@@ -42,6 +42,27 @@ class PlatformModuleConventionTest {
|
||||
assertTrue(result.getOutput().contains("api-configuration-present=true"), result.getOutput());
|
||||
}
|
||||
|
||||
@Test
|
||||
void everyTestTaskLogsAFailureWithItsMessageAndCauses() throws Exception {
|
||||
// given: `laneFixture` stands for a strict lane, a Test task registered after the convention.
|
||||
buildFile(
|
||||
"""
|
||||
plugins { id 'ca.platform-module' }
|
||||
tasks.register('laneFixture', Test)
|
||||
tasks.register('reportTestLogging') {
|
||||
List<String> formats = tasks.withType(Test).collect { it.name + '=' + it.testLogging.exceptionFormat }.sort()
|
||||
doLast { logger.lifecycle('formats=' + formats) }
|
||||
}
|
||||
""");
|
||||
|
||||
// when
|
||||
BuildResult result = runner("reportTestLogging").build();
|
||||
|
||||
// then
|
||||
assertTrue(
|
||||
result.getOutput().contains("formats=[laneFixture=FULL, test=FULL]"), result.getOutput());
|
||||
}
|
||||
|
||||
@Test
|
||||
void aLeafCarriesTheReleaseVersionAndNamesTheRevisionSeparately() throws Exception {
|
||||
// given
|
||||
|
||||
+6
-4
@@ -57,7 +57,8 @@ tasks.register('verifyDependencyLocks') {
|
||||
}
|
||||
|
||||
// feature-developer-experience-contract D3 — the ordered local bootstrap lifecycle is
|
||||
// scripts/bootstrap-local.sh (compile, Docker preflight, dependency wait, migrate-and-start, smoke).
|
||||
// scripts/bootstrap-local.sh (compile, Docker preflight, dependency wait, start, smoke). Startup
|
||||
// Flyway runs only when the persistence-jpa runtimeOnly line is on; the default composition is web.
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
// Lifecycle.
|
||||
@@ -70,8 +71,9 @@ tasks.register('verifyDependencyLocks') {
|
||||
// prCheck the pull-request stage: ci + dependency locks + the Compose render, the
|
||||
// repository layout and the document checks (scripts outside Gradle)
|
||||
// mainCheck the main-branch stage: environment contract, full-boot qualification,
|
||||
// public-path baseline, transport and messaging qualification lanes, each
|
||||
// leaf's document-contract lanes, and the feature generator round trip
|
||||
// public-path baseline, transport and messaging qualification lanes, the
|
||||
// GraphQL transport-boundary lane (graphqlStableTest), each leaf's
|
||||
// document-contract lanes, and the feature generator round trip
|
||||
// (verifyFeatureScaffold)
|
||||
// integrationCheck the declared strict integration lanes (several need a container runtime)
|
||||
// performanceCheck the declared strict performance lanes (load, shutdown, pool and resource
|
||||
@@ -273,7 +275,7 @@ strictLaneStages {
|
||||
// `-PapprovePublicPathChange` rewrites the baseline after review.
|
||||
tasks.register('verifyPublicPathSnapshot') {
|
||||
group = 'verification'
|
||||
description = 'Fails when the shipped public path default drifts from docs/security/public-paths-snapshot.txt.'
|
||||
description = 'Fails when the public path surface (default, profile overrides, filter-chain permitAll and securityMatcher statements) drifts from docs/security/public-paths-snapshot.txt.'
|
||||
dependsOn ':app-bootstrap:publicPathSnapshotTest'
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +40,12 @@ workflow에만 있는 job: `pr.yml` `done`의 마지막 step과 `main.yml`의 `v
|
||||
| `python3 scripts/check-repo-layout.py` | 저장소 루트와 `src/` 최상위에 허용 목록 밖의 항목이 없는가, registry 경로가 허용 폴더 안인가. 아무도 가리키지 않는 compose·스크립트 파일은 경고 | PR(`prCheck` 안) | `verifyRepositoryLayout` |
|
||||
| `python3 scripts/check-work-docs.py` | 작업 지침(루트 `AGENTS.md`·`CLAUDE.md`, `docs/work/`, `src/**/AGENTS.md`, `.claude/`)의 분량 상한, 본문 이력 ID 0, playbook 뼈대, 상대 링크 | PR(`prCheck` 안) | `verifyWorkDocs` |
|
||||
| `python3 scripts/check-docs.py` | 살아 있는 문서의 언어, 기록·ADR 머리 블록, 문서의 인라인 코드 경로·Gradle 경로가 지금 있는가, 복사한 숫자, 상대 링크(`docs/README.md` 「문서 검사」) | PR(`prCheck` 안) | `documentCheck` |
|
||||
| `mainCheck` | `configContractCheck` + `qualificationCheck`(`testQualityCheck` 포함) + 공개 경로 스냅숏 + 전송·메시징 qualification lane + 생성 명령 왕복(`verifyFeatureScaffold`) + 모든 leaf의 `mainCheck`(document-contract lane 등) | main | `main.yml` `main`: `./gradlew :integrationCheck :mainCheck --continue` |
|
||||
| `mainCheck` | `configContractCheck` + `qualificationCheck`(`testQualityCheck` 포함) + 공개 경로 스냅숏 + 전송·메시징 qualification lane + GraphQL 전송 경계 lane(`graphqlStableTest`) + 생성 명령 왕복(`verifyFeatureScaffold`) + 모든 leaf의 `mainCheck`(document-contract lane 등) | main | `main.yml` `main`: `./gradlew :integrationCheck :mainCheck --continue` |
|
||||
| `integrationCheck` | 선언된 strict integration lane 전체(실 컨테이너). 입력이 없는 lane은 빼고 이름을 댄다 | main·nightly | `main.yml` `main`: `./gradlew :integrationCheck :mainCheck --continue`(두 단계를 Gradle 한 번에. 한 번 컴파일하고, 직렬 lane이 도는 동안 나머지가 겹친다. integration이 앞이라 lane이 첫 몇 분부터 슬롯을 쓴다) |
|
||||
| `performanceCheck` | 선언된 performance lane 전체(부하·종료·풀·자원 한계, 실 서버와 컨테이너). 상한을 매번 단언한다. 손으로 돌리든 workflow든 같은 상한이다 | nightly(다른 무거운 job 뒤: 파일 맨 끝 job이고 runner 하나가 job을 만든 순서대로 돈다. `needs`는 쓰지 않는다 — Gitea 1.27이 `needs`와 `if`를 함께 가진 job을 Blocked에 둔다) | `main.yml` `performance`. 5절 |
|
||||
| `releaseCheck` | 릴리스 provenance + 공개 경로 스냅숏. 커밋을 `GITHUB_SHA`·`GIT_SHA`·`-PgitRevision=<sha>`로 받고, 없으면 설계대로 실패한다 | 태그 | `release.yml` `release` |
|
||||
| `:app-bootstrap:verifyEnvKeys` | env 키 레지스트리와 profile YAML·`.env.example` | `mainCheck` 안(`configContractCheck`) | build-logic `ca.config-contract` |
|
||||
| `verifyPublicPathSnapshot` | 기본 공개 경로가 `docs/security/public-paths-snapshot.txt`와 같은가 | `mainCheck`·`releaseCheck` 안 | `build.gradle` |
|
||||
| `verifyPublicPathSnapshot` | 공개 경로 표면(기본값, profile 덮어쓰기, 운영 코드 filter chain의 `permitAll`·`securityMatcher` 문장)이 `docs/security/public-paths-snapshot.txt`와 같은가 | `mainCheck`·`releaseCheck` 안 | `build.gradle` |
|
||||
| `verifyDependencyLocks` | lockfile | PR(`prCheck` 안) | `build.gradle` |
|
||||
| `:app-bootstrap:documentContractTest` | 문서와 코드를 대조하는 lane(태그 `document-contract`) | main(`mainCheck` 안) | `src/bootstrap/app/build.gradle` |
|
||||
| `:app-bootstrap:repositoryContractTest` | 빌드 스크립트·workflow·compose를 읽는 계약(태그 `repository-contract`) | PR | `src/bootstrap/app/build.gradle` |
|
||||
|
||||
+1
@@ -273,6 +273,7 @@ class GrpcP1BoundaryWireTest {
|
||||
|
||||
// then
|
||||
assertThat(Status.fromThrowable(failure).getCode())
|
||||
.as("status of %s", failure)
|
||||
.isEqualTo(Status.Code.DEADLINE_EXCEEDED);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ springBoot {
|
||||
strictTestLanes {
|
||||
lane('publicPathSnapshotTest') {
|
||||
tag = 'public-path-snapshot'
|
||||
description = 'Compares the shipped public path default with the reviewed baseline.'
|
||||
description = 'Compares the public path surface (default, profile overrides, filter-chain permit statements) with the reviewed baseline.'
|
||||
rejectSkipped = true
|
||||
mainStage()
|
||||
systemProperty 'publicpath.snapshot.write', project.hasProperty('approvePublicPathChange') ? 'true' : 'false'
|
||||
|
||||
Reference in New Issue
Block a user