Skip to content

Commit edc9f0a

Browse files
ci(restheart-mongo): dump container logs on app wait timeout
build-coverage on PR #134 hung 8 min when restheart never bound on port 8080 (last_code=000). The helper script silently looped through both the wait and flow.sh bootstrap timers, then the gate job aborted without surfacing why restheart didn't start. Adding an explicit fail-fast + docker logs dump after the 240s wait so a future failure surfaces the restheart Java traceback (or the mongo connection error, or whatever else). Signed-off-by: Akash Kumar <meakash7902@gmail.com>
1 parent 4d02c6d commit edc9f0a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/scripts/run-and-measure.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ for i in $(seq 1 120); do
7474
sleep 2
7575
done
7676

77+
if [ "$code" != "200" ] && [ "$code" != "401" ]; then
78+
echo "::error::restheart did not bind on port ${RESTHEART_APP_PORT} within 240s (last code: ${code:-empty})"
79+
echo "----- restheart container logs -----"
80+
docker logs "${RESTHEART_APP_CONTAINER}" --tail 200 2>&1 || true
81+
echo "----- mongo container logs -----"
82+
docker logs "${RESTHEART_MONGO_CONTAINER}" --tail 100 2>&1 || true
83+
echo "----- docker compose ps -----"
84+
docker compose ps || true
85+
docker compose down -v --remove-orphans || true
86+
exit 1
87+
fi
88+
7789
bash flow.sh bootstrap 240
7890

7991
# Drive traffic. flow.sh::restheart_record_traffic gates on

0 commit comments

Comments
 (0)