Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e880c7563 | ||
|
|
ed8baf3a91 | ||
|
|
f88f180ab6 | ||
|
|
a892a45073 | ||
|
|
97f7381aae | ||
|
|
732cb26eb5 | ||
|
|
5e0c89dab4 | ||
|
|
7757f1e834 | ||
|
|
eed2d152a5 | ||
|
|
d9d1cfb55a | ||
|
|
c8f87215a1 | ||
|
|
bbe49accf8 |
@@ -0,0 +1,29 @@
|
||||
# Checks the release signing secrets without cutting a tag (docs/work/release.md 5절). Manual only:
|
||||
# run it after the owner puts SIGNING_KEY or SIGNING_PASSWORD in, and before tagging. It prints shapes
|
||||
# and verdicts, never the secrets (scripts/release/check-signing-key.sh).
|
||||
name: signing-check
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
signing-check:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: https://github.com/actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "21.0.11+10.0.LTS"
|
||||
- uses: https://github.com/gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6
|
||||
with:
|
||||
build-scan-publish: false
|
||||
cache-read-only: true
|
||||
- run: ./gradlew verifySigningKey --stacktrace
|
||||
env:
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
|
||||
@@ -1,6 +1,6 @@
|
||||
# AGENTS.md — grpc-library의 정본
|
||||
|
||||
Spring Boot 앱에 gRPC 서버·클라이언트를 붙이는 플랫폼 라이브러리다(Maven group `com.hyeonworks.grpc`). 백엔드 템플릿에서 2026-11-08에 이력째 옮겨 왔다. 왜 따로 두는지와 받는 법은 `README.md`, 풀 문제는 `docs/problem-statement.md`다.
|
||||
Spring Boot 앱에 gRPC 서버·클라이언트를 붙이는 플랫폼 라이브러리다(Maven group `dev.cakit.grpc`). 백엔드 템플릿에서 2026-11-08에 이력째 옮겨 왔다. 왜 따로 두는지와 받는 법은 `README.md`, 풀 문제는 `docs/problem-statement.md`다.
|
||||
|
||||
## 꼭 지킬 것 — 하나라도 어기면 동작해도 완료가 아니다
|
||||
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
|
||||
템플릿 안 코드를 직접 썼다면(템플릿 기준 커밋 `22df3525` 이전):
|
||||
|
||||
- Java 패키지: `dev.caskeleton.grpc.*` → `com.hyeonworks.grpc.*`. import를 바꾼다.
|
||||
- proto 패키지: `caskeleton.grpc.common.v1` → `hyeonworks.grpc.common.v1`, 생성 Java 패키지 `caskeleton.grpc.common.v1.generated` → `hyeonworks.grpc.common.v1.generated`. proto는 wire 이름이므로 상대편도 함께 바꾼다.
|
||||
- Gradle: `project(':grpc:<모듈>')` → `com.hyeonworks.grpc:<모듈>:1.0.0`(저장소 선언은 README 「받는 법」).
|
||||
- Java 패키지: `dev.caskeleton.grpc.*` → `dev.cakit.grpc.*`. import를 바꾼다. 템플릿 재사용 체크리스트의 `dev.caskeleton` 일괄 바꾸기와 겹치지 않게 다른 이름을 쓴다.
|
||||
- proto 패키지: `caskeleton.grpc.common.v1` → `cakit.grpc.common.v1`, 생성 Java 패키지 `caskeleton.grpc.common.v1.generated` → `cakit.grpc.common.v1.generated`. proto는 wire 이름이므로 상대편도 함께 바꾼다.
|
||||
- Gradle: `project(':grpc:<모듈>')` → `dev.cakit.grpc:<모듈>:1.0.0`(저장소 선언은 README 「받는 법」).
|
||||
- 설정 키 `app.grpc.platform.*`와 Flyway 위치 `db/migration/grpc`는 그대로다.
|
||||
|
||||
@@ -12,7 +12,7 @@ Spring Boot 앱에 gRPC 서버·클라이언트를 붙이는 플랫폼 라이브
|
||||
|
||||
## 받는 법
|
||||
|
||||
Maven group은 `com.hyeonworks.grpc`, artifact는 모듈 이름 그대로다(`grpc-core-api`, `grpc-runtime`, `grpc-spring-boot-starter`, …). 저장소는 소유자 Gitea Packages이고, 공개라 읽을 때 토큰이 필요 없다.
|
||||
Maven group은 `dev.cakit.grpc`, artifact는 모듈 이름 그대로다(`grpc-core-api`, `grpc-runtime`, `grpc-spring-boot-starter`, …). 저장소는 소유자 Gitea Packages이고, 공개라 읽을 때 토큰이 필요 없다.
|
||||
|
||||
```groovy
|
||||
// settings.gradle
|
||||
@@ -22,7 +22,7 @@ dependencyResolutionManagement {
|
||||
forRepository {
|
||||
maven { url = 'https://git.learn.hyeonworks.com/api/packages/donghyeon.kang/maven' }
|
||||
}
|
||||
filter { includeGroupByRegex 'com\\.hyeonworks(\\..*)?' }
|
||||
filter { includeGroupByRegex 'dev\\.cakit(\\..*)?' }
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
@@ -32,11 +32,11 @@ dependencyResolutionManagement {
|
||||
```groovy
|
||||
// build.gradle
|
||||
dependencies {
|
||||
implementation 'com.hyeonworks.grpc:grpc-spring-boot-starter:1.0.0'
|
||||
implementation 'dev.cakit.grpc:grpc-spring-boot-starter:1.0.0'
|
||||
}
|
||||
```
|
||||
|
||||
`exclusiveContent`는 `com.hyeonworks` group을 이 저장소에서만, 나머지는 Maven Central에서만 찾게 한다. 같은 이름을 공개 저장소에 올리는 공격이 통하지 않고, Gitea가 느려도 다른 의존성 해석에는 영향이 없다.
|
||||
`exclusiveContent`는 `dev.cakit` group을 이 저장소에서만, 나머지는 Maven Central에서만 찾게 한다. 같은 이름을 공개 저장소에 올리는 공격이 통하지 않고, Gitea가 느려도 다른 의존성 해석에는 영향이 없다.
|
||||
|
||||
## 지원 표
|
||||
|
||||
|
||||
+8
-2
@@ -13,6 +13,7 @@ import org.gradle.api.publish.PublishingExtension;
|
||||
import org.gradle.api.publish.maven.MavenPublication;
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository;
|
||||
import org.gradle.authentication.http.HttpHeaderAuthentication;
|
||||
import org.gradle.plugins.signing.Sign;
|
||||
import org.gradle.plugins.signing.SigningExtension;
|
||||
|
||||
/**
|
||||
@@ -36,7 +37,8 @@ import org.gradle.plugins.signing.SigningExtension;
|
||||
* the versions its own resolution chose ({@code versionMapping}), and the plugin's POM
|
||||
* customization, which would add the BOM imports a consumer never inherits, is off.
|
||||
*
|
||||
* <p>Signing: with {@code SIGNING_KEY} (an ASCII-armoured PGP secret key) and {@code
|
||||
* <p>Signing: with {@code SIGNING_KEY} (an ASCII-armoured PGP secret key, or the base64 of one;
|
||||
* {@link SigningKeys}) and {@code
|
||||
* SIGNING_PASSWORD} in the environment, every published file gets an {@code .asc}. Without them
|
||||
* nothing is signed, and a task that uploads to {@code gitea} fails before it starts: an unsigned
|
||||
* release is not a release.
|
||||
@@ -137,7 +139,8 @@ public final class LibraryPublishingPlugin implements Plugin<Project> {
|
||||
.dir("staging-repository"));
|
||||
});
|
||||
|
||||
String signingKey = project.getProviders().environmentVariable("SIGNING_KEY").getOrElse("");
|
||||
String signingKey =
|
||||
SigningKeys.armoured(project.getProviders().environmentVariable("SIGNING_KEY").getOrElse(""));
|
||||
String signingPassword =
|
||||
project.getProviders().environmentVariable("SIGNING_PASSWORD").getOrElse("");
|
||||
boolean signed = !signingKey.isBlank();
|
||||
@@ -145,6 +148,9 @@ public final class LibraryPublishingPlugin implements Plugin<Project> {
|
||||
SigningExtension signing = project.getExtensions().getByType(SigningExtension.class);
|
||||
signing.useInMemoryPgpKeys(signingKey, signingPassword);
|
||||
signing.sign(publication);
|
||||
// The root's verifySigningKey says what is wrong with a key before Gradle's signing reports
|
||||
// it only as "Could not read PGP secret key".
|
||||
project.getTasks().withType(Sign.class).configureEach(task -> task.mustRunAfter(":verifySigningKey"));
|
||||
}
|
||||
|
||||
// Nothing leaves the machine before the release checks have passed, and nothing reaches Gitea
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package dev.caskeleton.buildlogic.publishing;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* The ASCII-armoured key Gradle's in-memory signatory reads, from what a CI secret holds.
|
||||
*
|
||||
* <p>A secret store keeps a multi-line value badly or not at all, so the common practice is to put
|
||||
* the armoured key file in base64 on one line ({@code base64 -w0 signing-key.asc}). Gradle's {@code
|
||||
* useInMemoryPgpKeys} reads only the armoured text and reports the base64 form as "Could not read
|
||||
* PGP secret key" (v1.0.0 release run 9 and the secret put in after it). Both forms are accepted:
|
||||
* a value that decodes to an armoured private key block is unwrapped, anything else is passed on
|
||||
* unchanged, so a wrong value still fails, and {@code verifySigningKey} says why.
|
||||
*/
|
||||
public final class SigningKeys {
|
||||
private static final String BEGIN = "-----BEGIN PGP PRIVATE KEY BLOCK-----";
|
||||
|
||||
private SigningKeys() {}
|
||||
|
||||
/**
|
||||
* The armoured key: {@code value} itself, or the armoured block it is the base64 of.
|
||||
*
|
||||
* @param value the secret as given (armoured, base64 of the armoured file, or anything else)
|
||||
* @return the armoured key, or {@code value} unchanged when it is neither form
|
||||
*/
|
||||
public static String armoured(String value) {
|
||||
if (value == null || value.isBlank() || value.contains(BEGIN)) {
|
||||
return value;
|
||||
}
|
||||
String compact = value.replaceAll("\\s", "");
|
||||
if (!compact.matches("[A-Za-z0-9+/]+={0,2}")) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
String decoded = new String(Base64.getDecoder().decode(compact), StandardCharsets.UTF_8);
|
||||
return decoded.strip().startsWith(BEGIN) ? decoded : value;
|
||||
} catch (IllegalArgumentException notBase64) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package dev.caskeleton.buildlogic.publishing;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SigningKeysTest {
|
||||
private static final String ARMOURED =
|
||||
"-----BEGIN PGP PRIVATE KEY BLOCK-----\n\nlQdGBGrv1SYBEADGgq8C\n=abcd\n"
|
||||
+ "-----END PGP PRIVATE KEY BLOCK-----\n";
|
||||
|
||||
@Test
|
||||
@DisplayName("armour 그대로인 키는 바꾸지 않는다")
|
||||
void anArmouredKeyIsUsedAsItIs() {
|
||||
assertThat(SigningKeys.armoured(ARMOURED)).isEqualTo(ARMOURED);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("armour 파일을 base64로 감싼 값은 풀어서 armour로 쓴다")
|
||||
void aBase64WrappedArmouredKeyIsUnwrapped() {
|
||||
String wrapped = Base64.getEncoder().encodeToString(ARMOURED.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
assertThat(SigningKeys.armoured(wrapped)).isEqualTo(ARMOURED);
|
||||
assertThat(SigningKeys.armoured(wrapped.substring(0, 40) + "\n" + wrapped.substring(40)))
|
||||
.isEqualTo(ARMOURED);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("지문이나 armour가 아닌 base64는 그대로 두어 서명이 원래 오류로 실패하게 한다")
|
||||
void anythingElseIsLeftAlone() {
|
||||
String fingerprint = "92646CEAFE816CF8B9C249F0A1C936D7F791F8AB";
|
||||
String otherBase64 = Base64.getEncoder().encodeToString("not a key".getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
assertThat(SigningKeys.armoured(fingerprint)).isEqualTo(fingerprint);
|
||||
assertThat(SigningKeys.armoured(otherBase64)).isEqualTo(otherBase64);
|
||||
assertThat(SigningKeys.armoured("")).isEmpty();
|
||||
}
|
||||
}
|
||||
+46
-1
@@ -1,4 +1,5 @@
|
||||
import dev.caskeleton.buildlogic.java.JavaConventionsPlugin
|
||||
import dev.caskeleton.buildlogic.publishing.SigningKeys
|
||||
|
||||
plugins {
|
||||
id 'ca.architecture'
|
||||
@@ -190,7 +191,47 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
def signingKey = providers.environmentVariable('SIGNING_KEY').getOrElse('')
|
||||
// The armoured key, or the base64 of the armoured file (the usual way to keep it in a CI secret).
|
||||
def signingKey = SigningKeys.armoured(providers.environmentVariable('SIGNING_KEY').getOrElse(''))
|
||||
|
||||
// Before anything is signed: the secret's shape, that gpg imports it as the release key and that
|
||||
// SIGNING_PASSWORD signs with it, printing no part of either. Gradle's signing reports every one of
|
||||
// these as "Could not read PGP secret key" (v1.0.0 release run 9); this says which. A key other
|
||||
// than the release key passes with -PsigningKeyFingerprint=<its fingerprint> (a rehearsal key).
|
||||
// gpg reads only a passphrase's first line and Gradle the whole value, so the task then signs a few
|
||||
// bytes with Gradle's own signatory: the verdict is the one the Sign tasks would reach.
|
||||
tasks.register('verifySigningKey', Exec) {
|
||||
group = 'verification'
|
||||
description = 'Checks SIGNING_KEY and SIGNING_PASSWORD without printing them (scripts/release/check-signing-key.sh).'
|
||||
outputs.upToDateWhen { false }
|
||||
ignoreExitValue = true
|
||||
commandLine 'bash', file('scripts/release/check-signing-key.sh'),
|
||||
providers.gradleProperty('signingKeyFingerprint').getOrElse('')
|
||||
def signed = !signingKey.isBlank()
|
||||
doLast {
|
||||
boolean scriptPassed = executionResult.get().exitValue == 0
|
||||
boolean gradlePassed = !signed
|
||||
String verdict = 'skipped: no SIGNING_KEY'
|
||||
if (signed) {
|
||||
try {
|
||||
signing.signatory.sign(new ByteArrayInputStream('signing check'.bytes), OutputStream.nullOutputStream())
|
||||
gradlePassed = true
|
||||
verdict = 'ok'
|
||||
} catch (Exception failure) {
|
||||
// Exception text only: BouncyCastle names what failed (checksum mismatch, a tag), never the key.
|
||||
def cause = failure.cause ? " (${failure.cause.class.simpleName}: ${failure.cause.message})" : ''
|
||||
verdict = "failed: ${failure.message}${cause}"
|
||||
}
|
||||
}
|
||||
logger.lifecycle("signing as Gradle's Sign tasks do (in-memory key): ${verdict}")
|
||||
if (!scriptPassed || !gradlePassed) {
|
||||
throw new GradleException('verifySigningKey: the signing secrets would not sign; the PROBLEM lines above say why.')
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.withType(Sign).configureEach {
|
||||
mustRunAfter tasks.named('verifySigningKey')
|
||||
}
|
||||
if (!signingKey.isBlank()) {
|
||||
signing {
|
||||
useInMemoryPgpKeys(signingKey, providers.environmentVariable('SIGNING_PASSWORD').getOrElse(''))
|
||||
@@ -220,6 +261,9 @@ tasks.register('releaseRehearsal') {
|
||||
group = 'release'
|
||||
description = 'releaseCheck, then publishes every module and the SBOM to build/staging-repository and checks the files.'
|
||||
dependsOn tasks.named('releaseCheck')
|
||||
if (!signingKey.isBlank()) {
|
||||
dependsOn tasks.named('verifySigningKey')
|
||||
}
|
||||
dependsOn tasks.named('publishAllPublicationsToStagingRepository')
|
||||
dependsOn leafPaths.collect { "${it}:publishAllPublicationsToStagingRepository" }
|
||||
def staging = layout.buildDirectory.dir('staging-repository')
|
||||
@@ -244,6 +288,7 @@ tasks.register('release') {
|
||||
group = 'release'
|
||||
description = 'releaseCheck, publish to Gitea Packages, then verify the version is readable anonymously.'
|
||||
dependsOn tasks.named('releaseCheck')
|
||||
dependsOn tasks.named('verifySigningKey')
|
||||
dependsOn tasks.named('publishAllPublicationsToGiteaRepository')
|
||||
dependsOn leafPaths.collect { "${it}:publishAllPublicationsToGiteaRepository" }
|
||||
def url = providers.gradleProperty('packagesUrl')
|
||||
|
||||
+10
-15
@@ -78,17 +78,12 @@
|
||||
<!-- CT_CONSTRUCTOR_THROW (finalizer attack: a subclass's finalize() keeps a half-built object).
|
||||
A final class cannot be attacked this way, and every class that could be made final was.
|
||||
These three groups must stay subclassable. -->
|
||||
<!-- CT group 1 — CGLIB proxies. @RequiresPermission is enforced by a method-security advisor,
|
||||
and Spring Boot proxies with CGLIB, which subclasses the bean
|
||||
(RequiresPermissionProxyabilityTest fails the build if such a class is final). The
|
||||
Annotation matcher covers every class annotated at class level, including ones added
|
||||
later. A class that annotates only some methods is proxied all the same but is not matched
|
||||
here; name it when one appears. A @Configuration class is CGLIB-subclassed for its @Bean
|
||||
methods for the same reason. -->
|
||||
<!-- CT group 1 — CGLIB proxies. A @Configuration class is CGLIB-subclassed for its @Bean
|
||||
methods, so it must stay subclassable. (The template's copy also names its
|
||||
@RequiresPermission beans here; this library has none.) -->
|
||||
<Match>
|
||||
<Bug pattern="CT_CONSTRUCTOR_THROW" />
|
||||
<Or>
|
||||
<Annotation name="com.hyeonworks.application.security.RequiresPermission" />
|
||||
<Annotation name="org.springframework.context.annotation.Configuration" />
|
||||
</Or>
|
||||
</Match>
|
||||
@@ -100,7 +95,7 @@
|
||||
<Match>
|
||||
<Bug pattern="CT_CONSTRUCTOR_THROW" />
|
||||
<Or>
|
||||
<Class name="com.hyeonworks.grpc.api.error.GrpcPlatformException" />
|
||||
<Class name="dev.cakit.grpc.api.error.GrpcPlatformException" />
|
||||
</Or>
|
||||
</Match>
|
||||
<!-- FindSecBugs REDOS, one Match per constructor or static initialiser. Every pattern flagged
|
||||
@@ -114,11 +109,11 @@
|
||||
<Bug pattern="REDOS" />
|
||||
<Or>
|
||||
<And>
|
||||
<Class name="com.hyeonworks.grpc.core.GrpcChannelProfileName" />
|
||||
<Class name="dev.cakit.grpc.core.GrpcChannelProfileName" />
|
||||
<Method name="<clinit>" />
|
||||
</And>
|
||||
<And>
|
||||
<Class name="com.hyeonworks.grpc.core.GrpcServiceName" />
|
||||
<Class name="dev.cakit.grpc.core.GrpcServiceName" />
|
||||
<Method name="<clinit>" />
|
||||
</And>
|
||||
</Or>
|
||||
@@ -134,11 +129,11 @@
|
||||
<Bug pattern="REDOS" />
|
||||
<Or>
|
||||
<And>
|
||||
<Class name="com.hyeonworks.grpc.api.context.GrpcMetadataKey" />
|
||||
<Class name="dev.cakit.grpc.api.context.GrpcMetadataKey" />
|
||||
<Method name="<clinit>" />
|
||||
</And>
|
||||
<And>
|
||||
<Class name="com.hyeonworks.grpc.advanced.discovery.GrpcResolverSafetyPolicy" />
|
||||
<Class name="dev.cakit.grpc.advanced.discovery.GrpcResolverSafetyPolicy" />
|
||||
<Method name="<clinit>" />
|
||||
</And>
|
||||
</Or>
|
||||
@@ -157,7 +152,7 @@
|
||||
<Bug pattern="UNSAFE_HASH_EQUALS" />
|
||||
<Or>
|
||||
<And>
|
||||
<Class name="com.hyeonworks.grpc.admin.GrpcPlatformSnapshotService" />
|
||||
<Class name="dev.cakit.grpc.admin.GrpcPlatformSnapshotService" />
|
||||
<Method name="~lambda\$driftAgainstRelease\$\d+" />
|
||||
</And>
|
||||
</Or>
|
||||
@@ -169,7 +164,7 @@
|
||||
grpc-testkit, which no production leaf depends on. -->
|
||||
<Match>
|
||||
<Bug pattern="COMMAND_INJECTION" />
|
||||
<Class name="com.hyeonworks.grpc.testkit.netty.GrpcTlsTestMaterial" />
|
||||
<Class name="dev.cakit.grpc.testkit.netty.GrpcTlsTestMaterial" />
|
||||
<Method name="runKeytool" />
|
||||
</Match>
|
||||
</FindBugsFilter>
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
## 되돌릴 수 없는 결정
|
||||
|
||||
- 배포한 버전은 지우지 않는다(`docs/work/release.md` 2절). 같은 버전은 다시 올릴 수 없다.
|
||||
- Maven group `com.hyeonworks.grpc`와 proto 패키지 `hyeonworks.grpc.*`. 바꾸면 모든 소비자의 MAJOR다. 근거는 design-docs `repo-structure/05-library-repos.md` 6.3절.
|
||||
- Maven group `dev.cakit.grpc`와 proto 패키지 `cakit.grpc.*`. 바꾸면 모든 소비자의 MAJOR다. 근거는 design-docs `repo-structure/05-library-repos.md` 6.3절.
|
||||
|
||||
+16
-4
@@ -21,12 +21,23 @@ main 병합 ──> 소유자가 태그 vX.Y.Z push ──> .gitea/workflows/rel
|
||||
| --- | --- | --- |
|
||||
| `PACKAGE_TOKEN` | Gitea 개인 토큰. 권한은 `package` 읽기·쓰기만(repository·user 권한 없음). Gitea job 토큰(`GITEA_TOKEN`)은 패키지를 올릴 수 없어서 사람 토큰이 필요하다 | Gitea 웹 → 설정 → 애플리케이션에서 새로 만들어 secret을 덮어쓰고 옛 토큰을 지운다 |
|
||||
| `SIGNING_KEY` | 서명용 PGP 비밀 키(ASCII armor 전체). 두 라이브러리(grpc, messaging)가 같은 키를 쓴다 | 새 키 쌍을 만들고 README 「서명」의 공개 키와 지문을 같은 PR에서 바꾼다. 만료(2028-11-07) 전에 한다 |
|
||||
| `SIGNING_PASSWORD` | 그 키의 암호 | 키와 함께 |
|
||||
| `SIGNING_PASSWORD` | 그 키를 만들 때 정한 암호 한 줄. 키 파일이나 그 base64가 아니다 | 키와 함께 |
|
||||
|
||||
- 이름: 설계(design-docs `repo-structure/05-library-repos.md` 7절)는 `PACKAGES_TOKEN`이라고 적었지만, 등록된 이름 `PACKAGE_TOKEN`에 workflow와 빌드를 맞췄다. 소유자에게 다시 등록을 부탁하지 않는다.
|
||||
- 서명 키: RSA 4096, 지문 `92646CEAFE816CF8B9C249F0A1C936D7F791F8AB`, 2028-11-07 만료. 공개 키는 README 「서명」이다.
|
||||
- 첫 태그는 `v1.0.0`이다(3절).
|
||||
|
||||
**`SIGNING_KEY`에 넣는 것**은 키 지문이나 키 ID(16진수 40·16·8글자)가 아니라 비밀 키 파일 전체다. 파일 그대로(여러 줄)나 그 파일을 base64로 한 줄로 만든 값(`base64 -w0 signing-key.asc`) 둘 다 된다. 빌드가 base64를 풀어 쓴다(`SigningKeys`).
|
||||
|
||||
```bash
|
||||
gpg --armor --export-secret-keys 92646CEAFE816CF8B9C249F0A1C936D7F791F8AB > signing-key.asc
|
||||
```
|
||||
|
||||
1. `signing-key.asc`를 열어 첫 줄 `-----BEGIN PGP PRIVATE KEY BLOCK-----`부터 끝 줄 `-----END PGP PRIVATE KEY BLOCK-----`까지 줄바꿈 그대로 복사한다. RSA 4096 키면 100줄 남짓이다.
|
||||
2. Gitea → 그 repo(grpc-library, messaging-library 둘 다) → 설정 → Actions → Secrets → `SIGNING_KEY`를 고쳐 붙여 넣는다.
|
||||
3. Actions → `signing-check` → Run workflow(main). 로그에 `PROBLEM` 줄이 없고 `gpg import: ok, secret key fingerprint 92646CEA…F791F8AB`, `signing with SIGNING_PASSWORD: ok`가 나오면 된다. 이 workflow는 값을 출력하지 않는다(`scripts/release/check-signing-key.sh`).
|
||||
4. `signing-key.asc`를 지운다(`shred -u signing-key.asc`).
|
||||
|
||||
## 2. 버전 규칙
|
||||
|
||||
- SemVer, repo 하나에 버전 하나. 모든 모듈이 같은 버전으로 나간다. 태그는 `vMAJOR.MINOR.PATCH`이고 접미사(`-rc.1` 등)는 없다. 다른 모양의 태그는 `ca.java-conventions`가 빌드 전에 거부한다.
|
||||
@@ -39,7 +50,7 @@ main 병합 ──> 소유자가 태그 vX.Y.Z push ──> .gitea/workflows/rel
|
||||
|
||||
1. main이 초록인지 본다(main.yml 마지막 실행).
|
||||
2. `CHANGELOG.md`에 그 버전 절을 쓰고 PR로 병합한다.
|
||||
3. 올리기 전까지를 desktop에서 미리 돌려 본다(비밀 값 없이, 4절).
|
||||
3. 올리기 전까지를 desktop에서 미리 돌려 본다(비밀 값 없이, 4절). 비밀 값을 넣거나 바꾼 뒤 첫 태그라면 `signing-check` workflow도 한 번 돌린다(1절).
|
||||
4. 태그를 단다.
|
||||
|
||||
```bash
|
||||
@@ -50,7 +61,7 @@ main 병합 ──> 소유자가 태그 vX.Y.Z push ──> .gitea/workflows/rel
|
||||
git push origin v1.0.0
|
||||
```
|
||||
|
||||
5. release.yml 실행이 초록인지 Gitea Actions 화면에서 본다. 마지막 줄들에 모듈마다 `published: com.hyeonworks.grpc:<모듈>:<버전>`이 찍힌다.
|
||||
5. release.yml 실행이 초록인지 Gitea Actions 화면에서 본다. 마지막 줄들에 모듈마다 `published: dev.cakit.grpc:<모듈>:<버전>`이 찍힌다.
|
||||
6. 템플릿이 이 라이브러리를 쓰게 되면(지금은 쓰지 않는다) 템플릿 PR로 카탈로그 버전을 올린다. 절차는 템플릿 `docs/work/reference/related-repos.md`다.
|
||||
|
||||
## 4. 올리기 직전까지 미리 돌리기
|
||||
@@ -65,7 +76,8 @@ scripts/verify.sh release --on desktop
|
||||
|
||||
| 어디서 | 뜻 | 할 일 |
|
||||
| --- | --- | --- |
|
||||
| 1~4단계 | 아무것도 올라가지 않았다 | 고쳐서 main에 병합하고 같은 태그 이름을 새 커밋에 다시 달지 않는다. 다음 PATCH 태그를 쓴다 |
|
||||
| 1~4단계, 서명 | 아무것도 올라가지 않았다 | 고쳐서 main에 병합한다. 그 버전의 파일이 Packages에 하나도 없으면(`maven-metadata.xml`에 없음) 태그를 지우고 고친 main 커밋에 같은 태그를 다시 단다. 하나라도 올라갔으면 다음 PATCH를 쓴다 |
|
||||
| 서명 직전 `verifySigningKey`, 또는 `Could not read PGP secret key` | 서명 비밀 값이 키로 읽히지 않는다 | `signing-check` workflow의 `PROBLEM` 줄이 원인이다(지문을 넣음, 줄바꿈 잃음, BEGIN·END 줄 빠짐, base64 손상, 다른 키, 암호 칸에 키를 넣음, 틀린 암호). 1절대로 다시 넣는다 |
|
||||
| 5단계 중간 | 일부 모듈만 올라갔을 수 있다 | 그 버전은 버린다(지우지 않는다). 원인을 고치고 다음 PATCH를 낸다. `CHANGELOG.md`에 버린 버전을 적는다 |
|
||||
| 6단계 | 올라갔지만 익명으로 안 읽힌다 | owner 공개 설정을 확인한다. 템플릿 이미지 빌드가 토큰 없이 읽는다는 전제(설계 8.3절 R1)가 깨진 것이다 |
|
||||
|
||||
|
||||
+3
-1
@@ -1,8 +1,10 @@
|
||||
# The Maven group every module publishes under, and where. ca.java-conventions refuses a build
|
||||
# without libraryGroup; ca.library-publishing reads the other two.
|
||||
libraryGroup=com.hyeonworks.grpc
|
||||
libraryGroup=dev.cakit.grpc
|
||||
packagesUrl=https://git.learn.hyeonworks.com/api/packages/donghyeon.kang/maven
|
||||
repositoryUrl=https://git.learn.hyeonworks.com/donghyeon.kang/grpc-library
|
||||
# The release signing key (public fingerprint). verifySigningKey refuses any other key in SIGNING_KEY.
|
||||
signingKeyFingerprint=92646CEAFE816CF8B9C249F0A1C936D7F791F8AB
|
||||
|
||||
# Build defaults, copied from the backend template's src/gradle.properties.
|
||||
org.gradle.workers.max=4
|
||||
|
||||
@@ -43,7 +43,7 @@ property key는 `app.grpc.advanced.<capability>.enabled`이고 전부 기본 off
|
||||
|
||||
## Leaf별 담당 capability
|
||||
|
||||
| leaf | 패키지(`com.hyeonworks.grpc.advanced.*`) | capability |
|
||||
| leaf | 패키지(`dev.cakit.grpc.advanced.*`) | capability |
|
||||
| --- | --- | --- |
|
||||
| `grpc-advanced` | `bootstrap` | capability grade, feature flag, module guard, capability별 promotion gate |
|
||||
| `grpc-advanced` | `edition` | Protobuf Edition 2024 opt-in lane, Edition 2026 watch lane |
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.integration;
|
||||
package dev.cakit.grpc.advanced.integration;
|
||||
|
||||
import com.hyeonworks.grpc.api.context.GrpcMetadataKey;
|
||||
import dev.cakit.grpc.api.context.GrpcMetadataKey;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.integration;
|
||||
package dev.cakit.grpc.advanced.integration;
|
||||
|
||||
import com.hyeonworks.grpc.api.context.GrpcRequestContext;
|
||||
import dev.cakit.grpc.api.context.GrpcRequestContext;
|
||||
import java.util.Map;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.integration;
|
||||
package dev.cakit.grpc.advanced.integration;
|
||||
|
||||
import com.hyeonworks.grpc.api.context.GrpcMetadataKey;
|
||||
import dev.cakit.grpc.api.context.GrpcMetadataKey;
|
||||
import java.util.Map;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
package com.hyeonworks.grpc.advanced.kotlin;
|
||||
package dev.cakit.grpc.advanced.kotlin;
|
||||
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationReason;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationReason;
|
||||
import java.time.Instant;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -45,7 +45,7 @@ public final class GrpcCoroutineContextBridge {
|
||||
throw new IllegalArgumentException("a cancellable operation needs a name");
|
||||
}
|
||||
coordinator.register(
|
||||
new com.hyeonworks.grpc.deadline.GrpcCancellableOperation() {
|
||||
new dev.cakit.grpc.deadline.GrpcCancellableOperation() {
|
||||
@Override
|
||||
public String name() {
|
||||
return operationName;
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
package com.hyeonworks.grpc.advanced.reactor;
|
||||
package dev.cakit.grpc.advanced.reactor;
|
||||
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationReason;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationReason;
|
||||
import java.time.Instant;
|
||||
import java.util.function.Supplier;
|
||||
import reactor.core.Disposable;
|
||||
@@ -46,7 +46,7 @@ public final class GrpcReactorCancellationBridge {
|
||||
throw new IllegalArgumentException("a cancellable operation needs a name");
|
||||
}
|
||||
coordinator.register(
|
||||
new com.hyeonworks.grpc.deadline.GrpcCancellableOperation() {
|
||||
new dev.cakit.grpc.deadline.GrpcCancellableOperation() {
|
||||
@Override
|
||||
public String name() {
|
||||
return operationName;
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.reactor;
|
||||
package dev.cakit.grpc.advanced.reactor;
|
||||
|
||||
import com.hyeonworks.grpc.context.GrpcContextSnapshot;
|
||||
import dev.cakit.grpc.context.GrpcContextSnapshot;
|
||||
import java.util.Optional;
|
||||
import reactor.util.context.Context;
|
||||
import reactor.util.context.ContextView;
|
||||
@@ -16,7 +16,7 @@ import reactor.util.context.ContextView;
|
||||
*/
|
||||
public final class GrpcReactorContextBridge {
|
||||
|
||||
private static final String CONTEXT_KEY = "com.hyeonworks.grpc.contextSnapshot";
|
||||
private static final String CONTEXT_KEY = "dev.cakit.grpc.contextSnapshot";
|
||||
|
||||
private GrpcReactorContextBridge() {}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.reactor;
|
||||
package dev.cakit.grpc.advanced.reactor;
|
||||
|
||||
import com.hyeonworks.grpc.context.GrpcContextSnapshot;
|
||||
import dev.cakit.grpc.context.GrpcContextSnapshot;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
import reactor.core.publisher.Flux;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.hyeonworks.grpc.advanced.reactor;
|
||||
package dev.cakit.grpc.advanced.reactor;
|
||||
|
||||
import com.hyeonworks.grpc.api.context.GrpcRequestContext;
|
||||
import com.hyeonworks.grpc.context.GrpcContextSnapshot;
|
||||
import dev.cakit.grpc.api.context.GrpcRequestContext;
|
||||
import dev.cakit.grpc.context.GrpcContextSnapshot;
|
||||
import java.util.function.BiFunction;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.scheduler.Scheduler;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.web;
|
||||
package dev.cakit.grpc.advanced.web;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.web;
|
||||
package dev.cakit.grpc.advanced.web;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.web;
|
||||
package dev.cakit.grpc.advanced.web;
|
||||
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
|
||||
/**
|
||||
* Which RPC shapes gRPC-Web can actually carry.
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
package com.hyeonworks.grpc.advanced.compat;
|
||||
package dev.cakit.grpc.advanced.compat;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.kotlin.GrpcCoroutineContextBridge;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcCancellationToken;
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationReason;
|
||||
import dev.cakit.grpc.advanced.kotlin.GrpcCoroutineContextBridge;
|
||||
import dev.cakit.grpc.api.deadline.GrpcCancellationToken;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationReason;
|
||||
import java.time.Instant;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
+14
-14
@@ -1,20 +1,20 @@
|
||||
package com.hyeonworks.grpc.advanced.compat;
|
||||
package dev.cakit.grpc.advanced.compat;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.integration.GrpcIntegrationBridgePolicy;
|
||||
import com.hyeonworks.grpc.advanced.integration.GrpcIntegrationInboundGateway;
|
||||
import com.hyeonworks.grpc.advanced.integration.GrpcIntegrationOutboundGateway;
|
||||
import com.hyeonworks.grpc.api.context.GrpcClientIdentity;
|
||||
import com.hyeonworks.grpc.api.context.GrpcMetadataBudget;
|
||||
import com.hyeonworks.grpc.api.context.GrpcMetadataKey;
|
||||
import com.hyeonworks.grpc.api.context.GrpcRequestContext;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcCancellationToken;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcDeadlineBudget;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcDeadlineProfile;
|
||||
import com.hyeonworks.grpc.core.GrpcMethodName;
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.advanced.integration.GrpcIntegrationBridgePolicy;
|
||||
import dev.cakit.grpc.advanced.integration.GrpcIntegrationInboundGateway;
|
||||
import dev.cakit.grpc.advanced.integration.GrpcIntegrationOutboundGateway;
|
||||
import dev.cakit.grpc.api.context.GrpcClientIdentity;
|
||||
import dev.cakit.grpc.api.context.GrpcMetadataBudget;
|
||||
import dev.cakit.grpc.api.context.GrpcMetadataKey;
|
||||
import dev.cakit.grpc.api.context.GrpcRequestContext;
|
||||
import dev.cakit.grpc.api.deadline.GrpcCancellationToken;
|
||||
import dev.cakit.grpc.api.deadline.GrpcDeadlineBudget;
|
||||
import dev.cakit.grpc.api.deadline.GrpcDeadlineProfile;
|
||||
import dev.cakit.grpc.core.GrpcMethodName;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
import java.time.Duration;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -27,7 +27,7 @@ class GrpcIntegrationBridgePolicyTest {
|
||||
|
||||
private static final GrpcMetadataKey CORRELATION = GrpcMetadataKey.ascii("x-correlation-id");
|
||||
private static final GrpcMethodName GET =
|
||||
GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument");
|
||||
GrpcMethodName.parse("cakit.document.v1.DocumentService/GetDocument");
|
||||
|
||||
private static GrpcRequestContext requestContext() {
|
||||
return GrpcRequestContext.create(
|
||||
+15
-15
@@ -1,21 +1,21 @@
|
||||
package com.hyeonworks.grpc.advanced.compat;
|
||||
package dev.cakit.grpc.advanced.compat;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.reactor.GrpcReactorCancellationBridge;
|
||||
import com.hyeonworks.grpc.advanced.reactor.GrpcReactorContextBridge;
|
||||
import com.hyeonworks.grpc.api.context.GrpcClientIdentity;
|
||||
import com.hyeonworks.grpc.api.context.GrpcMetadataBudget;
|
||||
import com.hyeonworks.grpc.api.context.GrpcRequestContext;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcCancellationToken;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcDeadlineBudget;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcDeadlineProfile;
|
||||
import com.hyeonworks.grpc.context.GrpcContextSnapshot;
|
||||
import com.hyeonworks.grpc.core.GrpcMethodName;
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import com.hyeonworks.grpc.deadline.GrpcCancellationReason;
|
||||
import dev.cakit.grpc.advanced.reactor.GrpcReactorCancellationBridge;
|
||||
import dev.cakit.grpc.advanced.reactor.GrpcReactorContextBridge;
|
||||
import dev.cakit.grpc.api.context.GrpcClientIdentity;
|
||||
import dev.cakit.grpc.api.context.GrpcMetadataBudget;
|
||||
import dev.cakit.grpc.api.context.GrpcRequestContext;
|
||||
import dev.cakit.grpc.api.deadline.GrpcCancellationToken;
|
||||
import dev.cakit.grpc.api.deadline.GrpcDeadlineBudget;
|
||||
import dev.cakit.grpc.api.deadline.GrpcDeadlineProfile;
|
||||
import dev.cakit.grpc.context.GrpcContextSnapshot;
|
||||
import dev.cakit.grpc.core.GrpcMethodName;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationCoordinator;
|
||||
import dev.cakit.grpc.deadline.GrpcCancellationReason;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.Map;
|
||||
@@ -28,7 +28,7 @@ import reactor.util.context.Context;
|
||||
class GrpcReactorContextBridgeTest {
|
||||
|
||||
private static final GrpcMethodName GET =
|
||||
GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument");
|
||||
GrpcMethodName.parse("cakit.document.v1.DocumentService/GetDocument");
|
||||
private static final Instant NOW = Instant.parse("2026-08-30T10:00:00Z");
|
||||
|
||||
private static GrpcContextSnapshot snapshot() {
|
||||
+7
-7
@@ -1,14 +1,14 @@
|
||||
package com.hyeonworks.grpc.advanced.compat;
|
||||
package dev.cakit.grpc.advanced.compat;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.web.GrpcWebProfile;
|
||||
import com.hyeonworks.grpc.advanced.web.GrpcWebProxyContract;
|
||||
import com.hyeonworks.grpc.advanced.web.GrpcWebRpcSupport;
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import com.hyeonworks.grpc.error.GrpcErrorMapper;
|
||||
import com.hyeonworks.grpc.validation.GrpcValidationInterceptor;
|
||||
import dev.cakit.grpc.advanced.web.GrpcWebProfile;
|
||||
import dev.cakit.grpc.advanced.web.GrpcWebProxyContract;
|
||||
import dev.cakit.grpc.advanced.web.GrpcWebRpcSupport;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.error.GrpcErrorMapper;
|
||||
import dev.cakit.grpc.validation.GrpcValidationInterceptor;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.bootstrap;
|
||||
package dev.cakit.grpc.advanced.bootstrap;
|
||||
|
||||
/**
|
||||
* Every capability the Stable platform deliberately excludes, and how ready each one is.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.bootstrap;
|
||||
package dev.cakit.grpc.advanced.bootstrap;
|
||||
|
||||
/**
|
||||
* A capability was used without being enabled.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.bootstrap;
|
||||
package dev.cakit.grpc.advanced.bootstrap;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.EnumSet;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.bootstrap;
|
||||
package dev.cakit.grpc.advanced.bootstrap;
|
||||
|
||||
/**
|
||||
* The single gate every advanced capability passes through.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.bootstrap;
|
||||
package dev.cakit.grpc.advanced.bootstrap;
|
||||
|
||||
/**
|
||||
* How much a capability has been established, and what that permits.
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package com.hyeonworks.grpc.advanced.diagnostics;
|
||||
package dev.cakit.grpc.advanced.diagnostics;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.bootstrap.GrpcAdvancedCapability;
|
||||
import com.hyeonworks.grpc.advanced.bootstrap.GrpcAdvancedFeatureFlags;
|
||||
import com.hyeonworks.grpc.advanced.bootstrap.GrpcAdvancedModuleGuard;
|
||||
import dev.cakit.grpc.advanced.bootstrap.GrpcAdvancedCapability;
|
||||
import dev.cakit.grpc.advanced.bootstrap.GrpcAdvancedFeatureFlags;
|
||||
import dev.cakit.grpc.advanced.bootstrap.GrpcAdvancedModuleGuard;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.diagnostics;
|
||||
package dev.cakit.grpc.advanced.diagnostics;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.diagnostics;
|
||||
package dev.cakit.grpc.advanced.diagnostics;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
/**
|
||||
* One endpoint a picker may choose, described only by what routing is allowed to consider.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.discovery;
|
||||
package dev.cakit.grpc.advanced.discovery;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.edition;
|
||||
package dev.cakit.grpc.advanced.edition;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.edition;
|
||||
package dev.cakit.grpc.advanced.edition;
|
||||
|
||||
/**
|
||||
* The four independent things that have to be true before an edition is usable, tracked separately.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.edition;
|
||||
package dev.cakit.grpc.advanced.edition;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.edition;
|
||||
package dev.cakit.grpc.advanced.edition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import com.hyeonworks.grpc.api.policy.GrpcMethodPolicy;
|
||||
import com.hyeonworks.grpc.api.policy.RpcIdempotencyProfile;
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import com.hyeonworks.grpc.resilience.GrpcRetryOwner;
|
||||
import dev.cakit.grpc.api.policy.GrpcMethodPolicy;
|
||||
import dev.cakit.grpc.api.policy.RpcIdempotencyProfile;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.resilience.GrpcRetryOwner;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
/**
|
||||
* One direction of a bidirectional stream, tracked on its own.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
/**
|
||||
* What a bidirectional resume has to carry: both applied positions, and the generation they belong
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
/**
|
||||
* Two sequences, one per direction, never merged.
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import com.hyeonworks.grpc.streaming.GrpcFlowControlPolicy;
|
||||
import dev.cakit.grpc.streaming.GrpcFlowControlPolicy;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Optional;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
/**
|
||||
* One message a client sends, carrying the session and sequence that make it identifiable.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
/**
|
||||
* Where a client stream is in its life.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
/**
|
||||
* Whether more inbound messages may be requested, or more outbound produced.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.xds;
|
||||
package dev.cakit.grpc.advanced.xds;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.advanced.xds;
|
||||
package dev.cakit.grpc.advanced.xds;
|
||||
|
||||
import com.hyeonworks.grpc.resilience.GrpcRetryOwner;
|
||||
import dev.cakit.grpc.resilience.GrpcRetryOwner;
|
||||
import java.net.URI;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.xds;
|
||||
package dev.cakit.grpc.advanced.xds;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.bootstrap;
|
||||
package dev.cakit.grpc.advanced.bootstrap;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package com.hyeonworks.grpc.advanced.diagnostics;
|
||||
package dev.cakit.grpc.advanced.diagnostics;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.bootstrap.GrpcAdvancedCapability;
|
||||
import com.hyeonworks.grpc.advanced.bootstrap.GrpcAdvancedFeatureFlags;
|
||||
import dev.cakit.grpc.advanced.bootstrap.GrpcAdvancedCapability;
|
||||
import dev.cakit.grpc.advanced.bootstrap.GrpcAdvancedFeatureFlags;
|
||||
import java.time.Instant;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.diagnostics;
|
||||
package dev.cakit.grpc.advanced.diagnostics;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.edition;
|
||||
package dev.cakit.grpc.advanced.edition;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
@@ -36,14 +36,14 @@ class GrpcEdition2024PolicyTest {
|
||||
void publicServicesNeedAPromotion() {
|
||||
GrpcEdition2024Policy withoutPromotion =
|
||||
new GrpcEdition2024Policy(
|
||||
Set.of("grpc-advanced"), Set.of("hyeonworks.document.v1.DocumentService"), false);
|
||||
Set.of("grpc-advanced"), Set.of("cakit.document.v1.DocumentService"), false);
|
||||
GrpcEdition2024Policy withPromotion =
|
||||
new GrpcEdition2024Policy(
|
||||
Set.of("grpc-advanced"), Set.of("hyeonworks.document.v1.DocumentService"), true);
|
||||
Set.of("grpc-advanced"), Set.of("cakit.document.v1.DocumentService"), true);
|
||||
|
||||
assertThat(withoutPromotion.serviceMayMove("hyeonworks.document.v1.DocumentService")).isFalse();
|
||||
assertThat(withPromotion.serviceMayMove("hyeonworks.document.v1.DocumentService")).isTrue();
|
||||
assertThat(withoutPromotion.serviceMayMove("hyeonworks.internal.v1.ScratchService")).isTrue();
|
||||
assertThat(withoutPromotion.serviceMayMove("cakit.document.v1.DocumentService")).isFalse();
|
||||
assertThat(withPromotion.serviceMayMove("cakit.document.v1.DocumentService")).isTrue();
|
||||
assertThat(withoutPromotion.serviceMayMove("cakit.internal.v1.ScratchService")).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.edition;
|
||||
package dev.cakit.grpc.advanced.edition;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcDeadlineProfile;
|
||||
import com.hyeonworks.grpc.api.policy.GrpcMethodPolicy;
|
||||
import com.hyeonworks.grpc.api.policy.RpcIdempotencyProfile;
|
||||
import com.hyeonworks.grpc.api.policy.WaitForReadyPolicy;
|
||||
import com.hyeonworks.grpc.core.GrpcMethodName;
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import com.hyeonworks.grpc.resilience.GrpcRetryOwner;
|
||||
import dev.cakit.grpc.api.deadline.GrpcDeadlineProfile;
|
||||
import dev.cakit.grpc.api.policy.GrpcMethodPolicy;
|
||||
import dev.cakit.grpc.api.policy.RpcIdempotencyProfile;
|
||||
import dev.cakit.grpc.api.policy.WaitForReadyPolicy;
|
||||
import dev.cakit.grpc.core.GrpcMethodName;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.resilience.GrpcRetryOwner;
|
||||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test;
|
||||
class GrpcHedgingEligibilityTest {
|
||||
|
||||
private static final GrpcMethodName GET =
|
||||
GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/GetDocument");
|
||||
GrpcMethodName.parse("cakit.document.v1.DocumentService/GetDocument");
|
||||
private static final GrpcMethodName CREATE =
|
||||
GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/CreateDocument");
|
||||
GrpcMethodName.parse("cakit.document.v1.DocumentService/CreateDocument");
|
||||
private static final GrpcMethodName WATCH =
|
||||
GrpcMethodName.parse("hyeonworks.document.v1.DocumentService/WatchDocuments");
|
||||
GrpcMethodName.parse("cakit.document.v1.DocumentService/WatchDocuments");
|
||||
private static final GrpcDeadlineProfile TWO_SECONDS =
|
||||
GrpcDeadlineProfile.of(Duration.ofSeconds(2));
|
||||
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcEndpointCandidate;
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcLoadBalancerDecision;
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcLoadBalancerPicker;
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcLoadBalancerSafetyPolicy;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcEndpointCandidate;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcLoadBalancerDecision;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcLoadBalancerPicker;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcLoadBalancerSafetyPolicy;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import static org.assertj.core.api.Assertions.catchThrowable;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcCustomResolver;
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcEndpointSnapshot;
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcResolverSafetyPolicy;
|
||||
import com.hyeonworks.grpc.advanced.discovery.GrpcResolverUpdate;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcCustomResolver;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcEndpointSnapshot;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcResolverSafetyPolicy;
|
||||
import dev.cakit.grpc.advanced.discovery.GrpcResolverUpdate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
package com.hyeonworks.grpc.advanced.resilience;
|
||||
package dev.cakit.grpc.advanced.resilience;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.advanced.xds.GrpcXdsFailurePolicy;
|
||||
import com.hyeonworks.grpc.advanced.xds.GrpcXdsProfile;
|
||||
import com.hyeonworks.grpc.advanced.xds.GrpcXdsResourceSnapshot;
|
||||
import com.hyeonworks.grpc.resilience.GrpcRetryOwner;
|
||||
import dev.cakit.grpc.advanced.xds.GrpcXdsFailurePolicy;
|
||||
import dev.cakit.grpc.advanced.xds.GrpcXdsProfile;
|
||||
import dev.cakit.grpc.advanced.xds.GrpcXdsResourceSnapshot;
|
||||
import dev.cakit.grpc.resilience.GrpcRetryOwner;
|
||||
import java.net.URI;
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
@@ -30,7 +30,7 @@ class GrpcXdsProfileTest {
|
||||
@Test
|
||||
@DisplayName("an xDS profile requires an xds target, a namespace, mesh retries and mTLS")
|
||||
void anXdsProfileRequiresItsFourConditions() {
|
||||
assertThat(profile("hyeonworks/documents").target().getScheme()).isEqualTo("xds");
|
||||
assertThat(profile("cakit/documents").target().getScheme()).isEqualTo("xds");
|
||||
assertThatThrownBy(
|
||||
() ->
|
||||
new GrpcXdsProfile(
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
import com.hyeonworks.grpc.streaming.GrpcFlowControlPolicy;
|
||||
import com.hyeonworks.grpc.streaming.GrpcSlowConsumerPolicy;
|
||||
import dev.cakit.grpc.streaming.GrpcFlowControlPolicy;
|
||||
import dev.cakit.grpc.streaming.GrpcSlowConsumerPolicy;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.advanced.streaming;
|
||||
package dev.cakit.grpc.advanced.streaming;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
edition = "2024";
|
||||
|
||||
package hyeonworks.grpc.edition.v1;
|
||||
package cakit.grpc.edition.v1;
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "hyeonworks.grpc.edition.v1.generated";
|
||||
option java_package = "cakit.grpc.edition.v1.generated";
|
||||
|
||||
// The Edition 2024 comparison fixture.
|
||||
//
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
# grpc — gRPC 플랫폼 family의 지역 정본
|
||||
|
||||
이 문서는 `grpc:*` family의 **지역 정본(local authority)**이다. gRPC platform은 이 repo(`grpc-library`)가 소유하고
|
||||
Maven group `com.hyeonworks.grpc`로 배포한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급,
|
||||
Maven group `dev.cakit.grpc`로 배포한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급,
|
||||
Stable 범위의 경계와 application에 채택될 때 필요한 계약이다.
|
||||
|
||||
루트 `AGENTS.md`와 충돌하면 루트가 이긴다.
|
||||
@@ -37,9 +37,9 @@ server profile·named channel profile·method size profile·method policy 기본
|
||||
그 상수를 쓴다. `GrpcPlatformStartupValidator`는 method의 inbound 한도가 server profile 한도보다 크면
|
||||
기동을 거부한다.
|
||||
|
||||
`.proto`의 proto 조직 이름은 `hyeonworks`다(`package hyeonworks.grpc.common.v1`, 생성 Java 패키지
|
||||
`hyeonworks.grpc.common.v1.generated` — 손으로 쓴 `com.hyeonworks`와 겹치지 않는다). proto 패키지는 wire
|
||||
이름이라 바꾸면 MAJOR다(`docs/work/release.md` 2절). 2026-11-08 전의 이름은 `caskeleton`이었다.
|
||||
`.proto`의 proto 조직 이름은 `cakit`이다(`package cakit.grpc.common.v1`, 생성 Java 패키지
|
||||
`cakit.grpc.common.v1.generated` — 손으로 쓴 `dev.cakit`과 겹치지 않는다). proto 패키지는 wire
|
||||
이름이라 바꾸면 MAJOR다(`docs/work/release.md` 2절). 2026-11-08 전의 이름은 `caskeleton`이었다(템플릿 자리표시 이름과 겹치지 않게 바꿨다).
|
||||
|
||||
### 공용 다이제스트 헬퍼를 복사해 두는 이유
|
||||
|
||||
@@ -84,7 +84,7 @@ capability flag 뒤에 있다. `GrpcPlatformStartupValidator`가 Stable catalog
|
||||
|
||||
## 라이브러리로 배포된다는 것의 의미
|
||||
|
||||
앱은 이 repo를 빌드에 넣지 않고 Gitea Packages에 배포한 버전(`com.hyeonworks.grpc:<모듈>:<버전>`)을 받는다. 플랫폼
|
||||
앱은 이 repo를 빌드에 넣지 않고 Gitea Packages에 배포한 버전(`dev.cakit.grpc:<모듈>:<버전>`)을 받는다. 플랫폼
|
||||
자체는 이 repo의 `./gradlew ci`로 검증하고, 앱 runtime에 실제 채택하려면 그 앱의 조립 루트가 명시적으로
|
||||
dependency를 가져오는 별도 변경이 필요하다. 백엔드 템플릿은 지금 이 라이브러리를 받지 않는다.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ plugins {
|
||||
// grpc-codegen, which did both with regular expressions (owner decision 18).
|
||||
//
|
||||
// Generated code lands under build/, in the package each file's `java_package` names
|
||||
// (`hyeonworks.*.generated`), which is disjoint from the hand-written `com.hyeonworks` root.
|
||||
// (`cakit.*.generated`), which is disjoint from the hand-written `dev.cakit` root.
|
||||
// Messages only: the schema declares no service yet, so there is no grpc-java stub to generate.
|
||||
dependencies {
|
||||
// api: every generated message extends com.google.protobuf.GeneratedMessageV3.
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package hyeonworks.grpc.common.v1;
|
||||
package cakit.grpc.common.v1;
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "hyeonworks.grpc.common.v1.generated";
|
||||
option java_package = "cakit.grpc.common.v1.generated";
|
||||
option java_outer_classname = "ErrorProto";
|
||||
|
||||
import "google/protobuf/duration.proto";
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package hyeonworks.grpc.common.v1;
|
||||
package cakit.grpc.common.v1;
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "hyeonworks.grpc.common.v1.generated";
|
||||
option java_package = "cakit.grpc.common.v1.generated";
|
||||
option java_outer_classname = "StreamProto";
|
||||
|
||||
// The Stable server-streaming envelope.
|
||||
+9
-9
@@ -1,10 +1,10 @@
|
||||
package com.hyeonworks.grpc.contract;
|
||||
package dev.cakit.grpc.contract;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import hyeonworks.grpc.common.v1.generated.StreamEnvelope;
|
||||
import hyeonworks.grpc.common.v1.generated.StreamMessageKind;
|
||||
import hyeonworks.grpc.common.v1.generated.StreamTerminationReason;
|
||||
import cakit.grpc.common.v1.generated.StreamEnvelope;
|
||||
import cakit.grpc.common.v1.generated.StreamMessageKind;
|
||||
import cakit.grpc.common.v1.generated.StreamTerminationReason;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -32,15 +32,15 @@ class GrpcContractGeneratedCodeTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("생성 코드의 proto 패키지와 Java 패키지는 조직 이름 hyeonworks 아래에 있고 손으로 쓴 com.hyeonworks과 겹치지 않는다")
|
||||
void generatedCodeLivesUnderTheHyeonworksProtoPackageAndOutsideTheHandWrittenRoot() {
|
||||
@DisplayName("생성 코드의 proto 패키지와 Java 패키지는 조직 이름 cakit 아래에 있고 손으로 쓴 dev.cakit과 겹치지 않는다")
|
||||
void generatedCodeLivesUnderTheCakitProtoPackageAndOutsideTheHandWrittenRoot() {
|
||||
// when
|
||||
String protoPackage = StreamEnvelope.getDescriptor().getFile().getPackage();
|
||||
|
||||
// then
|
||||
assertThat(protoPackage).isEqualTo("hyeonworks.grpc.common.v1");
|
||||
assertThat(protoPackage).isEqualTo("cakit.grpc.common.v1");
|
||||
assertThat(StreamEnvelope.class.getPackageName())
|
||||
.isEqualTo("hyeonworks.grpc.common.v1.generated")
|
||||
.doesNotStartWith("com.hyeonworks");
|
||||
.isEqualTo("cakit.grpc.common.v1.generated")
|
||||
.doesNotStartWith("dev.cakit");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.api.context;
|
||||
package dev.cakit.grpc.api.context;
|
||||
|
||||
/**
|
||||
* Who is calling, as established by authentication — never as claimed by a header.
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.api.context;
|
||||
package dev.cakit.grpc.api.context;
|
||||
|
||||
import com.hyeonworks.grpc.api.policy.GrpcTransportLimits;
|
||||
import dev.cakit.grpc.api.policy.GrpcTransportLimits;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.api.context;
|
||||
package dev.cakit.grpc.api.context;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package com.hyeonworks.grpc.api.context;
|
||||
package dev.cakit.grpc.api.context;
|
||||
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcCancellationToken;
|
||||
import com.hyeonworks.grpc.api.deadline.GrpcDeadlineBudget;
|
||||
import com.hyeonworks.grpc.core.GrpcMethodName;
|
||||
import com.hyeonworks.grpc.core.RpcType;
|
||||
import dev.cakit.grpc.api.deadline.GrpcCancellationToken;
|
||||
import dev.cakit.grpc.api.deadline.GrpcDeadlineBudget;
|
||||
import dev.cakit.grpc.core.GrpcMethodName;
|
||||
import dev.cakit.grpc.core.RpcType;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.api.deadline;
|
||||
package dev.cakit.grpc.api.deadline;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Optional;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.api.deadline;
|
||||
package dev.cakit.grpc.api.deadline;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.function.LongSupplier;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.hyeonworks.grpc.api.deadline;
|
||||
package dev.cakit.grpc.api.deadline;
|
||||
|
||||
import com.hyeonworks.grpc.api.error.GrpcFailureContext;
|
||||
import com.hyeonworks.grpc.api.error.GrpcPlatformException;
|
||||
import dev.cakit.grpc.api.error.GrpcFailureContext;
|
||||
import dev.cakit.grpc.api.error.GrpcPlatformException;
|
||||
|
||||
/**
|
||||
* A deadline elapsed.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.api.deadline;
|
||||
package dev.cakit.grpc.api.deadline;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package com.hyeonworks.grpc.api.error;
|
||||
package dev.cakit.grpc.api.error;
|
||||
|
||||
import com.hyeonworks.grpc.core.GrpcStatusCode;
|
||||
import com.hyeonworks.grpc.evidence.GrpcBusinessEvidence;
|
||||
import com.hyeonworks.grpc.evidence.GrpcExecutionEvidence;
|
||||
import com.hyeonworks.grpc.evidence.GrpcStreamEvidence;
|
||||
import dev.cakit.grpc.core.GrpcStatusCode;
|
||||
import dev.cakit.grpc.evidence.GrpcBusinessEvidence;
|
||||
import dev.cakit.grpc.evidence.GrpcExecutionEvidence;
|
||||
import dev.cakit.grpc.evidence.GrpcStreamEvidence;
|
||||
|
||||
/**
|
||||
* What the caller may conclude about the business operation.
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.hyeonworks.grpc.api.error;
|
||||
package dev.cakit.grpc.api.error;
|
||||
|
||||
import com.hyeonworks.grpc.core.GrpcStatusCode;
|
||||
import dev.cakit.grpc.core.GrpcStatusCode;
|
||||
|
||||
/**
|
||||
* The platform's stable failure taxonomy, and the canonical status each category maps to.
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package com.hyeonworks.grpc.api.error;
|
||||
package dev.cakit.grpc.api.error;
|
||||
|
||||
import com.hyeonworks.grpc.core.GrpcMethodName;
|
||||
import com.hyeonworks.grpc.core.GrpcStatusCode;
|
||||
import com.hyeonworks.grpc.evidence.GrpcExecutionEvidence;
|
||||
import dev.cakit.grpc.core.GrpcMethodName;
|
||||
import dev.cakit.grpc.core.GrpcStatusCode;
|
||||
import dev.cakit.grpc.evidence.GrpcExecutionEvidence;
|
||||
import java.time.Duration;
|
||||
import java.util.Optional;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.hyeonworks.grpc.api.error;
|
||||
package dev.cakit.grpc.api.error;
|
||||
|
||||
/**
|
||||
* The platform's failure carrier.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user