Skip to content

Commit 68c00a6

Browse files
committed
fix(s001): the serve step prints the body and serve.log when GET / is not 200
Run 35518054546 (the package workflow dispatched for slice 013) printed "HTTP 500 on port 36821" on linux and nothing else; the exception was in serve.log, which the step only printed when there was no response at all. The locally built binary answers 200 from its first request, so the log is the only way to see what differs on the runner. Signed-off-by: Ayla Croft <aylacroft@proton.me>
1 parent 50d6630 commit 68c00a6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎.github/workflows/package.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ jobs:
252252
echo "HTTP $code on port $PORT"
253253
echo "COLD_START_MS=$elapsed" | tee -a "$GITHUB_ENV"
254254
echo "### ${{ matrix.name }}: cold start to first HTTP 200: **${elapsed} ms**" >> "$GITHUB_STEP_SUMMARY"
255+
# A non-200 says nothing on its own: run 35518054546 (slice 013) printed "HTTP 500"
256+
# and nothing else, and the log that would have named the exception was never
257+
# read. The body and the tail of serve.log go to stderr before the step fails.
258+
if [ "$code" != "200" ]; then
259+
echo "--- body of GET / ---" >&2; curl -sS "http://127.0.0.1:$PORT/" | head -c 2000 >&2; echo >&2
260+
echo "--- serve.log ---" >&2; tail -60 serve.log >&2
261+
fi
255262
test "$code" = "200"
256263
# Stopping it, and Windows needs its own verb. `kill` from Git-bash does not stop a
257264
# native Windows process, so the backgrounded .exe outlived the step and the job hung

0 commit comments

Comments
 (0)