From e8f02591de84505d271ef5a1d435d367c90b4690 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sat, 1 Aug 2026 03:06:24 -0700 Subject: [PATCH] test: accept prebuilt phase174 RF3 helper --- .../phase174-d2-distinct-node-rf3-qa.md | 5 +++++ .../run-phase174-distinct-node-rf3-gate.sh | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md b/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md index da62500537..804a09dd51 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md +++ b/seaweed-block/internal/docs/qa-assignments/phase174-d2-distinct-node-rf3-qa.md @@ -12,6 +12,11 @@ SW_BLOCK_PHASE174_SSH_KEY=/c/work/dev_server/testdev_key \ bash scripts/run-phase174-distinct-node-rf3-gate.sh "$PWD" ``` +If the workstation Go toolchain is older than the module requirement, build +the exact assignment commit's Linux test binary on a Go 1.25 host and pass it +as `SW_BLOCK_PHASE174_PREBUILT_BINARY`. The gate copies but never modifies the +provided binary. + ## Contract - 16,384 deterministic 4 KiB writes and 64 MiB per measured run; diff --git a/seaweed-block/scripts/run-phase174-distinct-node-rf3-gate.sh b/seaweed-block/scripts/run-phase174-distinct-node-rf3-gate.sh index 347f48c1b9..58a248ed7c 100644 --- a/seaweed-block/scripts/run-phase174-distinct-node-rf3-gate.sh +++ b/seaweed-block/scripts/run-phase174-distinct-node-rf3-gate.sh @@ -12,6 +12,7 @@ PUBLISH_ROOT="${SW_BLOCK_PHASE174_PUBLISH_ROOT:-/mnt/smb/work/share/g15d-k8s}" RUN_ID="${SW_BLOCK_PHASE174_RUN_ID:-$(date -u +%Y%m%dT%H%M%SZ)-phase174-d2-rf3-distinct}" ARTIFACT_DIR="${SW_BLOCK_ARTIFACT_DIR:-/tmp/${RUN_ID}}" LOCAL_BINARY="/tmp/${RUN_ID}-replication.test" +PREBUILT_BINARY="${SW_BLOCK_PHASE174_PREBUILT_BINARY:-}" REMOTE_ROOT="/tmp/${RUN_ID}" REMOTE_BINARY="${REMOTE_ROOT}/replication.test" M02_STORE_ROOT="/data/nvme/block/${RUN_ID}-stores" @@ -85,7 +86,11 @@ mkdir -p "${ARTIFACT_DIR}/environment" "${ARTIFACT_DIR}/logs" "${ARTIFACT_DIR}/r : >"${SUMMARY}" : >"${RESULTS}" -for command in go ssh scp python3 tar; do +required_commands=(ssh scp python3 tar) +if [[ -z "${PREBUILT_BINARY}" ]]; then + required_commands+=(go) +fi +for command in "${required_commands[@]}"; do command -v "${command}" >/dev/null 2>&1 || { echo "missing required command: ${command}" >&2 exit 2 @@ -119,8 +124,12 @@ remote "${M01_HOST}" "! ss -ltnH | grep -q ':17411 '" remote "${TP01_HOST}" "! ss -ltnH | grep -q ':17412 '" cd "${ROOT}" -CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -tags swblock_testtools -c \ - -o "${LOCAL_BINARY}" ./core/replication +if [[ -n "${PREBUILT_BINARY}" ]]; then + cp "${PREBUILT_BINARY}" "${LOCAL_BINARY}" +else + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -tags swblock_testtools -c \ + -o "${LOCAL_BINARY}" ./core/replication +fi for host in "${M01_HOST}" "${M02_HOST}" "${TP01_HOST}"; do remote "${host}" "test '${REMOTE_ROOT}' = '/tmp/${RUN_ID}'; rm -rf -- '${REMOTE_ROOT}'; mkdir -p '${REMOTE_ROOT}'" "${SCP[@]}" "${LOCAL_BINARY}" "${host}:${REMOTE_BINARY}"