myxce/.wolf/bugs/bug-1895.md
Rongsong Shen f585469cb6
chore(buglog): log bug-1895 (apiserver Go test failures do not fail xce-build.sh)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 04:24:19 +00:00

2.5 KiB

id status status_updated status_note component severity timestamp last_seen occurrences files tags related
bug-1895 open 2026-09-30 newly logged build wrong-result 2026-09-30T04:23:48Z 2026-09-30T04:23:48Z 1
src/tools/xce-build.sh (apiserver and all test steps)
build
xce-build
go
tests
set-e
bug-1894

bug-1895: xce-build.sh apiserver/all: a failing apiserver Go test does not fail the build

Description

Observed: bash src/tools/xce-build.sh apiserver asan <dir> --incremental exited 0 although its Go unit tests failed:

FAIL	apiserver/backend [build failed]
FAIL	apiserver/store [build failed]
... exit=0

Expected: a failing unit test fails the build (non-zero exit), as for every C suite. Impact: apiserver Go test failures are silently ignored by /xce-build (and by all); a regression in apiserver/store, utils, controllers or backend can pass the build unnoticed. xcecli's tests are unaffected when they are the ones failing, but are skipped entirely when the apiserver tests fail. Found by: review of the build output while doing bug-1894's RED step, 2026-09-29.

Environment

  • OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
  • libc: glibc 2.42-47 (the nix dev shell's bash running xce-build.sh; the Go tests themselves run CGO_ENABLED=0)
  • Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
  • Build: asan profile (apiserver component, --incremental), src/xce.build.bug1871
  • Code: scheduler-framework @ 141ac22c-dirty
  • Deployment: n/a -- local build script

Reproduction

  1. Make any apiserver Go test fail (e.g. reference an undefined symbol in a _test.go under src/frontend/apiserver/backend).
  2. bash src/tools/xce-build.sh apiserver asan <dir> --incremental; echo $? -> prints the FAIL lines, then exits 0.
  • Frequency: deterministic -- 1/1, 2026-09-29 (bug-1894's RED run)
  • Evidence: the mechanism is in src/tools/xce-build.sh lines ~390 and ~437: cd frontend/apiserver && go test ... && cd ../xcecli && go test ... under set -euo pipefail; bash's errexit ignores a failure of any command in an && list except the last, so a failing apiserver go test just short-circuits the list and the script carries on to exit 0

Root cause

TODO: required for fixed/partial

Fix

TODO: required for fixed/partial

Verification

  • Test: TODO: name + file; RED before the fix, GREEN after
  • Suites: TODO: suite results and build profile
  • Live: TODO: soak/deploy run, or n/a and why

References

  • Related: none