Skip to content

Conversation

@jj0526
Copy link
Collaborator

@jj0526 jj0526 commented Nov 17, 2025

Related issue 🛠

  • x

작업 내용 💻

  • 컨테이너 실패 시 로그 처리 및 삭제 로직을 추가하였습니다

스크린샷 📷

  • 로컬컬 테스트
image

같이 얘기해보고 싶은 내용이 있다면 작성 📢

  • x

Summary by CodeRabbit

  • Chores
    • 배포 헬스 체크 실패 시 상세한 로깅 및 롤백 프로세스 추가. 헬스 체크 실패가 10회 발생했을 때 자동으로 실패 메시지, 컨테이너 로그를 기록하고 안정성을 위해 적절한 정리 절차를 수행합니다.

@jj0526 jj0526 self-assigned this Nov 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 17, 2025

Walkthrough

.github/workflows/dev.yml 파일의 배포 헬스 체크 실패 브랜치에 로깅 및 롤백 단계가 추가되었습니다. 10회 이상의 실패한 헬스 체크 시도 후 실패 메시지 출력, Docker 로그 출력, 컨테이너 중지 및 제거, 롤백 확인 메시지 출력이 추가되었습니다.

Changes

Cohort / File(s) Change Summary
Workflow Health-Check Failure Handling
\.github/workflows/dev\.yml
헬스 체크 실패 시 디버깅 로그 출력 및 컨테이너 정리 절차 추가: 실패 메시지 로깅, Spring 컨테이너의 Docker 로그 출력, 컨테이너 중지 및 제거, 롤백 확인 메시지 출력

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • 추가된 단계들이 모두 같은 패턴의 로깅 및 정리 작업으로, 기존 워크플로우 구조 내에서의 선형적 추가
  • 복잡한 로직이나 조건부 분기가 없으며, 주로 명령어와 메시지 추가

Poem

🐰 헬스 체크가 실패해도 괜찮아,
로그를 남기고 정리하니까!
열 번 실패하면 우아하게 롤백,
워크플로우는 더욱 탄탄해졌네요! 🔄✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 PR의 주요 변경사항인 컨테이너 실패 시 삭제 로직 추가를 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으나, Related issue 섹션이 미작성 상태('x')이고 같이 얘기해보고 싶은 내용도 미작성입니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch LNK-30-Leenk-컨테이너-실패-시-삭제-로직-추가

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

@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: 0

🧹 Nitpick comments (1)
.github/workflows/dev.yml (1)

100-111: 배포 실패 시 스택 상태 검증 권장.

현재 구현은 AFTER_COLOR 컨테이너 정리는 완벽하지만, 다음을 고려하면 더 견고할 것 같습니다:

  • 롤백 후 BEFORE_COLOR 컨테이너가 정상 상태인지 확인
  • 필요시 Caddy 설정이 이전 포트를 가리키고 있는지 확인

현재 구현도 충분히 안전하지만, 중요한 프로덕션 배포인 경우 추가 검증을 고려해볼 수 있습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a60b56f and fa130e4.

📒 Files selected for processing (1)
  • .github/workflows/dev.yml (1 hunks)
🔇 Additional comments (1)
.github/workflows/dev.yml (1)

103-109: 컨테이너 실패 시 정리 로직이 올바르게 구현됨.

헬스 체크 실패 시 로그 출력 및 컨테이너 정리 순서가 적절합니다:

  • docker logs|| true를 사용하여 로그가 없는 경우에도 스크립트 실패 방지
  • docker-compose stop으로 먼저 컨테이너 중지
  • docker-compose rm -f로 컨테이너 강제 삭제
  • 기존 컨테이너(BEFORE_COLOR)는 유지되므로 올바른 롤백 동작

Copy link
Collaborator

@soo0711 soo0711 left a comment

Choose a reason for hiding this comment

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

수고하셨습니닷! 👍

@jj0526 jj0526 merged commit ae4da13 into dev Nov 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants