-
Notifications
You must be signed in to change notification settings - Fork 0
[FIX] comment type의 값으로 저장하도록 수정 #164
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 @Ochangmin524, 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! 이 PR은 댓글 유형( Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
🤖 Gemini AI 코드 리뷰❌ Gemini API 호출 실패: 최대 재시도 횟수 초과 이 리뷰는 Gemini AI가 자동으로 생성했습니다. 참고용으로만 활용해주세요. |
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의 주된 변경 사항인 comment_type 저장 오류 수정은 올바르게 이루어졌습니다. Enum 멤버 자체가 아닌 .value를 사용하여 데이터베이스 제약 조건에 맞는 값을 저장하도록 변경한 것은 적절한 해결책입니다. 리뷰 중 관련 코드에서 발견된 잠재적인 IndexError 발생 가능성에 대한 의견을 남겼으니 확인 부탁드립니다.
| comments_to_save.append({ | ||
| "comment_type": emotion, | ||
| "comment_type": emotion.value, | ||
| "content": content, | ||
| "report_id": comments[0].report_id | ||
| }) |
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.
이 코드 블록의 55번째 줄(report_id: comments[0].report_id)에서 IndexError가 발생할 수 있습니다. comments 리스트가 비어있을 때 rag_service.summarize_comments가 요약 결과를 반환하면, 이 코드가 실행되면서 오류가 발생할 수 있습니다.
for 루프 초반에 if not comments: continue와 같은 가드 구문을 추가하여 comments 리스트가 비어있는 경우를 건너뛰는 것을 권장합니다. 이 부분은 PR의 직접적인 변경 사항은 아니지만, 관련된 로직에서 심각한 오류를 유발할 수 있으므로 수정이 필요해 보입니다.
wlswnsdn
left a 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.
빠른 대응 감사합니다!
🤖 Gemini AI 코드 리뷰❌ Gemini API 호출 실패: 최대 재시도 횟수 초과 이 리뷰는 Gemini AI가 자동으로 생성했습니다. 참고용으로만 활용해주세요. |
PR 제목
[Feat/Fix/Refactor/Docs/Chore 등]: 간결하게 변경 내용을 요약해주세요. (예: Feat: 사용자 로그인 기능 구현)
✨ 변경 유형 (하나 이상 선택)
📚 변경 내용
구체적으로 어떤 변경 사항이 있는지, 왜 이러한 변경이 필요한지 설명해주세요.
(예: 사용자 회원가입 시 이메일 중복 확인 로직 추가. 기존 로직에서 누락된 부분 발견하여 수정.)
ERROR:domain.comment.service.comment_service:💬 댓글 분석 실패 (42.38초): (sqlalchemy.dialects.postgresql.asyncpg.IntegrityError) <class 'asyncpg.exceptions.CheckViolationError'>: new row for relation "comment" violates check constraint "comment_comment_type_check"
DETAIL: Failing row contains (2026-01-07 18:01:11.101931, 141, 58, 2026-01-07 18:01:11.101944, ADVICE, 댓글에서 많은 사용자들이 최적화 과정에 대한 ...).
실제 로그 상에서 sql에서 ADVICE_OPTION이 아닌 ADVICE로 sql이 날라와서,
저장할 때, emotion이 아닌, emotion.value로 하도록 수정했습니다.
제 채널에는 자막이 있는 영상이 없어서,, 로컬 상에서는 테스트를 못했습니다...
⚙️ 주요 작업 (선택 사항)
✅ 체크리스트
🔗 관련 이슈 (선택 사항)
해당 PR이 해결하는 이슈 또는 관련 있는 이슈가 있다면 링크를 걸어주세요.
(예: #123, ABC-456)
💬 기타 (선택 사항)
리뷰어에게 전달하고 싶은 추가 정보나 궁금한 점이 있다면 작성해주세요.