promote 에 dev→prod 직접 승격 옵션 추가 (staging 중단 대응) - #666
Conversation
- staging EC2 중단 기간 동안 dev 변경을 prod 로 배포하려면 dev→staging→prod 체인을 못 타는 문제 - workflow_dispatch 에 to_prod boolean 입력 추가. dev 브랜치 + to_prod=true → dev→main(prod) 직접 승격(prod 버전 bump 적용). 기본 false 라 평소 dev→staging 유지 - ff-only 라 순서 안전: 나중 staging 복구 후 dev→staging→prod 도 전부 ff 로 흡수
|
Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다. |
Walkthroughpromote.yml 워크플로우에 workflow_dispatch 입력 to_prod(boolean, 기본 false)를 추가했습니다. dev 브랜치 실행 시 to_prod=true이면 staging을 건너뛰고 dev→main(prod)으로 직접 승격하며, 기존 dev→staging, staging→main(prod) 경로는 유지됩니다. 에러 메시지 문구도 갱신했습니다. ChangesPromote 워크플로우 to_prod 옵션
Estimated code review effort: 2 (Simple) | ~10분 Sequence Diagram(s)해당 없음(단일 워크플로우 파일 내 분기 로직 변경으로, 3개 이상의 독립 컴포넌트 상호작용이 없어 시퀀스 다이어그램 생성 조건에 부합하지 않습니다). Assessment against linked issues
요약: 로직 자체는 이슈 요구사항을 잘 따라가고 있네요, 짧고 굵게 👍. 다만 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/promote.yml (1)
54-61: 🩺 Stability & Availability | 🔵 Trivial분기 로직 자체는 정확합니다 — 다만 "staging 검증 생략"을 프로세스로 막아두면 더 안전합니다.
case분기와 ff-only(라인 122) 조합 덕분에 순서 안전성은 잘 지켜집니다. 직접dev→main후 staging 복구 시에도, dev는 항상 앞으로만 이동하므로dev→staging으로 staging을 main 이상으로 끌어올린 뒤staging→main이 fast-forward로 성공합니다. 되돌아오지 못하는 상황이 없다는 점, 설계가 깔끔하네요.다만 이 경로는 staging 검증 단계를 건너뛰고 prod로 직행한다는 게 핵심 리스크입니다.
to_prod=true가 실수로(또는 downtime 종료 후에도 습관적으로) 켜지면 검증되지 않은 dev 커밋이 그대로 prod에 배포됩니다. 코드로 조건을 더 거는 것보다, 운영 차원의 가드가 효과적입니다.
promotejob(또는 최소한 prod 경로)에 GitHub Environment(environment: production)를 붙이고 required reviewers를 설정하면,to_prod=true직행 시에도 최종 배포 전에 수동 승인 게이트가 한 번 걸립니다. staging 우회의 안전망으로 적합합니다.- 참고: Using environments for deployment
또한 직접 승격 직후 staging이 돌아온 첫
staging→main실행은 staging이 main보다 뒤처져 있으면 non-ff(422)로 실패하며 실패 Discord 알림이 발송됩니다(설계상 안전한 차단이지만 알림 노이즈). 운영 노트나 안내 문구에 이 흐름을 한 줄 남겨두면 팀이 당황하지 않을 것 같습니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/promote.yml around lines 54 - 61, The promote workflow currently allows the dev-to-prod fast path when to_prod=true, which can bypass staging validation. Update the promote job to use a protected GitHub Environment for the production path, ideally by setting environment: production on the relevant job or prod branch of the promote workflow. Configure required reviewers or an approval gate so the direct dev→main route in promote.yml cannot deploy without an explicit human check, while leaving the normal staging path unchanged.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/promote.yml:
- Around line 54-61: The promote workflow currently allows the dev-to-prod fast
path when to_prod=true, which can bypass staging validation. Update the promote
job to use a protected GitHub Environment for the production path, ideally by
setting environment: production on the relevant job or prod branch of the
promote workflow. Configure required reviewers or an approval gate so the direct
dev→main route in promote.yml cannot deploy without an explicit human check,
while leaving the normal staging path unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 0adf2d30-f9ab-4cdd-871f-b1604b4fb3e4
📒 Files selected for processing (1)
.github/workflows/promote.yml
Situation
Task
Action
workflow_dispatch에to_prodboolean 입력 추가. dev 브랜치 + to_prod=true → dev→main(prod) 직접 승격 (S=dev·D=main·E=prod, prod 버전 bump 적용). 기본 false 라 평소 dev→staging 동작 유지.Result
연관 이슈
Summary by CodeRabbit
New Features
Bug Fixes