Skip to content

슬롯 판정·전환을 infra 공용 블록 소비로 전환 - #926

Merged
m-a-king merged 1 commit into
devfrom
refactor/consume-slot-blocks
Aug 11, 2026
Merged

슬롯 판정·전환을 infra 공용 블록 소비로 전환#926
m-a-king merged 1 commit into
devfrom
refactor/consume-slot-blocks

Conversation

@m-a-king

Copy link
Copy Markdown
Collaborator

Situation

Task

  • deploy.yml 두 스텝(배포·전환)의 인라인 판정·전환을 블록 호출로 대체하되 동작 등가를 유지한다.

Action

  • 슬롯 판정: 두 스텝의 인라인 grep 판정을 slot_decide.sh --slot-a blue:8080 --slot-b green:8081 호출 + "할당 후 eval" 소비로 대체. 상태 파일 부트스트랩(없으면 8080 초기화)은 종전 기본값 그대로 호출부에 유지.
  • 전환: tee + nginx -s reload 인라인을 slot_switch.sh --server "localhost:$INACTIVE_PORT" 로 대체. core 가 이 전환으로 처음 얻는 것:
종전 인라인 블록 전환 후
전환 실패 시 원복 없음 (상태·현실 괴리 잔존) -t·reload 실패 시 이전 upstream 자동 원복
reload 실패 시 그대로 실패 reload 실패 시 restart 폴백
nginx -t 사전 검증 없음 갱신 직후 -t 검증
  • 동작 등가 유지: upstream 라인 포맷(server localhost:PORT;)·구버전 teardown(레거시 team3-* 이름 포함)·healthcheck 값(60x5s)·요약 스텝의 포트 grep 전부 종전 그대로. 전환 실패 시 새 슬롯 컨테이너 정리는 호출부가 담당(블록은 컨테이너를 모른다).

Result

  • 판정·원복 로직의 정본이 infra 한 곳이 됐다 - 이후 개선은 별도 커밋 없이 core·extractor 양쪽에 반영된다.
  • dev 머지 시 자동 배포가 블록 경유 전환의 dev 실측 검증이 된다. prod 는 다음 promote 때 함께 나간다.
  • 검증: yaml 파싱, 두 스텝 스크립트 bash -n 통과, shellcheck 신규 경고 0. 블록 자체는 infra 셀프 테스트 30케이스와 extractor 실전 배포가 보증.

연관 이슈

- 두 스텝(배포·전환)의 인라인 슬롯 판정과 tee+reload 전환을 TeamPiKi/infra 블록 호출로 대체 (infra#37 4단계, extractor 는 이미 전환·실전 검증됨)
- 이 전환으로 core 가 원복 로직을 처음 획득한다: 종전 인라인은 전환 실패 시 상태 파일과 실제 서빙이 어긋난 채 남아 다음 배포가 서빙 슬롯을 오판·제거할 수 있었다 (extractor 이행 배포에서 실사고로 실증된 결함). nginx -t 사전 검증과 reload 의 restart 폴백도 함께 얻는다
- 동작 등가 유지: upstream 라인 포맷(server localhost:PORT)·부트스트랩 기본값(8080)·구버전 teardown(레거시 team3-* 포함)·요약 스텝의 포트 grep 전부 종전 그대로
- 검증: yaml 파싱, 두 스텝 스크립트 bash -n 통과, shellcheck 에 신규 경고 0 (블록 자체는 infra 셀프 테스트 30케이스가 보증)
@m-a-king m-a-king added the refactor 구조 개선, 외부 동작 불변 label Aug 11, 2026
@m-a-king m-a-king self-assigned this Aug 11, 2026
@github-actions

Copy link
Copy Markdown

Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@m-a-king, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ec20ad1-76aa-49bd-81e7-27d3c51a8d1d

📥 Commits

Reviewing files that changed from the base of the PR and between ba55467 and 094d1f7.

📒 Files selected for processing (1)
  • .github/workflows/deploy.yml

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.

@m-a-king
m-a-king merged commit 33407ce into dev Aug 11, 2026
8 checks passed
@m-a-king
m-a-king deleted the refactor/consume-slot-blocks branch August 11, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 구조 개선, 외부 동작 불변

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant