Skip to content

Commit 6fa7cc2

Browse files
davidjgraphclaude
andcommitted
Dump export-server logs after render in CI
The render test asserts a 200 + PNG, but when Puppeteer/Chrome throws the worker returns a generic 500 "Error!" and logs the real exception via winston. The existing 'docker logs' runs before the render request, so it never captures that exception. Dump the container logs (and response body) after the render request so a failing render surfaces the actual error and stack trace in the CI output. Diagnostic for the render 500 in run #675. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bc742c0 commit 6fa7cc2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/docker-image-export.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jobs:
3232
--data-urlencode 'scale=1' \
3333
--data-urlencode 'xml=<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="CI render test" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="20" y="20" width="160" height="60" as="geometry"/></mxCell></root></mxGraphModel>')
3434
echo "Render HTTP ${STATUS}, $(wc -c < /tmp/export-test.png) bytes"
35+
# Puppeteer/Chrome render errors are logged by the worker process at
36+
# request time, so the pre-render 'docker logs' above cannot capture
37+
# them. Dump logs (and the response body) after the render so a 500
38+
# surfaces the actual exception + stack in the CI output.
39+
echo "=== export-server logs (post-render) ==="
40+
docker logs image-export
41+
echo "=== render response body (first 500 bytes) ==="
42+
head -c 500 /tmp/export-test.png; echo
3543
test "${STATUS}" = "200"
3644
test "$(head -c 8 /tmp/export-test.png | od -An -tx1 | tr -d ' \n')" = "89504e470d0a1a0a"
3745
echo "${DOCKER_PASS}" | docker login -u "${DOCKER_USER}" --password-stdin;

0 commit comments

Comments
 (0)