Skip to content

Commit c4b10f8

Browse files
committed
fix: enforce perf probe failure exit codes
1 parent 5e55750 commit c4b10f8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

scripts/perf_latency_probe.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ if [[ "${REQUIRE_MIN_STAGE_SAMPLES}" == "1" ]]; then
176176
echo "No latency snapshot data available at probe end."
177177
exit 4
178178
fi
179-
if ! JSON_PAYLOAD="${LATEST_JSON}" python3 - "$MIN_STAGE_SAMPLES" <<'PY'
179+
py_rc=0
180+
JSON_PAYLOAD="${LATEST_JSON}" python3 - "$MIN_STAGE_SAMPLES" <<'PY' || py_rc=$?
180181
import json
181182
import os
182183
import sys
@@ -205,8 +206,8 @@ if missing:
205206
print(f"- {item}")
206207
raise SystemExit(4)
207208
PY
208-
then
209-
exit $?
209+
if [[ "${py_rc}" -ne 0 ]]; then
210+
exit "${py_rc}"
210211
fi
211212
fi
212213

0 commit comments

Comments
 (0)