Skip to content

Commit f0ad88b

Browse files
committed
adds timeout to docker service logs to avoid blocking
1 parent 7f3fb81 commit f0ad88b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ci/github/system-testing/e2e.bash

+6-6
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ recover_artifacts() {
149149
# all screenshots are in tests/e2e/screenshots if any
150150

151151
# get docker logs.
152-
# WARNING: dumping long logs might take hours!!
152+
# NOTE: dumping logs sometimes hangs. Introducing a timeout
153153
mkdir simcore_logs
154-
(docker service logs --timestamps --tail=300 --details ${SWARM_STACK_NAME}_webserver >simcore_logs/webserver.log 2>&1) || true
155-
(docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_director >simcore_logs/director.log 2>&1) || true
156-
(docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_storage >simcore_logs/storage.log 2>&1) || true
157-
(docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_sidecar >simcore_logs/sidecar.log 2>&1) || true
158-
(docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_catalog >simcore_logs/catalog.log 2>&1) || true
154+
(timeout 30 docker service logs --timestamps --tail=300 --details ${SWARM_STACK_NAME}_webserver >simcore_logs/webserver.log 2>&1) || true
155+
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_director >simcore_logs/director.log 2>&1) || true
156+
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_storage >simcore_logs/storage.log 2>&1) || true
157+
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_sidecar >simcore_logs/sidecar.log 2>&1) || true
158+
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_catalog >simcore_logs/catalog.log 2>&1) || true
159159
}
160160

161161
clean_up() {

0 commit comments

Comments
 (0)