From 82b996b145196711e439d7d7045f53498c1afa1a Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 25 Jun 2018 14:06:18 +0100 Subject: [PATCH 1/2] increase timeout on wordcount --- app/coffee/CompileManager.coffee | 2 +- test/unit/coffee/CompileManagerTests.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/coffee/CompileManager.coffee b/app/coffee/CompileManager.coffee index 167a80e..b0573d1 100644 --- a/app/coffee/CompileManager.coffee +++ b/app/coffee/CompileManager.coffee @@ -281,7 +281,7 @@ module.exports = CompileManager = file_path = "$COMPILE_DIR/" + file_name command = [ "texcount", '-nocol', '-inc', file_path, "-out=" + file_path + ".wc"] directory = getCompileDir(project_id, user_id) - timeout = 10 * 1000 + timeout = 60 * 1000 # increased to allow for large projects compileName = getCompileName(project_id, user_id) CommandRunner.run compileName, command, directory, image, timeout, {}, (error) -> diff --git a/test/unit/coffee/CompileManagerTests.coffee b/test/unit/coffee/CompileManagerTests.coffee index 341ce2d..14ddb2e 100644 --- a/test/unit/coffee/CompileManagerTests.coffee +++ b/test/unit/coffee/CompileManagerTests.coffee @@ -298,7 +298,7 @@ describe "CompileManager", -> @callback = sinon.stub() @project_id = "project-id-123" - @timeout = 10 * 1000 + @timeout = 60 * 1000 @file_name = "main.tex" @Settings.path.compilesDir = "/local/compile/directory" @image = "example.com/image" From 4830e9f7852401204b056713198d1615dde7b5d9 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 17 Jul 2018 10:41:10 +0100 Subject: [PATCH 2/2] allow prune to fail to prevent build from terminating --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0c289e1..ce7367d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ pipeline { steps { sh 'mkdir -p compiles cache' // Not yet running, due to volumes/sibling containers - sh 'docker container prune -f' + sh 'docker container prune -f || true' sh 'docker pull $TEXLIVE_IMAGE' sh 'docker pull sharelatex/acceptance-test-runner:clsi-6.11.2' sh 'docker run --rm -e SIBLING_CONTAINER_USER=root -e SANDBOXED_COMPILES_HOST_DIR=$(pwd)/compiles -e SANDBOXED_COMPILES_SIBLING_CONTAINERS=true -e TEXLIVE_IMAGE=$TEXLIVE_IMAGE -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/app sharelatex/acceptance-test-runner:clsi-6.11.2'