Skip to content

Conversation

@Roel4990
Copy link
Member

@Roel4990 Roel4990 commented Oct 10, 2025

Related issue 🛠

Work Description ✏️

  • Chucker 기능을 추가했어요

Screenshot 📸

To Reviewers 📢

혹시 잘 안되면 물어봐주세요.

Summary by CodeRabbit

  • Chores
    • 개발 빌드에 네트워크 디버깅 도구(Chucker)를 추가해 요청/응답을 쉽게 검사할 수 있습니다.
    • 릴리스 빌드에는 동작하지 않는(no-op) Chucker 버전을 포함해 앱 동작과 성능에 영향이 없습니다.
    • 내부 네트워크 클라이언트에 디버깅 인터셉터를 연동해 개발 중 문제 진단이 수월해졌습니다.
    • PR 빌드 워크플로우의 JDK를 18→17로 변경했습니다.
    • PR 빌드에 --stacktrace 옵션을 추가해 빌드 실패 시 진단 정보가 늘어납니다.
    • 사용자에게 보이는 기능 변화는 없습니다.

@Roel4990 Roel4990 self-assigned this Oct 10, 2025
@Roel4990 Roel4990 requested a review from a team as a code owner October 10, 2025 09:32
@Roel4990 Roel4990 removed the request for review from a team October 10, 2025 09:32
@Roel4990 Roel4990 added the 🧡세홍🧡 🧡세홍🧡 label Oct 10, 2025
@Roel4990 Roel4990 added the FEAT✨ 새로운 기능 구현 label Oct 10, 2025
@Roel4990 Roel4990 linked an issue Oct 10, 2025 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Oct 10, 2025

Walkthrough

Chucker 디버깅 라이브러리를 버전 카탈로그와 앱 모듈 의존성에 추가하고, RetrofitModule에 ChuckerInterceptor 제공자를 추가해 기존 OkHttp 클라이언트들에 주입하도록 메서드 시그니처를 확장했습니다. CI PR 빌드 스크립트의 Gradle 호출에 --stacktrace 옵션과 JDK 버전 조정이 포함됩니다.

Changes

Cohort / File(s) Summary
Gradle 버전 카탈로그
gradle/libs.versions.toml
chucker = "4.0.0" 버전 추가 및 chucker-library, chucker-library-no-op 라이브러리 선언 추가.
앱 모듈 의존성
app/build.gradle.kts
debugImplementation(libs.chucker.library)releaseImplementation(libs.chucker.library.no.op) 의존성 추가.
네트워크 DI 및 OkHttp 클라이언트 주입
app/src/main/java/.../core/network/RetrofitModule.kt
provideChuckerInterceptor(@ApplicationContext context: Context): ChuckerInterceptor 제공자 추가. provideClient, provideAuthClient, provideCoilClient 시그니처에 ChuckerInterceptor 파라미터를 추가하고 클라이언트 빌더에 인터셉터를 연결하도록 변경.
CI 워크플로우
.github/workflows/pr_builder.yml
JDK 버전을 18→17로 변경하고 Gradle 호출에 --stacktrace 옵션 추가 (./gradlew assembleDebug -PcompileSdkVersion=35 --stacktrace).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as 앱
  participant DI as RetrofitModule (DI)
  participant OK as OkHttpClient
  participant CH as ChuckerInterceptor
  participant NW as 서버

  App->>DI: 클라이언트 요청
  DI->>DI: provideChuckerInterceptor(context)
  DI->>OK: 빌더 구성\n+ logging/auth\n+ addInterceptor(CH)
  App->>OK: HTTP 요청 전송
  OK->>CH: 요청 인터셉트 (검사/수집)
  CH->>NW: 요청 전달
  NW-->>CH: 응답 수신
  CH-->>OK: 응답 반환
  OK-->>App: 응답 전달
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

ADD➕

Suggested reviewers

  • chattymin
  • angryPodo

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning PR에는 Chucker 기능 추가와 무관한 범위 외 변경사항이 포함되어 있습니다. .github/workflows/pr_builder.yml 파일에서 JDK 버전을 18에서 17로 업그레이드하고 Gradle 빌드 명령에 --stacktrace 플래그를 추가한 변경사항은 Chucker 기능 추가 목표와 직접적인 관련이 없습니다. 이러한 워크플로우 관련 수정사항은 별도의 이슈나 PR로 처리하는 것이 적절합니다. .github/workflows/pr_builder.yml의 변경사항(JDK 18→17 업그레이드, --stacktrace 플래그 추가)을 이 PR에서 제거하고 별도의 PR로 분리하거나, 현재 PR의 범위를 확장하여 워크플로우 업데이트가 필요한 이유를 명시해 주시기 바랍니다.
✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed PR 제목 "[FEAT/#410] Chucker 기능 추가했어요."는 변경사항의 주요 목표를 명확하게 나타냅니다. Chucker 라이브러리 추가라는 중심 변경사항을 구체적이고 명확하게 설명하고 있으며, 모호하거나 일반적인 표현을 사용하지 않습니다. 이슈 번호(#410)도 포함되어 있어 추적 가능성이 좋습니다.
Linked Issues Check ✅ Passed PR의 모든 주요 변경사항은 연결된 이슈 #410의 목표인 "Chucker 추가하기"를 충족합니다. gradle/libs.versions.toml에 Chucker 라이브러리 버전을 추가하고, app/build.gradle.kts에 디버그/릴리스 의존성을 추가하며, RetrofitModule.kt에 ChuckerInterceptor 제공자를 구현하고 세 개의 OkHttpClient 제공자에 통합했습니다. 모든 변경사항이 이슈에 명시된 목표를 직접적으로 구현하고 있습니다.
Description Check ✅ Passed PR 설명은 제공된 템플릿의 대부분의 필수 섹션을 포함하고 있습니다. "Related issue" (이슈 #410 연결), "Work Description" (Chucker 기능 추가), "Screenshot" (3개의 이미지 포함), "To Reviewers" (검토자 메시지) 섹션이 모두 작성되어 있습니다. 다만 "Uncompleted Tasks" 섹션이 누락되어 있으나, 이는 비필수적인 섹션이므로 전체적으로 설명은 충분히 완성된 상태입니다.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#410-chucker

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de4be0d and 63fd42b.

📒 Files selected for processing (1)
  • .github/workflows/pr_builder.yml (2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/pr_builder.yml

30-30: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR Builder
🔇 Additional comments (2)
.github/workflows/pr_builder.yml (2)

70-70: Gradle 빌드 명령에 --stacktrace 플래그 추가는 좋은 개선

--stacktrace 플래그 추가는 빌드 실패 시 디버깅을 더 쉽게 만드는 좋은 변경입니다. 이는 Chucker 통합으로 인한 잠재적 컴파일 문제를 추적하는 데 유용할 것입니다.


29-33: actions/setup-java 버전 업그레이드 필요 (v5로 수정) 및 JDK 다운그레이드 이유 확인 요청

리뷰 코멘트에 오류가 있습니다. actions/setup-java의 최신 버전은 v4가 아닌 v5.0.0입니다. 또한 --stacktrace 옵션은 라인 72에 이미 적용되어 있습니다.

JDK 18에서 17로의 다운그레이드(커밋 63fd42b)는 진행되었으나, 코드베이스에서 구체적인 이유를 찾을 수 없습니다. 현재 앱의 Java 호환성 타겟은 11이고, Chucker 라이브러리는 특정 JDK 버전 요구사항이 없는 것으로 보입니다.

다음을 수행하세요:

  • actions/setup-java@v3@v5로 업그레이드
  • JDK 버전 다운그레이드의 이유를 확인하고 문서화 (필요시 PR 설명 또는 이슈 참조 추가)
      - name: set up JDK 17
-       uses: actions/setup-java@v3
+       uses: actions/setup-java@v5
        with:
          java-version: 17
          distribution: 'temurin'

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
app/src/main/java/com/spoony/spoony/core/network/RetrofitModule.kt (2)

85-87: ChuckerInterceptor 설정을 강화하면 디버깅 경험을 개선할 수 있습니다.

현재 기본 설정으로 ChuckerInterceptor를 생성하고 있습니다. 다음과 같은 추가 설정을 고려해보세요:

 @Provides
 @Singleton
-fun provideChuckerInterceptor(@ApplicationContext context: Context): ChuckerInterceptor = ChuckerInterceptor.Builder(context).build()
+fun provideChuckerInterceptor(@ApplicationContext context: Context): ChuckerInterceptor = 
+    ChuckerInterceptor.Builder(context)
+        .maxContentLength(250_000L)
+        .alwaysReadResponseBody(true)
+        .build()

이렇게 하면:

  • 더 큰 응답 본문을 확인할 수 있습니다
  • 응답 본문을 항상 읽어 더 정확한 검사가 가능합니다

91-101: 인터셉터가 올바르게 추가되었습니다.

ChuckerInterceptor가 OkHttpClient에 성공적으로 통합되었습니다. 더 정확한 네트워크 데이터 캡처를 원한다면 chuckerInterceptor를 authInterceptor 다음에 추가하는 것을 고려해보세요(선택사항).

선택적 개선사항: 인터셉터 순서 조정

 fun provideClient(
     loggingInterceptor: HttpLoggingInterceptor,
     authInterceptor: Interceptor,
     tokenAuthenticator: TokenAuthenticator,
     chuckerInterceptor: ChuckerInterceptor
 ) = OkHttpClient.Builder()
     .addInterceptor(loggingInterceptor)
     .addInterceptor(authInterceptor)
     .addInterceptor(chuckerInterceptor)
     .authenticator(tokenAuthenticator)
     .build()

이렇게 하면 Chucker가 인증 헤더를 포함한 최종 요청을 캡처할 수 있습니다.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d577e62 and 5bf84ef.

📒 Files selected for processing (3)
  • app/build.gradle.kts (1 hunks)
  • app/src/main/java/com/spoony/spoony/core/network/RetrofitModule.kt (2 hunks)
  • gradle/libs.versions.toml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR Builder
🔇 Additional comments (5)
gradle/libs.versions.toml (1)

45-45: LGTM! Chucker 의존성이 올바르게 설정되었습니다.

버전 카탈로그에 Chucker 4.0.0 버전과 디버그/릴리스용 라이브러리 정의가 적절하게 추가되었습니다. 디버그 빌드에는 전체 기능을, 릴리스 빌드에는 no-op 구현을 사용하는 표준 패턴을 따르고 있습니다.

Also applies to: 119-120

app/build.gradle.kts (1)

104-107: LGTM! 빌드 변형별 의존성이 올바르게 구성되었습니다.

디버그 빌드에는 전체 Chucker 라이브러리를, 릴리스 빌드에는 no-op 구현을 사용하여 프로덕션 환경에서의 오버헤드를 방지하고 있습니다.

app/src/main/java/com/spoony/spoony/core/network/RetrofitModule.kt (3)

3-4: LGTM! 필요한 import 문이 추가되었습니다.

Chucker 통합을 위한 import 문들이 적절하게 추가되었습니다.

Also applies to: 12-12


106-112: LGTM! Auth 클라이언트에 Chucker가 올바르게 통합되었습니다.

AuthClient에 ChuckerInterceptor가 적절하게 추가되었습니다.


117-123: LGTM! Coil 클라이언트에 Chucker가 올바르게 통합되었습니다.

Coil 이미지 로딩에 사용되는 클라이언트에도 ChuckerInterceptor가 적절하게 추가되어 이미지 요청도 디버깅할 수 있습니다.

Copy link
Collaborator

@Hyobeen-Park Hyobeen-Park left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우왕 신기해!! 어푸푸

Copy link
Member

@angryPodo angryPodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은거 배워갑니다ㅎㅎ Coil관련된거만 논의해보작오

debugImplementation(libs.chucker.library)

// Release
releaseImplementation(libs.chucker.library.no.op)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 해야 하는구만...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게해야 확실한것같더라구요

Comment on lines +118 to +119
loggingInterceptor: HttpLoggingInterceptor,
chuckerInterceptor: ChuckerInterceptor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CoilClient도 로깅을 찍을까요 말까요? @Hyobeen-Park @Roel4990

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음 일단 다 넣어두긴 했는데 뺼까요.>?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넣어도 크게 문제될것같진않습니다.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/pr_builder.yml (1)

70-70: --stacktrace 옵션 추가의 목적과 대안 검토 권장.

Chucker 추가에 따른 빌드 진단 개선을 위해 --stacktrace 옵션을 추가한 것으로 보입니다. 이는 빌드 실패 시 스택 트레이스 정보를 출력하여 디버깅을 돕습니다.

하지만 다음 사항을 고려하시길 권장합니다:

  • --stacktrace는 기본적인 스택 정보만 제공하며, --info 또는 --debug는 더 상세한 로그를 제공합니다.
  • Chucker와의 직접적인 연관성을 명확히 하기 위해 커밋 메시지나 PR 설명에 이 변경의 이유를 문서화하면 좋습니다.
  • 빌드 시간 증가를 모니터링하여 필요시 더 가벼운 옵션으로 변경할 수 있습니다.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6273fee and de4be0d.

📒 Files selected for processing (1)
  • .github/workflows/pr_builder.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: PR Builder

@Roel4990 Roel4990 merged commit ded8b7e into develop Oct 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT✨ 새로운 기능 구현 🧡세홍🧡 🧡세홍🧡

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Chucker 추가하기

4 participants