deploy: fetch 가 계속 실패하면 조용히 있지 말 것 - #42
Merged
Merged
Conversation
배포 폴러는 매 틱 `git fetch` 로 시작하고, 실패하면 WARN 한 줄 남기고 그냥 빠져나온다. 한 번 실패는 그게 맞다 — 테일넷이 튀거나 GitHub 가 5xx 를 주면 다음 틱에 대개 성공한다. 문제는 실패가 계속될 때다. 그때 폴러는 remote 가 움직인 걸 영영 모르고, 계속 "up to date" 라고 보고하며 조용하다. 바깥에서 보면 한가한 정상 폴러와 구별이 안 된다 — 방금 머지하고 배포를 기다리는 사람에게도 마찬가지다. 이미 한 번 일어났다. 2026-09-03..05 사이 fetch 가 77틱 실패했고 그중 50틱이 4일 하루에 몰렸다. 그 주에 배포할 게 없어서 대가는 없었고, 그래서 아무도 몰랐다. 대가가 없었다는 게 신호를 붙일 이유다. DEPLOY_FETCH_WAIT_MIN(기본 30) 넘게 연속 실패하면 로그와 웹훅으로 한 번 알린다. 틱마다가 아니라 연속 구간당 한 번이다 — 5분 간격으로 사흘을 울리는 알림은 채널을 음소거시키고, 음소거된 채널이 애초에 이 문제의 출발점이다. 성공하면 구간이 초기화되어 다음 장애는 자기 몫으로 다시 알린다. CI 판정 없음을 DEPLOY_CI_WAIT_MIN 후에 경고+알림하는 기존 처리와 같은 모양이고 상태 파일도 같은 자리(.git 안)에 둔다. `--check` 는 아무것도 바꾸지 않아야 하므로 구간을 찍지도 알리지도 않는다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mikim
force-pushed
the
claude/deploy-fetch-outage-alert
branch
from
September 9, 2026 04:18
34d829e to
44eb722
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을 봤나
운영 박스의 배포 로그(
~/logs/alpha-deploy.log)를 읽다 발견했다.git fetch실패 틱사흘간 77틱이 실패했고, 그동안 알림은 한 건도 나가지 않았다. 지금은 회복돼
git ls-remote가 0.46s 에 응답하고deploy.sh --check도 정상이다.왜 고치나
폴러는 매 틱
git fetch로 시작하고, 실패하면 WARN 한 줄 남기고 빠져나온다.한 번 실패는 그 처리가 맞다. 계속 실패할 때가 문제다. 폴러는 remote 가 움직인
걸 영영 모른 채
up to date를 보고하며 조용하고, 바깥에서는 한가한 정상폴러와 구별되지 않는다. 방금 머지하고 배포를 기다리는 사람에게도 그렇다.
이번엔 그 주에 배포할 게 없어서 대가가 없었다. 대가가 없었다는 게 신호를 붙일
이유다 — 다음번에 보안 패치가 대기 중이면 같은 침묵이 그대로 비용이 된다.
어떻게
DEPLOY_FETCH_WAIT_MIN(기본 30) 넘게 연속 실패하면 로그와 웹훅으로 알린다.채널을 음소거시키고, 음소거된 채널이 애초에 이 문제의 출발점이다.
DEPLOY_CI_WAIT_MIN후 경고+알림하는 기존 처리와 같은 모양,상태 파일도 같은 자리(
.git안).--check는 아무것도 바꾸지 않아야 하므로 구간을 찍지도 알리지도 않는다.기본값 30분 = 연속 6틱. 일시적인 테일넷/GitHub 블립은 계속 조용하다.
검증
bash -n통과, shellcheck 새 코드 지적 없음. 상태 머신은 함수를 떼어내 직접 돌렸다.동작 확인은 머지 후 박스에서
scripts/deploy.sh --check로 한 번 더 할 수 있다.🤖 Generated with Claude Code