Skip to content

[IDLE-572] 읽음 처리 및 홈서버 이동 에러 수정#274

Merged
mjj111 merged 7 commits intodevelopfrom
fix/IDLE-574
May 19, 2025
Merged

[IDLE-572] 읽음 처리 및 홈서버 이동 에러 수정#274
mjj111 merged 7 commits intodevelopfrom
fix/IDLE-574

Conversation

@mjj111
Copy link
Copy Markdown
Member

@mjj111 mjj111 commented May 19, 2025

1. 📄 Summary

  • 홈서버 환경에서 도커 컨테이너 관리 및 NginX 설정 개선
  • Swagger 파일 인식 문제 해결
  • 채팅 메시지 읽음 처리 관련 테스트 코드 및 도메인 모듈 테스트 설정 추가
  • 불필요한 명령어 삭제 및 스크립트 최적화

Summary by CodeRabbit

  • 신규 기능

    • Swagger API 문서의 URL 및 프록시 환경 지원을 위한 설정이 추가되었습니다.
    • 테스트 환경에서 임베디드 Redis 서버와 H2 데이터베이스가 자동으로 구성됩니다.
  • 버그 수정

    • 채팅 메시지 읽음 알림이 수신자뿐만 아니라 읽은 사용자에게도 전송됩니다.
  • 개선사항

    • Docker Compose 및 배포 스크립트가 일부 환경에서 더 안정적으로 동작하도록 개선되었습니다.
    • 채팅 메시지 읽기 처리 시 ID 타입 일관성이 보장됩니다.
  • 테스트

    • 채팅 메시지 읽음 상태 변경에 대한 테스트가 추가되었습니다.
    • 테스트 환경 구성을 위한 설정 파일 및 클래스가 추가되었습니다.

@mjj111 mjj111 self-assigned this May 19, 2025
@mjj111 mjj111 added the 🛠️버그 버그 제보 및 해결 label May 19, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented May 19, 2025

Walkthrough

이 변경사항은 채팅 메시지 읽기 처리에서 UUID와 String 간의 변환을 명확히 하였고, 테스트 환경을 위한 설정과 의존성을 추가했습니다. 또한, Docker 및 배포 관련 스크립트와 설정 파일이 수정되었으며, Swagger 및 서버 프록시 설정이 보완되었습니다.

Changes

파일/경로 그룹 변경 요약
.github/workflows/dev-server-deployer.yaml
.github/workflows/prod-server-deployer.yaml
Docker Compose 및 컨테이너 관리 명령어 수정, 네트워크 옵션 및 환경 파일 경로 변경 등 배포 워크플로우 스크립트 개선
idle-application/src/main/kotlin/com/swm/idle/application/chat/domain/ChatMessageService.kt
idle-application/src/main/kotlin/com/swm/idle/application/chat/facade/ChatFacadeService.kt
채팅 메시지 읽기 관련 메서드에서 chatroomId와 opponentId를 String에서 UUID로 명시적으로 변환하도록 수정
idle-domain/build.gradle.kts Spring Boot JSON, Kotest, Testcontainers, H2, Embedded Redis 등 테스트 및 런타임 의존성 추가
idle-domain/src/test/kotlin/com/swm/idle/ChatTest.kt 채팅 메시지 읽기 상태 업데이트를 검증하는 새로운 테스트 클래스 추가
idle-domain/src/test/kotlin/com/swm/idle/config/DomainTestApplication.kt 도메인 레이어 테스트를 위한 Spring Boot 애플리케이션 클래스 추가
idle-domain/src/test/kotlin/com/swm/idle/config/EmbeddedRedisConfig.kt 테스트 환경에서 임베디드 Redis 서버를 관리하는 설정 클래스 추가
idle-domain/src/test/kotlin/com/swm/idle/config/ProjectConfig.kt Kotest와 Spring 통합을 위한 테스트 프로젝트 설정 객체 추가
idle-domain/src/test/resources/application-test.yml H2 데이터베이스, JPA, Redis 등 테스트 환경용 Spring Boot 설정 파일 추가
idle-presentation/compose-dev.yaml spring 서비스에 container_name 추가, 볼륨 및 pull_policy 옵션 제거, mysql 서비스의 커스텀 커맨드 제거
idle-presentation/src/main/kotlin/com/swm/idle/presentation/chat/handler/ChatHandler.kt 읽음 알림을 receiverId뿐만 아니라 readUserId에도 전송하도록 WebSocket 이벤트 핸들러 수정
idle-presentation/src/main/kotlin/com/swm/idle/presentation/common/config/SwaggerConfig.kt ForwardedHeaderFilter를 빈으로 등록하여 프록시 환경 지원 추가
idle-presentation/src/main/resources/application.yml 서버 forward-headers-strategy 및 Swagger UI API 문서 URL 명시적 설정 추가
idle-support/transfer/src/main/kotlin/com/swm/idle/support/transfer/chat/ReadChatMessagesReqeust.kt ReadChatMessagesReqeust의 chatroomId, opponentId 타입을 UUID에서 String으로 변경

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant ChatHandler
    participant ChatFacadeService
    participant ChatMessageService
    participant ChatMessageRepository
    participant WebSocket

    Client->>ChatHandler: handleReadMessage(ReadChatMessagesReqeust)
    ChatHandler->>ChatFacadeService: carerRead/centerRead(ReadChatMessagesReqeust)
    ChatFacadeService->>ChatMessageService: read(chatroomId as UUID, receiverId as UUID)
    ChatMessageService->>ChatMessageRepository: readByChatroomId(chatroomId: UUID, receiverId: UUID)
    ChatMessageRepository-->>ChatMessageService: 업데이트된 메시지 반환
    ChatMessageService-->>ChatFacadeService: 결과 반환
    ChatFacadeService-->>ChatHandler: 결과 반환
    ChatHandler->>WebSocket: send ReadNoti to /topic/chat/read/{receiverId}
    ChatHandler->>WebSocket: send ReadNoti to /topic/chat/read/{readUserId}
    WebSocket-->>Client: 읽음 알림 수신
Loading

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

Documentation and Community

  • 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.

@mjj111 mjj111 changed the title [IDLE-572] 읽음 처리 및 홈서버 이동 에러 수정 [IDLE-572] 읽음 처리 및 홈서버 이동 에러 수정 May 19, 2025
@sonarqubecloud
Copy link
Copy Markdown

coderabbitai[bot]

This comment was marked as resolved.

@mjj111 mjj111 merged commit e2191f0 into develop May 19, 2025
5 checks passed
@mjj111 mjj111 deleted the fix/IDLE-574 branch May 19, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️버그 버그 제보 및 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant