Skip to content

Conversation

@ht3064
Copy link
Member

@ht3064 ht3064 commented Jun 13, 2025

🌱 관련 이슈


📌 작업 내용 및 특이사항

  • 공통 proto 디렉토리를 생성하고 auth.proto, member.proto를 작성했습니다.
    • 회원 등록, 조회, 재가입, 리프레시 토큰 삭제 관련 요청·응답 및 내부 enum 스펙을 정의했습니다.
    • google.protobuf.Empty를 활용하여 응답이 없는 케이스를 처리했습니다.
  • protobuf 빌드 환경을 구성했습니다.
    • protobuf-gradle-plugin을 적용하여 proto → java 코드 자동 생성하도록 설정했습니다.
    • proto-generated 디렉토리는 protobuf 컴파일 과정에서 생성되므로 spotless 대상에서 제외하여 빌드 간 포맷 차이로 인한 불필요한 변경 및 CI 불안정을 방지했습니다
  • 기존 회원-인증 서비스 간 내부 통신을 gRPC로 전환했습니다.
    • OpenFeign 기반 내부 호출 코드를 gRPC Stub 호출로 변경했습니다.
    • 기존에 사용하던 @GrpcClient 방식 대신, Config를 통해 Stub를 Bean으로 주입받도록 통일했습니다.
    • Rest API로 구현되어 있던 기존 내부 API와 WireMock 기반 테스트 코드를 제거했습니다.
    • gRPC Enum ↔ 도메인 Enum 간 변환을 위한 유틸 클래스를 작성했습니다.
  • 통합 테스트 환경을 개선했습니다.
    • InProcess 기반 gRPC 서버를 사용할 수 있도록 InMemoryGrpcServer 유틸 클래스를 작성했습니다.
    • 테스트용 gRPC Stub 서비스 (TestAuthGrpcService, TestMemberGrpcService)를 추가했습니다.
    • 통합 테스트에서는 실제 서버 없이 InProcess 기반으로 gRPC 호출 테스트를 수행하도록 구성했습니다.
    • 기존 WireMock 기반 Rest 통신 테스트를 전부 제거하고 gRPC 테스트로 전환했습니다.

📚 참고사항

  • 현재는 gRPC Status 기반으로만 예외를 변환하고 있으며, 이후 필요시 Feign과 유사한 Decoder 형태의 상세 예외 매핑 적용 예정입니다.

@ht3064 ht3064 self-assigned this Jun 13, 2025
@ht3064 ht3064 force-pushed the feat/LCR-364-member-auth-grpc-migration branch from ea6bf0a to cca2fd4 Compare June 14, 2025 01:07
@ht3064 ht3064 force-pushed the feat/LCR-364-member-auth-grpc-migration branch from 276ce81 to b8b8060 Compare June 14, 2025 01:36
@ht3064 ht3064 force-pushed the feat/LCR-364-member-auth-grpc-migration branch from 44e9553 to 931912c Compare June 15, 2025 05:18
@sonarqubecloud
Copy link

Copy link
Member

@woogieon8on woogieon8on left a comment

Choose a reason for hiding this comment

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

gRPC 테스트 코드 작성 방법에 대해 자세히 배워갑니다. 정말 고생하셨습니다!!
LGTMMMMMMMMMMMMMMMMMMM

Copy link
Member

@ohhyungsuh ohhyungsuh left a comment

Choose a reason for hiding this comment

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

Loooooooook
So Good
To Us

@ht3064 ht3064 merged commit 7738492 into develop Jun 16, 2025
2 checks passed
@ht3064 ht3064 deleted the feat/LCR-364-member-auth-grpc-migration branch June 18, 2025 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants