-
Notifications
You must be signed in to change notification settings - Fork 0
SCRUM-122 예약 내역에 수정이 생기면 알림이 발송 된다 #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @unifolio0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 예약 내역 변경 시 알림 발송 기능을 확장하기 위한 초기 단계로, 알림 메시지 헤더에서 불필요한 필드를 제거하고, 예약 확인, 업데이트, 취소와 관련된 새로운 알림 유형을 추가합니다. 이는 향후 예약 상태 변화에 따른 다양한 알림을 처리할 수 있는 기반을 마련합니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Rate limit exceeded@unifolio0 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 14 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Walkthrough메시지 헤더 DTO에서 Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant WebPushService as WebPushService
participant WebPushSender as WebPushSender
participant PushService as PushServiceBean
note over PushServiceBean: Production: provided by WebPushConfig\nTest: provided by WebPushTestConfig (mock)
Client->>WebPushService: 요청 (알림 전송)
WebPushService->>WebPushSender: build/prepare push message
WebPushSender->>PushServiceBean: send(pushMessage)
PushServiceBean-->>WebPushSender: send result / exception
WebPushSender-->>WebPushService: 결과 반환
WebPushService-->>Client: 응답
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
이 PR은 예약 상태 변경(확인, 수정, 취소)에 따른 알림을 발송하기 위해 NotificationType에 새로운 열거형 상수를 추가하고, MessageHeader에서 더 이상 사용되지 않는 source 필드를 제거하는 변경 사항을 포함하고 있습니다. 제출된 코드 변경 자체는 명확하고 올바릅니다.
다만, 관련 코드를 검토하던 중 NotificationSender 클래스의 send 메소드에서 잠재적인 문제를 발견했습니다. notificationHistoryRepository.save(history) 호출이 for 루프 내부에 위치하여, 한 명의 사용자가 여러 알림 채널을 활성화한 경우 알림 기록이 중복으로 저장될 수 있습니다. 이는 데이터 정합성 문제를 일으키거나 런타임 예외를 발생시킬 수 있으므로, save 호출을 루프 밖으로 이동하는 것을 강력히 권장합니다. 이 PR의 범위에 포함되지는 않지만, 새로운 알림 유형이 이 로직을 통해 처리될 것이므로 함께 수정하는 것이 좋아 보입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/com/wellmeet/notification/consumer/dto/MessageHeader.java(0 hunks)src/main/java/com/wellmeet/notification/consumer/dto/NotificationType.java(1 hunks)
💤 Files with no reviewable changes (1)
- src/main/java/com/wellmeet/notification/consumer/dto/MessageHeader.java
| RESERVATION_CREATED, | ||
| RESERVATION_CONFIRMED, | ||
| RESERVATION_UPDATED, | ||
| RESERVATION_CANCELED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
예약 생명주기를 위한 알림 타입 추가가 적절합니다.
새로운 알림 타입들(RESERVATION_CONFIRMED, RESERVATION_UPDATED, RESERVATION_CANCELED)이 PR 목표와 일치하며, 네이밍 컨벤션도 올바르게 적용되었습니다.
다만 코드베이스 전체에서 이 새로운 알림 타입들을 올바르게 처리하는지 확인해 주세요. 특히 알림 소비자(consumer)와 생성자(producer) 쪽에서 모든 타입에 대한 처리 로직이 구현되어 있는지 검증이 필요합니다.
다음 스크립트를 실행하여 새로운 알림 타입의 사용처를 확인하세요:
🏁 Script executed:
#!/bin/bash
# Description: 새로운 NotificationType 상수들이 코드베이스에서 어떻게 사용되는지 확인
echo "=== RESERVATION_CONFIRMED 사용처 ==="
rg -n "RESERVATION_CONFIRMED" --type java -C 3
echo -e "\n=== RESERVATION_UPDATED 사용처 ==="
rg -n "RESERVATION_UPDATED" --type java -C 3
echo -e "\n=== RESERVATION_CANCELED 사용처 ==="
rg -n "RESERVATION_CANCELED" --type java -C 3
echo -e "\n=== NotificationType switch/if 분기 처리 ==="
rg -n "NotificationType\." --type java -A 10 | rg -A 10 "switch|case"Length of output: 1885
새 알림 타입에 대한 핸들링 로직 구현 필요
새로 추가된 RESERVATION_CONFIRMED, RESERVATION_UPDATED, RESERVATION_CANCELED 타입이 enum에만 정의되어 있으며, 알림 소비자·생성자 코드에서 해당 타입을 처리하는 분기나 핸들러가 없습니다. 각 이벤트에 맞춰 알림 발송·수신 로직을 구현해주세요.
🚩 Jira Ticket
SCRUM-122
🗣️ 리뷰 요구사항 (선택)
Summary by CodeRabbit