feat: 버그 수정, 테스트 추가, JDK 25 / Kotlin 2.3.20 업그레이드, 문서 현행화#3
Merged
Conversation
- Fix unescaped dots in CodeArtifact URL regex (`.` -> `\.`)
- Fix incorrect domain parsing for domains with digits after hyphens
by using `\d{12}` for domainOwner and greedy match for domain
- Strip query parameters from Maven repository URL to prevent
`?profile=xxx` from leaking into artifact resolution URLs
- Add `profile` field to CodeArtifactEndpoint parsed from query params
- Handle URI fragments (`#`) in URL parsing regex
- Guard against empty/blank profile values defaulting to "default"
- Add try-catch in fromUrl(String) for malformed URI handling
- Fix CodeartifactClient resource leak with `.use {}` block
- Fix token cache race condition with ConcurrentHashMap.compute()
- Include domainOwner in cache key to prevent cross-account token reuse
- Use Long literal in token expiry calculation to prevent overflow
- Fix queryParameters() crash on key-only params (e.g., `?flag`)
- Use endpoint.profile instead of manual query param parsing in plugin
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Version upgrades: - JDK: 21 -> 25 (LTS, Corretto 25) - Kotlin: 2.1.21 -> 2.3.20 (JVM_25 target support) - Kotlin API version: 1.9 -> 2.0 - AWS SDK v2: 2.30.33 -> 2.42.33 - Gradle Plugin Publish: 1.3.1 -> 2.1.1 - Gradle wrapper: 9.4.1 (already current) Additional changes: - Fix DefaultCredentialsProvider.create() deprecation in AWS SDK 2.42 - Update CI to use Corretto 25 - Fix CI Gradle cache key to match .gradle.kts and libs.versions.toml - Update plugin tags from jdk17 to jdk25 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Unit tests: - CodeArtifactEndpointTest (41): URL parsing, regex, domain/region/type variations, profile extraction, clean URL generation, edge cases - UrlExtensionTest (14): query parameter parsing, key-only params, URL encoding, resolveSystemVar - CachedCodeArtifactTokenServiceTest (7): token expiry boundaries, TokenModel data class behavior Functional tests (Gradle TestKit): - CodeArtifactPluginFunctionalTest (4): plugin application to project/settings, non-CodeArtifact repo passthrough, extension usage Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
README.md: - Full Korean translation - Update version requirements table - Fix plugin ID (com.kmong.aws:codeartifact -> com.kmong.codeartifact) - Unify all code examples to Kotlin DSL syntax - Add settings.gradle.kts usage guide - Add AWS credential resolution chain documentation - Add token caching behavior documentation CLAUDE.md (new): - Project overview and architecture - Build commands and tech stack - Key files and their responsibilities - Plugin flow, token caching, and URL regex documentation - Coding conventions and CI/CD info - Note about dependencyResolutionManagement limitation Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
Author
프로덕션 릴리즈 안전성 검토 보고서전체 변경사항(18개 파일, +1,084 / -140)을 5회 패스로 교차 검증한 결과입니다. 1. 소스 코드 검증 (5개 파일)CodeArtifactEndpoint.kt
CachedCodeArtifactTokenService.kt
CodeArtifactPlugin.kt
UrlExtension.kt
Credentials.kt
2. 버전 호환성 검증
3. 테스트 커버리지 검증
4. 문서 ↔ 코드 일관성 검증
5. Breaking Changes 검증
6. 잔여 경고 (무해)
결론프로덕션 릴리즈 안전합니다.
🤖 Generated with Claude Code |
Contributor
|
키야~~~~~~~~끝내줘여!!!!!!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 개요
CodeArtifact Gradle 플러그인의 안정성, 테스트 커버리지, 종속성 버전, 문서를 전면 개선합니다.
배경 및 의도
변경사항
1. 버그 수정 (
2a81da0).이 리터럴 점이 아닌 임의 문자 매칭CodeArtifactEndpoint.kt\.d\.codeartifact\.이스케이프my-3rd-domain-123456789012같은 도메인 파싱 오류CodeArtifactEndpoint.kt\d{12}정확 매칭 + greedy 도메인?profile=xxx가 Maven 저장소 URL에 잔존CodeArtifactEndpoint.kt?profile=(빈 값) 시 빈 문자열 전달CodeArtifactEndpoint.kttakeIf { it.isNotBlank() }가드fromUrl(String)비정상 URI 예외 발생CodeArtifactEndpoint.kt#) 미처리CodeArtifactEndpoint.kt[^/?#]+적용CodeartifactClient리소스 누수CachedCodeArtifactTokenService.kt.use {}블록CachedCodeArtifactTokenService.ktConcurrentHashMap.compute()CachedCodeArtifactTokenService.kt"${domainOwner}:${domain}"isTokenExpiredInt 오버플로 잠재 위험CachedCodeArtifactTokenService.kt11LLong 리터럴?flag키 전용 쿼리 파라미터 크래시UrlExtension.ktgetOrNull(1)사용2. 버전 업그레이드 (
6ea1f5c)DefaultCredentialsProvider.create()→.builder().build()(AWS SDK 2.42 deprecation 대응)java-version: 25(Corretto 25)**/*.gradle*,**/libs.versions.toml)3. 테스트 추가 (
d803a60)기존 0개 → 65개 테스트 추가 (단위 62 + 기능 4)
CodeArtifactEndpointTestUrlExtensionTestCachedCodeArtifactTokenServiceTestCodeArtifactPluginFunctionalTest4. 문서 (
139e42a)Breaking Changes
codeartifact()확장 함수, URL 형식)는 변경되지 않았습니다.주의사항
kotlin-dslWARNING: Gradle 9.4.1 내장 Kotlin 2.3.0과 프로젝트 Kotlin 2.3.20의 패치 버전 차이로 경고가 출력됩니다. 기능 영향 없으며, Gradle 차기 버전에서 자연 해소됩니다.native-platform라이브러리에서 경고가 출력됩니다. Gradle 측에서 대응 예정입니다.release.yml에서--exclude-task test로 테스트를 스킵하고 있습니다. 테스트가 추가되었으므로 향후 CI에 테스트 단계 포함을 권장합니다.배포 절차
release/0.0.5태그 생성 → GitHub Actions 자동 배포 → Gradle Plugin Portal 게시검증 완료 항목
./gradlew test— 65 tests, 0 failures./gradlew build— BUILD SUCCESSFUL🤖 Generated with Claude Code