feat(controller-peers-env-fallback): keep existing no-peers test scripts on the path they test (task 5.2)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ac7a43855d
commit
f70652981a
3 changed files with 22 additions and 1 deletions
|
|
@ -102,7 +102,7 @@
|
|||
- Done when, with the xceadmin wheel built (`/xce-build xceadmin`), the wrapper case in the regression script passes
|
||||
- _Requirements: 4.1, 4.2_
|
||||
|
||||
- [ ] 5.2 Keep existing no-peers test scripts on the path they test
|
||||
- [x] 5.2 Keep existing no-peers test scripts on the path they test
|
||||
- Both scripts delete their scheduler log on exit, so each must check the path itself: first add a check that greps its scheduler log for the "No --peers flag ... XCE_CONTROLLER_PEERS unset or empty" line and fails the script if it is missing, and see it fail with the variable set in the calling shell
|
||||
- Then add `unset XCE_CONTROLLER_PEERS` near the top of the version-startup-consistency and dirty-fingerprint-startup-log scripts, which start the scheduler without `--peers`
|
||||
- Done when, with the variable set in the calling shell, both scripts pass, including their new no-peers-line check
|
||||
|
|
@ -139,3 +139,4 @@
|
|||
- (3.1 → 5.2) On this machine `test-version-startup-consistency.sh` and `test-dirty-fingerprint-startup-log-unchanged.sh` exit 1 for an environmental reason: their apiserver `go build` fails with "module lookup disabled by GOPROXY=off" (no Go module cache). Their scheduler checks pass. Task 5.2's "both scripts pass" needs a machine with the Go module cache, or the result must be reported as environment-limited with the scheduler checks shown passing.
|
||||
- (3.2) The worker's early stdout lines are not buffered (visible within 0.3s while it runs). `xcecd_virtual` ignores SIGTERM (pre-existing), so `start_worker` SIGKILLs it after the asserted line; the virtual worker leaves only its scratch log. Its peers parse/validation early returns now free `logdir` (they leaked under ASAN). Out of scope, pre-existing: `-l <dir>` combined with `-h`/`--version` still leaks `logdir`.
|
||||
- (3.2 → 3.3) The file-wide `shellcheck disable=SC2329` must stay (cases and helpers run via the `"$fn"` registry and `trap`); the SC2034 disable now covers only the `HARNESS_BIN` line — remove it once the harness cases use it.
|
||||
- (5.2) Environment-limited completion: the new `[scheduler-no-peers]` check passes in both scripts with the variable set and unset (RED reproduced: with the variable set and no `unset`, the scheduler took the HA path and the check failed). Neither script exits 0 here: both stop at the apiserver `go build` (GOPROXY=off, no Go module cache), and `test-version-startup-consistency.sh` also fails its scheduler commit-id check on any dirty tree — pre-existing, logged as bug-1909. A full pass of both scripts still needs a machine with the Go module cache and a clean tree (or a bug-1909 fix); carry this into 5.3.
|
||||
|
|
|
|||
|
|
@ -89,6 +89,10 @@
|
|||
# composeVersionDisplay()'s strings.TrimSuffix() call.
|
||||
set -euo pipefail
|
||||
|
||||
# The scheduler below starts without --peers; keep a caller's XCE_CONTROLLER_PEERS
|
||||
# from moving it off the single-controller path this script tests.
|
||||
unset XCE_CONTROLLER_PEERS
|
||||
|
||||
# ── paths ───────────────────────────────────────────────────────────────────
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
WORKTREE="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
|
@ -471,6 +475,12 @@ if [ -z "$sched_log_line" ]; then
|
|||
overall_pass=0
|
||||
else
|
||||
yellow "[scheduler] startup log line: [$sched_log_line]"
|
||||
if grep -F -- "No --peers flag" "$sched_log" | grep -qF -- "XCE_CONTROLLER_PEERS unset or empty"; then
|
||||
green "PASS [scheduler-no-peers]: scheduler took the single-controller path (no --peers, XCE_CONTROLLER_PEERS unset)."
|
||||
else
|
||||
red "FAIL [scheduler-no-peers]: scheduler log has no 'No --peers flag ... XCE_CONTROLLER_PEERS unset or empty' line -- it did not take the single-controller path this script tests."
|
||||
overall_pass=0
|
||||
fi
|
||||
if [ -n "$sched_fp" ]; then
|
||||
if ! assert_startup_log_unchanged "scheduler-startup-log" "$sched_log_line" "sched" "$base_commit" "$sched_fp"; then
|
||||
overall_pass=0
|
||||
|
|
|
|||
|
|
@ -103,6 +103,10 @@
|
|||
# "********** Initialize Logger done!" log message in the same file.
|
||||
set -euo pipefail
|
||||
|
||||
# The scheduler below starts without --peers; keep a caller's XCE_CONTROLLER_PEERS
|
||||
# from moving it off the single-controller path this script tests.
|
||||
unset XCE_CONTROLLER_PEERS
|
||||
|
||||
# ── paths ───────────────────────────────────────────────────────────────────
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
WORKTREE="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
|
@ -323,6 +327,12 @@ if [ -z "$sched_log_line" ]; then
|
|||
sched_v_commit=""; sched_v_build=""
|
||||
else
|
||||
yellow "[scheduler] startup log line: [$sched_log_line]"
|
||||
if grep -F -- "No --peers flag" "$sched_log" | grep -qF -- "XCE_CONTROLLER_PEERS unset or empty"; then
|
||||
green "PASS [scheduler-no-peers]: scheduler took the single-controller path (no --peers, XCE_CONTROLLER_PEERS unset)."
|
||||
else
|
||||
red "FAIL [scheduler-no-peers]: scheduler log has no 'No --peers flag ... XCE_CONTROLLER_PEERS unset or empty' line -- it did not take the single-controller path this script tests."
|
||||
overall_pass=0
|
||||
fi
|
||||
|
||||
if ! sched_v_fields="$(extract_composed_fields "$sched_version_raw" "$SCHED_VERSION_PREFIX")"; then
|
||||
red "FAIL [scheduler]: --version output did not contain the expected prefix '$SCHED_VERSION_PREFIX' -- raw: [$sched_version_raw]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue