Skip to content

🔀 :: [#837] - 배포 이벤트 리스너 수정 - #838

Merged
dolong2 merged 2 commits into
developfrom
fix/deploy-event-listener
Sep 5, 2026
Merged

dolong2 merged 2 commits into
developfrom
fix/deploy-event-listener

Conversation

@dolong2

@dolong2 dolong2 commented Sep 5, 2026

Copy link
Copy Markdown
Owner

개요

  • 배포 이벤트 처리시 타임아웃이 발생할 수 있는 부분을 수정합니다.

작업내용

  • 배포 이벤트 처리시 기존에 존재하던 이미지및 컨테이너 정리 로직을 비동기로 처리하도록 수정
  • 불필요한 suspend 키워드가 있던 부분 제거

체크리스트

탬플릿외에 필요한 항목이 있으면 추가해주세요.

  • 로컬에서 빌드가 성공하나요?
  • 추가(수정)한 코드가 정상적으로 동작하나요?
  • pr 타켓 브랜치가 맞게 설정되어 있나요?
  • pr에서 작업할 내용만 작업됐나요?
  • 기존 API와 호환되지 않는 사항이 있나요?

Summary by CodeRabbit

  • 개선 사항
    • 애플리케이션 배포 후 컨테이너 및 이미지 정리와 상태 갱신이 비동기 작업으로 순차 처리되도록 개선했습니다.
    • 애플리케이션 새로고침 및 파일·디렉터리 처리 흐름을 단순화해 작업 처리가 일관되도록 조정했습니다.
    • 파일 생성과 디렉터리 삭제 작업의 불필요한 비동기 래핑을 제거해 처리 구조를 간소화했습니다.

@dolong2 dolong2 self-assigned this Sep 5, 2026
@dolong2 dolong2 added 🐛 Bug 버그 발생!! 1️⃣ Priority: 상 우선순위 상 labels Sep 5, 2026
@dolong2 dolong2 linked an issue Sep 5, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: e487dabe-95c8-4d13-8c5f-1a91d88669f4

📥 Commits

Reviewing files that changed from the base of the PR and between d818e4b and 2f44b9e.

📒 Files selected for processing (7)
  • src/main/kotlin/com/dcd/server/core/domain/application/event/listener/ApplicationEventListener.kt
  • src/main/kotlin/com/dcd/server/core/domain/application/service/DeleteApplicationDirectoryService.kt
  • src/main/kotlin/com/dcd/server/core/domain/application/service/RefreshApplicationService.kt
  • src/main/kotlin/com/dcd/server/core/domain/application/service/impl/DeleteApplicationDirectoryServiceImpl.kt
  • src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt
  • src/main/kotlin/com/dcd/server/core/domain/application/spi/ApplicationImageFilePort.kt
  • src/main/kotlin/com/dcd/server/infrastructure/domain/application/adapter/ApplicationImageFileAdapter.kt

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

애플리케이션 갱신, 디렉터리 삭제, 이미지 파일 생성을 일반 함수로 변경했습니다. 배포 이벤트의 컨테이너와 이미지 삭제는 IO 코루틴 내부에서 갱신 및 상태 저장과 순차적으로 실행합니다.

Changes

애플리케이션 실행 흐름

Layer / File(s) Summary
애플리케이션 서비스 동기화
src/main/kotlin/com/dcd/server/core/domain/application/service/*, src/main/kotlin/com/dcd/server/core/domain/application/service/impl/*
deleteApplicationDirectoryrefresh에서 suspend를 제거했습니다. 디렉터리 삭제는 호출 스레드에서 실행합니다. 기존 실패 이벤트 발행과 예외 재전파 처리는 유지합니다.
이미지 파일 생성 동기화
src/main/kotlin/com/dcd/server/core/domain/application/spi/ApplicationImageFilePort.kt, src/main/kotlin/com/dcd/server/infrastructure/domain/application/adapter/ApplicationImageFileAdapter.kt
createImageFile에서 suspendwithContext(Dispatchers.IO)를 제거했습니다. 파일 생성 로직을 메서드에 통합했습니다.
배포 이벤트 코루틴 실행
src/main/kotlin/com/dcd/server/core/domain/application/event/listener/ApplicationEventListener.kt
컨테이너 삭제와 이미지 삭제를 IO 코루틴 내부로 이동했습니다. 삭제, 갱신, 상태 저장을 코루틴 안에서 순차 실행합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 2f44b

Deployment cleanup and refresh now execute asynchronously on the IO dispatcher while preserving their sequence. No actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant ApplicationEventListener
  participant containerPort
  participant RefreshApplicationServiceImpl
  ApplicationEventListener->>ApplicationEventListener: IO 코루틴 시작
  ApplicationEventListener->>containerPort: 컨테이너와 이미지 삭제
  ApplicationEventListener->>RefreshApplicationServiceImpl: 애플리케이션 갱신
  RefreshApplicationServiceImpl-->>ApplicationEventListener: 갱신 완료
Loading

Poem

토끼가 코루틴 둥지를 짓고
삭제 작업을 안으로 옮겼네
이미지와 컨테이너가 사라지고
갱신 함수는 곧게 달리네
파일도 차분히 생성되고
상태는 순서대로 기록되네

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 배포 이벤트 리스너의 변경을 명확하게 설명합니다. PR의 주요 변경 범위인 타임아웃 수정과 비동기 정리 로직 변경에도 직접 관련됩니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deploy-event-listener

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.

@dolong2
dolong2 merged commit 51aeb12 into develop Sep 5, 2026
2 checks passed
@dolong2
dolong2 deleted the fix/deploy-event-listener branch September 5, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug 버그 발생!! 1️⃣ Priority: 상 우선순위 상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

베포 이벤트 리스너 수정

1 participant