ci: GitHub 인프라 장애·stale submission 브랜치 재발 방지#206
Merged
Conversation
submission/<N> 브랜치가 이전 run 잔재로 원격에 남아 있을 때 git push가 non-fast-forward로 거부되며 워크플로우가 실패하던 문제를 해결한다. 변경: - 열린 PR이 없을 때만 stale 원격 브랜치를 정리 (PR이 있으면 손대지 않음) - git fetch origin $BRANCH 후 --force-with-lease로 push (경쟁 상태 감지) - 이미 열린 PR이 있으면 gh pr create 대신 재사용 영향: - 같은 issue 재트리거(workflow_dispatch, 재라벨링)에서도 안정 동작 - PR 본문이 자동 생성이고 단일 commit이므로 force-with-lease 안전 관련 문서: docs/troubleshooting/rss-submission-ci-failure.md
actions/checkout이 HTTP 500/502/503/504 또는 connection timeout 등 GitHub 쪽 일시 장애로 retry를 소진하고 실패하면, 새 워크플로우가 실패 로그에서 infra-transient 시그니처를 확인 후 gh run rerun --failed로 자동 재실행한다. 핵심 동작: - workflow_run on CI completed (failure만) - run_attempt < 3 으로 무한 루프 차단 - gh run view --log-failed 로그를 시그니처 매칭 (HTTP 5xx, RPC failed, ETIMEDOUT, ENOTFOUND github.com 등) - 매칭 안 되면 아무 것도 안 함 (테스트/빌드 실패 같은 결정적 실패는 재실행 안 함) - permissions: actions: write, contents: read 로컬 단위 검증: 4개 골든 로그 샘플 모두 기대대로 분류 · 실제 24846153285 infra 로그 → MATCH · jest test failure 로그 → NO_MATCH · TS compile error 로그 → NO_MATCH · Connect Timeout 로그 → MATCH 관련 문서: docs/troubleshooting/rss-submission-ci-failure.md
PR #193 (issue #192 'hwp/hwpx 에디터')에서 발생한 두 개의 독립적 실패 원인을 정리하고, 적용한 수정의 동기와 디자인 결정을 남긴다. 다룬 내용: - 원인 1: GitHub 인프라 일시 장애 (actions/checkout retry 소진) - 원인 2: stale submission/<N> 브랜치 재사용 (non-fast-forward) - 해결: ci-auto-rerun.yml + process-submission.yml force-with-lease 로직 - 시그니처 매칭 정책 (false positive 방지) 관련 워크플로우: - .github/workflows/process-submission.yml - .github/workflows/ci-auto-rerun.yml
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.
배경
PR #193(issue #192 'hwp/hwpx 에디터')의 CI가 실패해 머지가 차단됐던 사건에서 두 개의 독립된 실패 원인을 발견했다. 첫 번째는 GitHub 인프라 일시 장애(HTTP 500), 두 번째는 그 와중에 노출된
process-submission.yml의 stale 브랜치 재사용 버그다.변경 내용
1.
process-submission.yml강화 — non-fast-forward 방지Create PR with new submission스텝에서git push origin "$BRANCH"만 했던 것을 다음으로 교체:--force-with-lease로 새 commit을 덮어쓴다 (기존 PR이 update 됨).git fetch origin "$BRANCH" || true로--force-with-lease비교 기준을 확보.2.
ci-auto-rerun.yml신규 — infra-transient 자동 재실행workflow_runon CIcompletedconclusion == 'failure' && run_attempt < 3(loop 차단)로컬에서 4개 골든 로그 샘플로 단위 검증 완료:
3.
docs/troubleshooting/rss-submission-ci-failure.md신규증상·원인·해결·예방 조치를 모두 기록.
검증
즉시 효과
비범위
ci.yml자체는 수정하지 않음 (nick-fields/retry로 step-level wrap은 효과 적음 — 장애가 checkout 단계라).process-submission.yml의 `Auto-merge if editor` 스텝은 그대로 유지 (`--delete-branch` 추가는 별도 개선 기회).Closes-related: PR #193 (이미 단순 rerun으로 복구)