[CUBRIDQA-1603] Turn on set -u, link the full failure list, and fail on a missing testcase branch - #7984
Merged
Conversation
An unset variable expanded to the empty string in all 34 run blocks, so a name typed wrong or a value a step did not set became an empty path or an empty argument and the script carried on. `set -u` makes it stop there. The 34 blocks were read for the places where that changes what runs. The only ones that change are the two always() steps of shard: when "Resolve the suite" dies, nothing has written SHARD_DIR to the environment, and those two steps used to write into the container root before failing on an ambiguous redirect. Now they say which variable is unbound and stop. The job was already red in that case. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZJ3dG29wnfshtwVKBMyNT
…obody can open Over 50 failed cases, the run summary listed the first 50 and pointed at the rest with `/home/gha-ci/runs/<id>/<suite>/collect/failed.list` -- a path on the GlusterFS volume, not something a reader of the summary can open. The artifact server already serves that file, and every other link in the summary is built from ARTIFACT_URL_BASE. This line now is too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZJ3dG29wnfshtwVKBMyNT
✅ TC Merge Gate — Merge AllowedAll TC PRs are merged, closed, or not present. TC Repositories & Branches:
|
🧪 TC Test Environment ReadyCircleCI Testing:
TC Repositories & Branches:
Next Steps:
|
…is missing plan probes cubrid-testcases/-private-ex for tc/pr-<N>, the branch TC Branch Sync creates when the pull request opens. When the probe came back "no such ref", plan warned and ran develop's cases instead. The run then graded the engine change against cases the requester never asked for, and the verdict looked like any other. The other two ways this probe can end already stop the run: a network failure after five attempts exits 1, and so does the image's checkout. This branch was the only one that carried on, so it now says which branch is missing and where it comes from, and exits 1. A run with no pull request -- a batch child, a develop push, a dispatch with pr empty -- asks for develop to begin with and is untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZJ3dG29wnfshtwVKBMyNT
…o fall back on It described the behaviour the commit before this one removed, and left the reader an argument for putting it back. What remains is the one fact the code does not carry: exit 2 means "no such ref", so the retries exist to keep a network blip apart from it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CZJ3dG29wnfshtwVKBMyNT
tw-kang
marked this pull request as ready for review
September 21, 2026 06:22
Contributor
Author
|
@greptileai review |
Contributor
|
테스트 입력의 정합성과 실패 진단을 강화하는 변경으로, 현재 확인된 범위에서는 안전하게 병합할 수 있습니다. Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/dev..." |
Contributor
Author
|
/run all |
1 similar comment
Contributor
Author
|
/run all |
Contributor
Author
|
/run all |
|
✅ TC Branch Finalized for Engine PR was merged. Cleanup Results:
TC base branch is ready for the next PR. |
|
✅ TC Branch Finalized for Engine PR was merged. Cleanup Results:
TC base branch is ready for the next PR. |
hyunikn
added a commit
to hyunikn/cubrid
that referenced
this pull request
Sep 21, 2026
…ure list, and fail on a missing testcase branch (CUBRID#7984)
tw-kang
added a commit
to tw-kang/cubrid
that referenced
this pull request
Sep 21, 2026
CUBRID#7984 turned on `set -u` across the workflow and made a missing tc/pr-<N> fail instead of falling back to develop. Both land on steps this branch rewrites, so the conflicts keep develop's `set -u` and this branch's body; the three steps this branch deletes stay deleted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B24o3QtfCZrMJgJnsQgzVn
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.
http://jira.cubrid.org/browse/CUBRIDQA-1603
Purpose
gha-ci.yml의 스크립트 34개가set -eo pipefail로 시작한다.-u가 빠져 있다. 그래서 없는 변수는 빈 문자열이 된다. 같은.github/workflows/의tc-branch-sync.yml·tc-branch-finalize.yml·tc-merge-gate.yml·submodule-bump-receiver.yml은 이미set -euo pipefail이다 —gha-ci.yml만 달랐다.빈 문자열은 조용하다. 이름을 잘못 적은 변수, 앞 단계가 채우지 못한 변수가 빈 경로나 빈 인자가 되고 스크립트는 그대로 진행한다. 빈 값이 루트 기준 경로를 만드는 모양은 실물로도 봤다 — plan 이 죽은 run 에서 collect 의 정리 단계가
$RUNDIR를 빈 값으로 읽어/plan/testtools를 로그에 찍었다(배치 자식 35240525905).⚠ 그 한 건은 이 PR 이 안 잡는다.
RUNDIR은 step 의env:로 늘 정의되고 값만 비므로-u가 물지 않는다 — 거기에는 조건 가드가 따로 필요하고 별건으로 남겼다.-u가 잡는 것은 아예 정의되지 않은 이름이다: 오타, 그리고 앞 단계가$GITHUB_ENV로 넘겼어야 할 값.세 번째는 판정 자체를 틀리게 한다. plan 은
tc/pr-<N>(TC Branch Sync 가 PR 을 열 때 만드는 테스트케이스 브랜치)을 찾아본다. 없으면 경고 한 줄을 찍고 develop 의 케이스로 돌았다. 요청자가 고른 적 없는 케이스로 엔진 변경을 채점하고, 그 판정은 여느 초록·빨강과 똑같이 보인다. 같은 자리의 다른 두 끝(네트워크 실패, 이미지의 checkout)은 이미 실패로 끝낸다 — 조용히 넘어가는 갈래는 이것 하나였다.두 번째 것은 읽는 사람 몫이다. 실패 케이스가 50건을 넘으면 run summary 가 첫 50건만 싣고 나머지는
/home/gha-ci/runs/<id>/<suite>/collect/failed.list라고 볼륨 경로를 적어 준다. summary 를 보는 사람은 그 경로를 열 수 없다. 산출물 서버가 그 파일을 이미 서빙하고 있고, summary 의 다른 링크는 전부 그 주소로 만들어진다.Implementation
커밋 셋이다. 되돌릴 때도 셋이 따로 선다.
1. 34개 스크립트 전부
set -euo pipefail로 바꿨다. 이제 없는 변수를 읽으면 그 자리에서unbound variable로 멈춘다.바뀌는 동작은 하나다. shard 의
always()단계 둘(Publish results for collect·Verdict)은SHARD_DIR같은 값을 첫 단계Resolve the suite가$GITHUB_ENV에 쓴 것에서 받는다. 그 첫 단계가 죽으면 지금까지는 빈 값으로 계속 돌았다 —mkdir -p "$out/artifacts"가/artifacts가 되고(job pod 은 overlay 를 마운트하므로 root 다),$STAMP가 빈>>대상이 되는 자리에서야ambiguous redirect로 멈춘다. 이제는 첫 줄에서 어느 변수가 비었는지 말하고 멈춘다. 그 갈래에서 job 은 어차피 빨강이었다 — 판정은 안 바뀌고, 남기는 쓰레기와 로그만 바뀐다.나머지 33개는 동작이 같다. 아래 Remarks 의 지역 대조에서 59개 시나리오가 옛 판과 바이트까지 같은 출력을 냈다.
2. 실패 목록 안내를 링크로 바꿨다.
_... and N more. The full list is<볼륨 경로>_를ARTIFACT_URL_BASE로 만든 링크로 바꿨다. summary 의[Artifacts]·[Run directory]·[build log]가 쓰는 것과 같은 기계다.3.
tc/pr-<N>이 없으면 실패로 끝낸다.::warning::… falling back to develop+TC_BRANCH=develop을::error::+exit 1로 바꿨다. 메시지는 어느 브랜치가 없는지, 그것을 누가 만드는지(TC Branch Sync), 왜 develop 으로 안 떨어지는지를 말한다.누가 영향을 받나:
pr가 붙은 run 뿐이다. 배치 자식·develop push·pr를 비운 dispatch 는 애초TC_BRANCH=develop이라 그대로다. ⚠ sync 봇보다 먼저 열린 옛 PR(#6585·#6853)에/run을 쓰면 이제 실패한다 — 의도한 것이다. 최근 PR run 20건에 폴백 사례는 0건이었다.Remarks
set -u로 실제로 깨지는 자리가 있는지 34개 블록을 전부 읽고 기계로도 걸렀다. 걸러낸 것은 ① 변수가 조건 갈래 안에서만 대입되고 밖에서 읽히는 자리 ② 앞 단계가$GITHUB_ENV로 넘긴 값을always()단계가 읽는 자리 ③ 누적 변수(x="$x ...")의 초기화 누락 ④ 연관 배열의 없는 키 읽기다. ②만 남았고 위에 적었다. ④는${parent[$c]+set}로 이미 막혀 있다.티켓에 적혀 있던 실물 결함 1건은 이미 없다. gate 의
sel="$sel $w"가sel미설정 상태에서 돈다는 지적(2026-09-16)은 그 시점 기준으로는 맞았지만, #7932(develop69168b3da2, 9/14 머지)이sel=''초기화를 이미 넣었다. 지역 대조로 확인했다 — 그 초기화 한 줄을 도로 지운 판을 만들어/run shell코멘트를 먹이면line 104: sel: unbound variable로 죽고, 지금 develop 판은 정상으로 끝난다. 시험이 그 결함을 잡을 수 있음을 먼저 보이고 나서 없음을 확인했다.지역 대조 (옛 판 vs 새 판, 블록 15개 · 59 시나리오). 블록을 YAML 에서 그대로 떼어 내고
gh·curl·date를 스텁으로 바꾼 뒤, GitHub 이 주는 것과 같게 step 의env:키를 전부 빈 값으로라도 정의한 상태로 돌려 출력·종료코드·$GITHUB_OUTPUT·$GITHUB_STEP_SUMMARY를 비교했다. 지역 bash 는 4.4.20 으로test_rl8.10이미지와 같은 판이다.Case list and splitPublish results·VerdictWall clock+Guard 3failed case log·Clean up the CTP seedRefresh testcases(TC 브랜치 결정)tc/pr-<N>있음 · 없음(pr 지정) · 없음(pr 빈값) · 네트워크 실패 = 4exit 1. 있음·네트워크 실패 두 판은 동일링크가 실제로 열리는지 산출물 서버로 확인했다.
http://192.168.1.48:30080/runs/35334829033/shell/collect/failed.list= HTTP 200, 80줄. nginx 의 404 규칙(/_fork·CTP seed)에 걸리지 않는 경로다.50건 초과는 드물다 — run 1,031건 실측에서 실패 있는 run 175건, 중앙값 2 · p90 15, 50 초과는 3건(0.3%)이다. 그래서 급한 고침이 아니라 이 PR 에 얹었다.
Run CTP단계의set +e…set -e짝은 그대로 뒀다.set +e는-u를 끄지 않고, 뒤의set -e도-u를 건드리지 않는다.develop 최신화: #7981 머지 뒤
git merge develop(rebase 안 함) — 충돌 없음. [CUBRIDQA-1575] Put each failed sql and medium case's query and diff in the run summary #7981 이gha-ci.yml에 넣은 새 셸(collect 의 실패 로그 awk 한 벌 공유,xml_name유도)도set -u아래서 돈다. 차등 시험 전판을 새 기준선(develop880a173380)으로 다시 돌렸고 결과는 같다 — 링크 한 줄과tc/pr갈래만 다르다.포크 lane 검증 — 네 판.
/run코멘트로는 워크플로 변경을 검증할 수 없어(항상 develop 사본으로 돈다)workflow_dispatch --ref로 돌렸다. 세 판이 34개 블록 중 컨테이너가 있어야 도는 19개를 실물로 지나간다 — build 7개(release 다리는 sweep 포함), plan 6개, shard 8개(prune·publish 두 갈래), collect 6개.shard: planned 2 / published 2 / build provenance 2 / tc provenance 2,run 30 / passed 30 / failed 0,shell completed with no failures.run 5309 / passed 5309 / failed 0,sql completed with no failures.tc/pr없는 PR 번호 (새 실패 길)pr=999999로 돌려 plan 의Refresh testcases가 실패 — 주석cubrid-testcases-private-ex has no tc/pr-999999+ 안내 세 줄. shard 는 skipped, collect 는plan ended failure, so the split stage broke.로 끝났고 status 는error를 찍었다. 옛 판이었다면 develop 케이스로 초록이 났을 자리다sabotage=empty-shard(실패 길)Take my share (guard 2 of 3)실패 →Publish results for collect(always) 성공(실패 갈래를set -u로 통과) →Verdict실패. collect 는shards that never ran a case: 1 / cases left unrun: 2,run 4 / passed 4 (of 6),build provenance 1로 빨강${d#$CI_ROOT/}는 옆의[Artifacts]·[Run directory]링크와 같은 모양이라 그대로 뒀다 — shellcheck SC2295 가 세 줄 모두에 붙는다.CI_ROOT는 고정 경로라 글롭이 없다.이 절(plan 의 테스트케이스 결정)은 곧 다시 쓰인다 — 테스트케이스를 노드 사본으로 옮기는 후속 PR 이다. 그때 이 동작(폴백 없음)을 같이 가져가야 한다.
같은 티켓의 소항목(collect 의 빈
RUNDIR가드, build sweep 의tc/*.tmp.*)은 이 PR 에 없다. 순위 없음으로 남겨 둔 것들이다.🤖 Generated with Claude Code
https://claude.ai/code/session_01CZJ3dG29wnfshtwVKBMyNT