Skip to content

Comments

배포를 위한 수정사항 dev 브랜치 반영#106

Merged
taco-recipe merged 17 commits intodevfrom
main
Aug 23, 2025
Merged

배포를 위한 수정사항 dev 브랜치 반영#106
taco-recipe merged 17 commits intodevfrom
main

Conversation

@taco-recipe
Copy link
Contributor

@taco-recipe taco-recipe commented Aug 23, 2025

Summary by CodeRabbit

  • 신기능
    • 번역: 언어 감지와 자동 번역 엔드포인트 추가.
    • 추천: 유사 회원 추천이 ID가 아닌 이름 목록을 반환.
    • 관리자: 태그 점수 마이그레이션 API 추가 및 자동 실행 옵션 제공.
  • 리팩터
    • 인증: 토큰 갱신 시 만료된 액세스 토큰 헤더 요구, 응답에 completed 필드 추가, OAuth2 리다이렉트에 access_token 쿼리 포함.
    • 테스트/헬스: 세션 헬스체크 엔드포인트 제거.
  • 작업
    • CORS 전역 허용 및 필터/설정 추가, 프로덕션 허용 오리진 구성.
    • 번역 서비스 모델 사전로드·언어 제한 및 헬스체크 개선.

@coderabbitai
Copy link

coderabbitai bot commented Aug 23, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

ECS 배포 워크플로에 강제 배포 옵션 추가, ECS 태스크 리소스 상향, LibreTranslate 컴포즈 설정 확장. 빌드에서 Spring Session Redis 제거. 인증/토큰 전반을 ID 기반으로 개편하고 리프레시에 만료된 액세스 토큰 헤더 요구. 추천/태깅 마이그레이션 및 추천 API 타입 변경. 번역에 언어 감지/자동 번역 추가. CORS/보안/프로필별 설정 수정. 테스트/헬스체크 경로 조정. 애플리케이션 설정(prod 활성화 등) 변경.

Changes

Cohort / File(s) Summary
Deployment & Infra
.github/workflows/deploy.yml, infra/taskdef.json, docker-compose.yml
ECS 배포에 force-new-deployment: true 추가. 태스크 cpu 1024, memory 4096으로 상향. LibreTranslate에 루트 실행, 모델 볼륨/환경변수/명령/헬스체크 갱신 및 lt_models 볼륨 도입.
Build
build.gradle
spring-session-data-redis 의존성 제거, 주석 갱신.
Auth API & Token
src/.../auth/controller/AuthController.java, src/.../auth/dto/TokenBundle.java, src/.../auth/entity/Auth.java, src/.../auth/oauth2/handler/OAuth2SuccessHandler.java, src/.../auth/oauth2/processor/GoogleLoginProcessor.java, src/.../auth/repository/AuthRepository.java, src/.../auth/service/AuthService.java
리프레시 엔드포인트가 헤더 X-Expired-Access-Token 추가. TokenBundle에 completed(boolean) 필드 추가. Auth.refreshToken 컬럼 text/스네이크네임 지정. 토큰 발급을 ID 기반으로 변경(Access: Auth ID, Refresh: Member ID). 리프레시에 만료 액세스 토큰으로 Auth ID 검증. AuthRepository에 findByIdWithMember 추가.
JWT & Security Integration
src/.../global/security/jwt/JwtTokenProvider.java, src/.../global/security/jwt/JwtAuthFilter.java, src/.../global/security/CustomMemberDetailsService.java, src/.../domain/chat/websocket/config/WebSocketConfig.java
JwtTokenProvider API 개편: createAccessToken(Long), createRefreshToken(Long), getAuthIdFromAccessToken 등 추가/제거. 필터와 WebSocket이 authId 기반 조회로 변경. CustomMemberDetailsService가 authId/email/membername 경로로 조회하도록 확장(Repo 추가).
Member Domain
src/.../member/entity/Member.java, src/.../member/entity/MemberProfile.java, src/.../member/repository/MemberRepository.java, src/.../member/service/MemberServiceImpl.java
Member에 hasMembername/canSetupProfile 추가. MemberProfile에 @Setter 부여. MemberRepository에 이메일/ID/멤버명 기반 조회 메서드 다수 추가. 프로필 업데이트 시 추천 태그 점수 생성/갱신 호출 추가, setMembername에서 토큰 갱신 제거.
Chat
src/.../chat/websocket/controller/ChatController.java
@transactional 추가, 입장 시 ChatRoomMemberRepository.findByUuidWithMembers 사용으로 참가자 검증 시 지연로딩 회피.
Recommendation/Tagging
src/.../recommendationtag/config/MigrationConfig.java, src/.../recommendationtag/controller/MigrationController.java, src/.../recommendationtag/service/MemberTagScoreMigrationService.java, src/.../recommendationtag/controller/RecommendationTagController.java, src/.../recommendationtag/service/RecommendationTagService.java, src/.../recommendationtag/service/RecommendationMemberService.java
태그 점수 마이그레이션 구성/서비스/관리자 API 추가. 추천 API 반환 타입 List→List. RecommendationTagService에 회원 관심사 기반 점수 생성/갱신 메서드 추가. 추천 로직에 캐시/AI태깅/점수기반 폴백 통합 및 이름 변환.
Translate
src/.../translate/controller/TranslateController.java, src/.../translate/dto/LanguageDetectionResponseDto.java, src/.../translate/dto/TranslateRequestDto.java, src/.../translate/service/LiberTranslateService.java
언어 감지/자동 번역 엔드포인트 및 서비스 로직 추가. LanguageDetectionResponseDto 신설. TranslateRequestDto에 @Setter 추가.
Global Config & Security
src/.../global/config/CorsFilter.java, src/.../global/config/WebConfig.java, src/.../global/config/SecurityConfig.java, src/.../global/config/DevRedisCleaner.java, src/.../global/config/KafkaConfig.java, src/.../global/health/ApiHealthCheckRunner.java, src/.../global/exception/GlobalExceptionHandler.java
전역 CORS 필터/웹 설정 추가. SecurityConfig에서 프로필별 분기 축소, 공통 공개 경로/프레임옵션/CSRF 비활성 람다화, CORS 로깅. DevRedisCleaner의 프로필 제한 제거. KafkaConfig에 @Profile("dev"). 헬스체크 러너가 전 프로필 활성+Gemini 체크 추가+타임아웃 5s. Redis 예외 처리 단순화(세션 만료 분기 제거, RedisSystemException만 처리).
Health/Test Utilities
src/.../global/test/HealthCheckController.java, src/.../global/test/TestConsumer.java, src/.../global/test/TestController.java, src/.../global/test/TestDataInitializer.java
세션 헬스 엔드포인트 제거. TestConsumer에 @Profile("dev") 추가. 테스트 프로필 보강 API 추가. 초기 데이터 생성에서 프로필 제한 제거 및 기본 관심사/언어/타임존 설정.
Application Config
src/main/resources/application.yml, src/main/resources/application-prod.yml
기본 활성 프로필을 prod로 변경. 세션 Redis 설정 주석 처리 및 마이그레이션 플래그 추가. prod에 front.cors.allowed-origins 추가, Kafka 설정 제거, OAuth2 grant-type 명시, forward-headers-strategy 조정.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as AuthController
  participant SVC as AuthService
  participant JWT as JwtTokenProvider
  participant Repo as AuthRepository

  Client->>API: POST /api/auth/refresh\nHeaders: Authorization: Bearer <refresh>, X-Expired-Access-Token: <expired>
  API->>SVC: refreshToken(refresh, expired)
  SVC->>JWT: getUserIdFromRefreshToken(refresh)
  SVC->>Repo: findByRefreshToken(...)
  Repo-->>SVC: Auth
  SVC->>JWT: getAuthIdFromAccessToken(expired)
  SVC-->>SVC: Validate authId matches
  SVC->>JWT: createAccessToken(auth.id)
  SVC->>JWT: createRefreshToken(member.id)
  SVC-->>API: TokenBundle(access, refresh, completed)
  API-->>Client: 200 TokenBundle
Loading
sequenceDiagram
  autonumber
  actor User
  participant C as RecommendationTagController
  participant RS as RecommendationMemberService
  participant TS as RecommendationTagService
  participant R as Redis
  participant DB as Repositories

  User->>C: GET /api/tags/recommend?topN=N
  C->>RS: recommendSimilarMembers(memberId, N)
  RS->>R: GET base vector
  alt Cache miss
    RS->>TS: refreshMemberScores(memberId)
    alt No AI vector
      RS->>DB: Load MemberTagScore
      RS-->>R: Cache fallback vector
    end
  end
  RS->>DB: Query candidate scores
  RS-->>C: Top-N member names (List<String>)
  C-->>User: 200 [names]
Loading
sequenceDiagram
  autonumber
  actor Client
  participant TAPI as TranslateController
  participant S as LiberTranslateService
  participant LT as LibreTranslate

  Client->>TAPI: POST /api/translate/auto {q}
  TAPI->>S: translateAuto(dto)
  S->>S: detectLanguage(q)
  S->>LT: POST /detect {q}
  LT-->>S: [{language, confidence}]
  S-->>S: choose source/target (en<->ko)
  S->>LT: POST /translate {q, source, target}
  LT-->>S: {translatedText}
  S-->>TAPI: TranslateResponseDto
  TAPI-->>Client: 200
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • Feat/#1 #8 — 동일한 인증 컴포넌트 경로(JwtTokenProvider, AuthService, AuthController, TokenBundle) 변경과 직접적으로 겹침.
  • Feat/#39 #51 — 태깅 NLP/추천 도메인 도입과 본 PR의 추천/마이그레이션 변경이 연속선상에 있음.
  • feat: pr 중 main 충돌 내용 병합 #96 — 동일한 GitHub Actions 배포 워크플로 파일 변경과 관련.

Suggested labels

enhancement

Suggested reviewers

  • moonjs1011
  • Eomssi
  • ieunseo

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 47237cd and 1e80403.

📒 Files selected for processing (43)
  • .github/workflows/deploy.yml (1 hunks)
  • build.gradle (1 hunks)
  • docker-compose.yml (2 hunks)
  • infra/taskdef.json (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/controller/AuthController.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/dto/TokenBundle.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/entity/Auth.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/oauth2/handler/OAuth2SuccessHandler.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/oauth2/processor/GoogleLoginProcessor.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/repository/AuthRepository.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/auth/service/AuthService.java (5 hunks)
  • src/main/java/org/example/howareyou/domain/chat/websocket/config/WebSocketConfig.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/chat/websocket/controller/ChatController.java (3 hunks)
  • src/main/java/org/example/howareyou/domain/member/entity/Member.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/member/entity/MemberProfile.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/member/repository/MemberRepository.java (2 hunks)
  • src/main/java/org/example/howareyou/domain/member/service/MemberServiceImpl.java (4 hunks)
  • src/main/java/org/example/howareyou/domain/recommendationtag/config/MigrationConfig.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/recommendationtag/controller/MigrationController.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/recommendationtag/controller/RecommendationTagController.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/recommendationtag/service/MemberTagScoreMigrationService.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/recommendationtag/service/RecommendationMemberService.java (4 hunks)
  • src/main/java/org/example/howareyou/domain/recommendationtag/service/RecommendationTagService.java (2 hunks)
  • src/main/java/org/example/howareyou/domain/translate/controller/TranslateController.java (2 hunks)
  • src/main/java/org/example/howareyou/domain/translate/dto/LanguageDetectionResponseDto.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/translate/dto/TranslateRequestDto.java (1 hunks)
  • src/main/java/org/example/howareyou/domain/translate/service/LiberTranslateService.java (2 hunks)
  • src/main/java/org/example/howareyou/global/config/CorsFilter.java (1 hunks)
  • src/main/java/org/example/howareyou/global/config/DevRedisCleaner.java (1 hunks)
  • src/main/java/org/example/howareyou/global/config/KafkaConfig.java (1 hunks)
  • src/main/java/org/example/howareyou/global/config/SecurityConfig.java (5 hunks)
  • src/main/java/org/example/howareyou/global/config/WebConfig.java (1 hunks)
  • src/main/java/org/example/howareyou/global/exception/GlobalExceptionHandler.java (1 hunks)
  • src/main/java/org/example/howareyou/global/health/ApiHealthCheckRunner.java (4 hunks)
  • src/main/java/org/example/howareyou/global/security/CustomMemberDetailsService.java (1 hunks)
  • src/main/java/org/example/howareyou/global/security/jwt/JwtAuthFilter.java (1 hunks)
  • src/main/java/org/example/howareyou/global/security/jwt/JwtTokenProvider.java (3 hunks)
  • src/main/java/org/example/howareyou/global/test/HealthCheckController.java (1 hunks)
  • src/main/java/org/example/howareyou/global/test/TestConsumer.java (1 hunks)
  • src/main/java/org/example/howareyou/global/test/TestController.java (3 hunks)
  • src/main/java/org/example/howareyou/global/test/TestDataInitializer.java (2 hunks)
  • src/main/resources/application-prod.yml (1 hunks)
  • src/main/resources/application.yml (4 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@taco-recipe taco-recipe merged commit de686a3 into dev Aug 23, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants