Skip to content

Comments

[FIX] 부품 주문 이벤트 컬럼 수정#31

Merged
taemin3 merged 1 commit intomainfrom
SPM-462
Nov 9, 2025
Merged

[FIX] 부품 주문 이벤트 컬럼 수정#31
taemin3 merged 1 commit intomainfrom
SPM-462

Conversation

@taemin3
Copy link
Contributor

@taemin3 taemin3 commented Nov 9, 2025

📝 Summary

  • 부품 주문 이벤트 컬럼 수정

🙏 Question & PR point

📬 Reference

Summary by CodeRabbit

릴리스 노트

  • 리팩터링
    • 부품 주문 이벤트의 식별자 필드 구조가 정리되었습니다.
    • 이벤트 페이로드 생성 로직 및 로깅 메커니즘이 업데이트되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Nov 9, 2025

요약 (Walkthrough)

PartOrderEvent.Payload에서 externalPartOrderId 필드를 제거하고, PartOrderEventService에서 해당 필드를 사용하는 생성자 호출 및 로깅을 수정하여 partOrderId를 기본 식별자로 사용하도록 변경합니다.

변경 사항 (Changes)

응집도 / 파일 변경 요약
이벤트 페이로드 구조 수정
src/main/java/com/sampoom/factory/api/part/event/PartOrderEvent.java
PartOrderEvent.Payload 레코드에서 Long externalPartOrderId 필드 제거
이벤트 서비스 업데이트
src/main/java/com/sampoom/factory/api/part/service/PartOrderEventService.java
Payload 생성자 호출 시 externalPartOrderId 파라미터 제거 및 로깅 업데이트 (partOrderId 사용)

예상 코드 검토 난이도

🎯 2 (Simple) | ⏱️ ~8분

  • PartOrderEvent.Payload 레코드의 필드 제거 및 영향 범위 확인
  • PartOrderEventService에서 Payload 생성자 호출 및 로깅 변경 사항 검증

관련 가능성 있는 PR

제안 라벨

ready-to-merge

제안 검토자

  • Sangyoon98
  • Lee-Jong-Jin
  • CHOOSLA
  • yangjiseonn
  • vivivim

시 (Poem)

🐰 필드 하나 줄어들고,
아이디 정렬이 깔끔하네,
로그는 명확해졌고,
페이로드는 경량화되었도다.
간결함이 최고의 미덕! 🎯

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 관련이 있으며, 부품 주문 이벤트의 컬럼 수정이라는 핵심 변경을 명확하게 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 SPM-462

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@yangjiseonn yangjiseonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
src/main/java/com/sampoom/factory/api/part/service/PartOrderEventService.java (1)

109-111: 디버그 로그 메시지가 혼란을 줄 수 있습니다.

로그 메시지에서는 "partOrderId"를 확인한다고 하지만, 실제로 이 값은 externalPartOrderId를 담고 있습니다. 이는 디버깅 시 혼란을 야기할 수 있으므로, 로그 메시지를 실제 값과 일치하도록 수정하는 것이 좋습니다.

다음과 같이 로그 메시지를 수정하세요:

-            // 디버깅: 최종 이벤트 페이로드의 partOrderId 확인
-            log.info("디버깅 - 최종 이벤트 페이로드 partOrderId: {}",
+            // 디버깅: 최종 이벤트 페이로드의 partOrderId(externalPartOrderId 값) 확인
+            log.info("디버깅 - 최종 이벤트 페이로드 partOrderId(externalPartOrderId 값): {}",
                     evt.payload().partOrderId());

또는 더 명확하게:

-            // 디버깅: 최종 이벤트 페이로드의 partOrderId 확인
-            log.info("디버깅 - 최종 이벤트 페이로드 partOrderId: {}",
+            // 디버깅: 최종 이벤트 페이로드 확인 (partOrderId 필드에 externalPartOrderId 값 저장)
+            log.info("디버깅 - 최종 이벤트 페이로드 확인: {}",
                     evt.payload().partOrderId());
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd1001a and 5986a8e.

📒 Files selected for processing (2)
  • src/main/java/com/sampoom/factory/api/part/event/PartOrderEvent.java (0 hunks)
  • src/main/java/com/sampoom/factory/api/part/service/PartOrderEventService.java (2 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/com/sampoom/factory/api/part/event/PartOrderEvent.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: Analyze (java-kotlin)
🔇 Additional comments (1)
src/main/java/com/sampoom/factory/api/part/service/PartOrderEventService.java (1)

86-107: 이벤트 페이로드의 partOrderId 필드 의미 변경으로 인한 하위 시스템 호환성 확인 필요

PartOrderEvent.PayloadpartOrderId 필드에 내부 ID(id) 대신 externalPartOrderId 값을 전달하고 있습니다. 이는 이 이벤트를 소비하는 하위 시스템에 영향을 주는 중요한 변경사항입니다.

다음을 확인하세요:

  • 이 이벤트를 소비하는 모든 시스템(Kafka 구독자, 외부 API 소비자 등)이 partOrderId가 내부 ID가 아닌 외부 ID를 포함한다는 점을 인식하고 있는지 확인
  • 필요시 내부 id 값도 페이로드에 추가하여 하위 호환성 유지 검토
  • 기존 데이터와의 호환성 문제가 없는지 확인

@taemin3 taemin3 merged commit 672b246 into main Nov 9, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants