Repository navigation
ci: 파일 크기 래칫 — sort|head 파이프 경합으로 인한 거짓 실패 제거 - #328
Merged
Merged
Conversation
`sort -rn | head -1` 은 head 가 첫 줄만 읽고 먼저 끝나면 sort 가 Broken pipe 로 종료 코드 2 를 내고, pipefail 때문에 줄 수와 무관하게 검사가 실패했다(PR #326 첫 실행, 재실행으로 통과). 최댓값을 awk 하나로 고르도록 바꿨다. 함께: xargs 가 wc 를 여러 번 나눠 실행하면 합계 줄이 여러 개 생겨 `sed '$d'` 로는 마지막 하나만 지워지고 합계가 최댓값으로 뽑힌다 (xargs -n 20 으로 재현: "10924 total"). 합계 줄은 이름으로 거른다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
전체 라인 커버리지: 25.0% (5286/21105) |
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 #326 첫 CI 실행이 "파일 크기 래칫(≤1970줄)" 단계에서 실패했다. 줄 수 한도를 넘은 게 아니라 명령 자체가 깨졌다.
sort -rn | head -1에서 head가 첫 줄만 읽고 먼저 끝나면, 아직 출력을 쓰던 sort가 Broken pipe로 종료 코드 2를 낸다. 단계가-o pipefail로 돌기 때문에 줄 수와 무관하게 검사가 실패한다. 타이밍에 따라 갈리는 경합이라, 재실행하면 통과했다.수정
최댓값을 awk 하나로 고른다. 입력을 끝까지 읽으므로 파이프가 일찍 닫히지 않는다.
같은 줄에 있던 잠재 결함도 함께 고쳤다. xargs가
wc -l을 여러 번 나눠 실행하면 합계(total) 줄이 여러 개 생기는데,sed '$d'는 마지막 하나만 지운다. 그러면 합계가 최댓값으로 뽑혀 검사가 거짓으로 실패한다. 이제 합계 줄은 이름으로 거른다.검증 (로컬,
bash -e -o pipefail)1970 lib/screen/business_register_screen.dart1970 lib/screen/business_register_screen.dartxargs -n 20(나눠 실행)10924 total✗1970 lib/screen/business_register_screen.dart워크플로 YAML 파싱도 확인했다.
🤖 Generated with Claude Code