-
Notifications
You must be signed in to change notification settings - Fork 1
[REFACTOR] : health check 시간 수정 및 job 분리 #248
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
Conversation
Walkthrough이번 PR은 GitHub Actions 워크플로우에 새로운 CI 작업들을 추가 및 수정합니다. 기존의 배포 작업 후 실행되는 API 헬스 체크 로직을 업데이트하여, 20초 대기 후 Changes
Sequence Diagram(s)sequenceDiagram
participant D as Deploy
participant HC as HealthCheck
participant SN as SlackNotify
D->>HC: 배포 완료 신호 전송
HC->>HC: 20초 대기 후 curl 실행, 헬스 체크 수행
HC-->>SN: 헬스 체크 결과 전송 (타임아웃 포함)
D-->>SN: 배포 상태(DEPLOY_STATUS) 전송
SN->>Slack: 슬랙 알림 발송
Possibly related PRs
Suggested reviewers
Poem
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:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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/backend-cd-dev.yml (1)
6-6: 분기 필터링 조건 확인:
현재 브랜치 필터가"develop"으로 설정되어 있습니다. PR 닫힘 이벤트가 오직 develop 브랜치에 대해서만 트리거되는 것이 의도한 동작인지 확인해주시기 바랍니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/backend-cd-dev.yml(4 hunks)
🔇 Additional comments (4)
.github/workflows/backend-cd-dev.yml (4)
17-19: SSH 접속 파라미터 검증:
SSH 접속에 필요한host,username,password가secrets를 통해 안전하게 관리되고 있습니다. 해당 파라미터의 변경사항은 보안 및 기능 측면에서 문제 없어 보입니다.
34-53: Health Check Job 로직 점검:
새로 추가된health_checkjob이deployjob 후에 실행되며, 20초 대기 후 API 헬스 체크를 수행합니다.
sleep 20를 통해 컨테이너 시작 대기 시간을 늘린 점이 PR 목표와 부합합니다.curl명령어에--max-time 10옵션을 사용하여 타임아웃을 효과적으로 처리한 점도 좋습니다.- 반환되는 상태(
success,failure,timeout)를$GITHUB_OUTPUT에 기록하는 조건문 로직이 명확합니다.
55-90: Slack 알림 전송 Job 검토:
slack_notifyjob에서 배포(deploy) 및 헬스 체크(health_check) 결과를 활용하여 Slack 메시지를 구성하고 전송하고 있습니다.
- 환경 변수
HEALTH_STATUS와DEPLOY_STATUS를 올바르게 참조하여 결과에 따른 분기 처리가 구현되었습니다.- 배포 성공 시 헬스 체크 상태에 따라 메시지 색상(
BASE_COLOR)과 텍스트(DEPLOY_TEXT,HEALTH_TEXT)가 적절히 설정됩니다.
다만,"needs.deploy.result"가 실제 배포 결과를 정확하게 반영하는지 추가로 확인해주시기 바랍니다.
97-137: Slack 페이로드 구성 및 알림 전송 검토:
JSON 페이로드가 Slack 알림 메시지로 적절하게 구성되어 있습니다.
- 배포 타입, 헬스 체크 결과, 커밋 메시지, 브랜치, 워크플로 URL, 그리고 병합 시간 등이 포함되어 있어 정보를 명확하게 전달합니다.
cat <<EOF를 이용한 페이로드 구성 및curl을 통한 POST 요청 처리 로직도 올바르게 구현되었습니다.
전체적으로 변경 사항이 PR 목적(헬스 체크 시간 수정 및 작업 분리)에 부합합니다.
📌 관련 이슈
#247
✒️ 작업 내용
💬 REVIEWER에게 요구사항 💬
Summary by CodeRabbit