-
Notifications
You must be signed in to change notification settings - Fork 3
hotfix: 테스트케이스 init 수신 안 되는 현상 수정 #129
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Caution Review failedThe pull request is closed. ## Walkthrough
이 변경사항은 제출 관련 이벤트와 WebSocket 메시지 전송 방식에 사용자 식별 정보를 추가하고, 메시지 라우팅을 일반 topic에서 사용자별 queue로 전환합니다. 주요 이벤트 객체에 principalName 필드를 추가하고, 관련 서비스 및 리스너, 프론트엔드 구독 경로를 사용자별로 변경하였습니다.
## Changes
| 파일/경로 요약 | 변경 요약 |
|----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| .../dto/event/GitPushStatusEvent.java<br>.../dto/event/SubmissionJudgingFinishedEvent.java<br>.../dto/event/TestcaseEvaluatedEvent.java<br>.../dto/event/TestcaseListInitializedEvent.java | 각 이벤트 record에 principalName 필드 추가 및 static factory 메서드가 SubmissionContext를 인자로 받도록 변경 |
| .../dto/event/SubmissionErrorEvent.java | resolveCode 메서드의 공백 및 캐스팅 부분 코드 스타일 정리 |
| .../model/SubmissionContext.java | getUserEmail() 메서드 추가 |
| .../service/GitHubPushService.java<br>.../service/JudgementService.java | 이벤트 객체 생성 시 sessionKey 대신 SubmissionContext 전달로 변경 |
| .../service/SubmissionService.java | createSubmissionContext 메서드 위치 이동(기능 변화 없음) |
| .../infrastructure/event/listener/SubmissionEventListener.java | 메시지 서비스 호출 시 principalName 인자 추가 |
| .../infrastructure/event/publisher/StompMessageService.java | 메시지 전송 경로를 /topic/submission/%s → /queue/submission/%s로 변경, convertAndSendToUser 사용 및 principalName 파라미터 추가 |
| .../infrastructure/event/config/WebSocketConfig.java | Application destination prefixes에 "/app" 추가 |
| .../presentation/submission/SubmissionController.java | WebSocket 구독 경로 주석을 /topic → /user/queue로 변경 |
| .../templates/submit-test.html | WebSocket 구독 base path를 /topic → /user/queue로 변경 |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant Client
participant WebSocket
participant SubmissionService
participant EventPublisher
participant StompMessageService
Client->>WebSocket: 제출 요청
WebSocket->>SubmissionService: 제출 처리
SubmissionService->>EventPublisher: principalName 포함 이벤트 생성 및 발행
EventPublisher->>StompMessageService: principalName 포함 메시지 전송 요청
StompMessageService->>WebSocket: convertAndSendToUser(principalName, /queue/submission/{sessionKey}, payload)
WebSocket->>Client: 사용자별 큐로 메시지 전달Suggested reviewers
Poem
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
테스트케이스 init 수신 안 되는 현상 수정
Summary by CodeRabbit
신규 기능
기능 개선
/topic/submission/{sessionKey}에서/user/queue/submission/{sessionKey}로 변경되어 보안성과 개인화가 강화되었습니다.문서