-
Notifications
You must be signed in to change notification settings - Fork 2
[fix] 개발, 배포 환경에서 SSE 연결이 되지않는 문제 수정 #895
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| 변경 세트 / 파일 | 설명 |
|---|---|
SSE 버퍼링 최적화 backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java |
getApplicantStatusEvents 메서드에 HttpServletResponse 파라미터 추가; SSE 요청 응답에 버퍼링 비활성화 및 캐시 제어 헤더 설정; jakarta.servlet.http.HttpServletResponse 임포트 추가 |
예상 코드 리뷰 난이도
🎯 1 (간단함) | ⏱️ ~5분
- 단일 파일에 대한 제한적인 변경
- 메서드 시그니처 확장 및 헤더 설정으로 구성된 명확한 수정 사항
관련 이슈
- [fix] 개발, 배포 환경에서 SSE 연결이 되지않는 문제 수정 #894: SSE 버퍼링 문제 해결과 직접적으로 관련됨 — 동일한 SSE 엔드포인트에 대해
HttpServletResponse추가 및 버퍼링 헤더 설정을 통해 이슈의 목표를 달성합니다.
관련 PR
- [Feature] 지원자의 지원서 상태를 실시간으로 공유한다. #791: 동일한
ClubApplyAdminControllerSSE 엔드포인트 메서드를 수정하므로 직접적으로 연관됨 — 이 PR이 해당 메서드의 시그니처를 업데이트하고 SSE 특화 헤더를 설정합니다.
추천 검토자
- Zepelown
- alsdddk
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목이 변경사항의 주요 내용과 정확히 일치합니다. SSE 연결 문제 수정이라는 핵심 변경사항을 명확하게 설명하고 있습니다. |
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
fix/bypass-proxy-buffering
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-05-19T05:45:52.957Z
Learnt from: lepitaaar
Repo: Moadong/moadong PR: 406
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:34-38
Timestamp: 2025-05-19T05:45:52.957Z
Learning: The code duplication between createClubApplication and editClubApplication methods in ClubApplyService.java is acknowledged but will be addressed in a future refactoring, as per the developer's plan.
Applied to files:
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
📚 Learning: 2025-09-30T05:26:41.788Z
Learnt from: alsdddk
Repo: Moadong/moadong PR: 765
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:431-435
Timestamp: 2025-09-30T05:26:41.788Z
Learning: In the Moadong codebase's club application feature (backend/src/main/java/moadong/club/), multiple ClubApplicationForm entities can have ACTIVE status for the same clubId, semesterYear, and semesterTerm simultaneously. There is no uniqueness constraint requiring only one ACTIVE form per semester.
Applied to files:
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test
🔇 Additional comments (2)
backend/src/main/java/moadong/club/controller/ClubApplyAdminController.java (2)
6-6: LGTM! 필요한 임포트가 올바르게 추가되었습니다.HttpServletResponse 임포트가 올바르게 추가되어 SSE 응답 헤더 설정을 지원합니다.
124-129: SSE headers correctly configured for Nginx reverse proxy; no other SSE endpoints found in codebase.Verification confirms the implementation is correct:
X-Accel-Buffering: noproperly disables Nginx proxy buffering to enable real-time event deliveryCache-Control: no-cachefollows SSE best practices- This is the only SSE endpoint in the codebase (no consistency issues elsewhere)
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 @coderabbitai help to get the list of available commands and usage tips.
Test Results68 tests 65 ✅ 19s ⏱️ Results for commit 6a764cf. |
|
SSE가 쓰일때 저런 문제가 있었군요.. 수고하셨습니다~ |
저도 처음알았습니다 ㅋㅋㅋ |
#️⃣연관된 이슈
#894
📝작업 내용
SSE 연결을 수립하는 응답 헤더에
X-Accel-Buffering: no를 추가했습니다.Nginx를 리버스 프록시로 사용하는 환경에서 SSE 통신 시, Nginx의 기본 버퍼링 설정 때문에 클라이언트가 이벤트를 실시간으로 받지 못하는 문제가 있었습니다.
Nginx는 백엔드 서버의 응답 헤더에
X-Accel-Buffering: no가 포함되어 있으면, 해당 응답에 대해 프록시 버퍼링을 비활성화하고 데이터를 즉시 클라이언트로 전송합니다.헤더가 추가된모습
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
버그 수정
✏️ Tip: You can customize this high-level summary in your review settings.