Skip to content

[SOU-490] 배포 환경 분리에 따른 디스코드 알림 수정#222

Merged
bum0w0 merged 1 commit intodevelopfrom
feat/SOU-490-discord-notify
Mar 12, 2026
Merged

[SOU-490] 배포 환경 분리에 따른 디스코드 알림 수정#222
bum0w0 merged 1 commit intodevelopfrom
feat/SOU-490-discord-notify

Conversation

@bum0w0
Copy link
Member

@bum0w0 bum0w0 commented Mar 12, 2026

Summary by CodeRabbit

릴리스 노트

  • 개선 사항
    • 배포, 롤백, 서버 상태 모니터링, 디스크/메모리 경고, 컨테이너 중지 등 모든 알림이 배포 환경(개발/프로덕션)을 인식하도록 업데이트
    • 각 알림에 배포자, 커밋 메시지, 환경, 타임스탬프, 상태 등 더 풍부한 컨텍스트 정보 포함
    • 환경별로 적절한 Discord 웹훅 엔드포인트으로 알림 전송

@bum0w0 bum0w0 added ci/cd 빌드, 배포, 워크플로우(파이프라인) 등 CI/CD 설정 변경에 사용합니다. feat 기존 기능을 개선하거나 새로운 기능을 추가하는 경우에 사용합니다. and removed ci/cd 빌드, 배포, 워크플로우(파이프라인) 등 CI/CD 설정 변경에 사용합니다. labels Mar 12, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Caution

Review failed

Pull request was closed or merged during review

개요

deploy/shared/discord-notify.sh 스크립트를 리팩토링하여 환경 인식 라우팅과 더욱 풍부한 컨텍스트를 Discord 알림에 도입합니다. 모든 알림 함수에 환경 매개변수를 추가하고, 환경별 웹훅 선택을 중앙화하며, jq를 통한 페이로드 생성을 표준화합니다.

변경사항

클래스터/파일 요약
Discord 알림 환경 인식화
deploy/shared/discord-notify.sh
환경 인식 라우팅을 도입하여 dev/prod 웹훅을 자동 선택하고, 모든 notify_* 함수에 선택적 env 매개변수(기본값: "dev")를 추가. 작업 디렉토리 상수(DEV_WORK_DIR, PROD_WORK_DIR)와 get_workdir() 함수 도입. notify_deploy_success에 commit_message, deployer, env 필드 추가. 페이로드 생성을 jq 기반으로 리팩토링하고 모든 알림에 일관된 색상, 환경, 타임스탬프, 상태 정보 포함.

예상 코드 리뷰 난이도

🎯 4 (복잡) | ⏱️ ~45분

관련 PR

  • [SOU-471] 배포 시스템 분리 #188: 동일한 파일을 수정하며 notify_deploy_success와 관련 notify_* 함수들을 환경별 웹훅 선택 및 환경 매개변수 추가로 업데이트하는 직접적인 관련 PR
🚥 Pre-merge checks | ✅ 2 | ❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 풀 리퀘스트 제목은 변경사항의 핵심을 명확하게 설명합니다. Discord 알림 함수들의 환경 분리(dev/prod) 처리를 추가한 주요 변경사항을 정확히 반영합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/SOU-490-discord-notify
📝 Coding Plan for PR comments
  • Generate coding plan

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.

@bum0w0 bum0w0 merged commit 67c6dbb into develop Mar 12, 2026
3 of 4 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 602f5ef1d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 149 to +151
notify_server_up() {
local downtime=$1
local env=${1:-"dev"}
local downtime=$2

Choose a reason for hiding this comment

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

P1 Badge 기존 호출부와 맞게 notify 인자 순서를 유지하세요

notify_server_up, notify_disk_warning, notify_memory_warning의 파라미터 순서를 이번 커밋에서 env 우선으로 바꿨지만 호출부(deploy/shared/system-monitor.sh:62, :87, :100)는 기존 순서(다운타임/사용량 먼저, env 마지막)를 그대로 사용하고 있어 알림 값이 서로 뒤바뀝니다. 실제로 복구 알림의 환경 값이 "3분"처럼 잘못 표기되고, 디스크/메모리 경고도 퍼센트에 dev가 들어가는 형태로 깨져 운영 판단을 오도할 수 있으므로 시그니처를 호환되게 유지하거나 호출부를 함께 수정해야 합니다.

Useful? React with 👍 / 👎.

@bum0w0 bum0w0 deleted the feat/SOU-490-discord-notify branch March 14, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기존 기능을 개선하거나 새로운 기능을 추가하는 경우에 사용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant