Feat/67/press-defect-data-simulator-service#71
Conversation
이벤트 기반 아키텍처 지원을 위해 Spring Boot 서비스 관련 설정을 추가했습니다. 또한, 'direct'와 'event_driven' 모드를 선택할 수 있는 'architecture_mode' 설정을 도입하여 유연성을 확보했습니다. 관련 설정 검증 및 상태 조회 로직도 함께 업데이트했습니다.
- Spring Boot 서비스와 통신하기 위한 비동기 클라이언트 클래스를 추가했습니다. - 이 클라이언트는 이벤트 기반 아키텍처를 지원하며, 원시 데이터를 Spring Boot 엔드포인트로 전송하는 기능을 구현합니다. - 또한, 연결 테스트, 헬스체크, 재시도 로직 등을 포함하여 안정적인 통신을 보장합니다.
- 이벤트 기반 아키텍처를 지원하기 위해 스케줄러 서비스에 모드별 분기 로직을 추가했습니다. - 'event_driven' 모드에서는 Spring Boot 클라이언트를 통해 데이터를 전송하도록 변경하고, 'direct' 모드에서는 기존의 FastAPI 모델 서비스로 직접 호출하도록 유지했습니다. - 또한, 새로운 모드에 맞춰 서비스 초기화 및 헬스체크 로직을 업데이트하여 유연성을 확보했습니다.
Add azure_storage_service.initialize() call before test_connection() in main.py to prevent false connection failures during app startup
API 및 모델 서비스에 대한 대기 시간을 300초(5분)로 통일하여 일관성을 확보.
…client Spring Boot 서비스 클라이언트에 디버깅용 로그, 오류 처리 및 재시도 로직을 추가. 연결 상태 확인, 전송 실패 원인 파악이 용이하도록 개선.
|
Caution Review failedThe pull request is closed. WalkthroughAdds an event-driven architecture mode alongside direct calls in the simulator. Extends settings with Spring Boot configuration, integrates a new SpringBoot client, and updates the scheduler to branch execution and health checks by mode. Adjusts imports to app.* namespace, tweaks startup initialization, and surfaces mode/status in summaries and stats. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User/Trigger
participant F as FastAPI App
participant AZ as AzureStorageService
participant SCH as SchedulerService
participant SB as SpringBootClient
participant MS as ModelServiceClient
rect rgba(200,220,255,0.2)
note right of F: Startup
U->>F: Start app
F->>AZ: initialize()
AZ-->>F: ready/False
F->>AZ: test_connection()
AZ-->>F: available/False
F->>SCH: initialize_services()
alt architecture_mode == "event_driven"
SCH->>SB: test_connection() / check_service_health()
SB-->>SCH: availability/health
SCH-->>F: spring_boot_ready
else architecture_mode == "direct"
SCH->>MS: test_connection() / model readiness
MS-->>SCH: availability/ready
SCH-->>F: model_ready
end
end
rect rgba(200,255,200,0.2)
note right of SCH: Execution
U->>SCH: execute_single_simulation(inspectionId, images)
alt Event-driven
SCH->>SB: send_raw_data(inspectionId, images)
SB-->>SCH: (success,data) or (failure,error)
SCH-->>U: result (mode=event_driven)
else Direct
SCH->>MS: predict_inspection(images)
MS-->>SCH: prediction/result
SCH-->>U: result (mode=direct)
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (10)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
🤖 Smart FAST 자동 코드 리뷰📦 변경된 서비스 (2개):
🔍 Git diff를 통해 서비스 감지됨 📊 전체 검사 결과:🧪 테스트 & 코드 품질 결과:🔒 보안 스캔 결과:
✅ 검사 체크리스트:
🚀 배포 정보:
|
✨ Description
✅ Task
✅ Test Result
예: 모든 테스트 통과 / 새로운 테스트 케이스 추가 등
📸 Screenshot (선택)
📌 Etc
Summary by CodeRabbit