Commit Graph

774 Commits

Author SHA1 Message Date
Brian Gough
59310cbb09 update buildscript.txt to node 10.21.0 2020-06-03 11:11:51 +01:00
Brian Gough
d88136c569 update to node 10.21.0 2020-06-03 10:22:31 +01:00
Brian Gough
0d44fb704b Merge pull request #171 from overleaf/bg-fix-format
fix format and lint checks
2020-06-02 11:48:11 +01:00
Brian Gough
bf2430f1fc fix broken unit test 2020-06-02 11:12:57 +01:00
Brian Gough
2211ebcefb fix eslint errors 2020-06-02 09:51:34 +01:00
Brian Gough
440ec5553e fix unreachable code lint error 2020-06-02 09:28:04 +01:00
Brian Gough
17c14b1192 fix formatting with make format_fix 2020-06-02 09:18:38 +01:00
Brian Gough
8c60406bb5 Merge pull request #170 from overleaf/jpa-import-141
[DockerRunner] destroyOldContainers: fix a race confition
2020-06-02 09:04:59 +01:00
Brian Gough
9db18c95a5 Merge pull request #169 from overleaf/bg-record-latexmk-output
record latexmk output
2020-06-02 09:03:43 +01:00
Jakob Ackermann
985bbf27c9 Merge pull request #141 from das7pad/hotfix-container-deletion-locking
[DockerRunner] destroyOldContainers: normalize the container name
2020-05-29 12:31:50 +02:00
Jakob Ackermann
f8cb5e36af [DockerRunner] destroyOldContainers: normalize the container name
The docker api returns each name with a `/` prefix.

In order to not interfere with pending compiles, the deletion process
 has to acquire an internal lock on the container. The LockManager uses
 the plain container name without the slash: `project-xxx`.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-05-29 11:28:26 +01:00
Brian Gough
1bcb370ca1 clean up log file deletion and add unit test 2020-05-20 14:12:08 +01:00
Brian Gough
e3c278e708 add unit tests 2020-05-20 11:52:53 +01:00
Brian Gough
54896fb157 clean up the stdout/stderr recording 2020-05-20 11:45:29 +01:00
Henry Oswald
fec359afac Merge pull request #162 from overleaf/ta-jpa-epipe-retry
[DockerRunner] retry container inspect on EPIPE
2020-05-19 11:15:25 +01:00
Henry Oswald
97f5691c87 Merge pull request #166 from overleaf/jpa-port-smoke-test-patch
[misc] simplify the smoke test and process shutdown
2020-05-19 10:31:32 +01:00
Jakob Ackermann
9807b51519 [misc] apply review feedback 2020-05-19 10:30:59 +01:00
Jakob Ackermann
b8125e396a [misc] simplify the smoke test and process shutdown 2020-05-19 10:30:59 +01:00
Henry Oswald
73afa1a8d7 Merge pull request #164 from overleaf/bg-fix-buffer-deprecations
fix deprecated usage of Buffer constructor
2020-05-19 10:26:56 +01:00
Henry Oswald
942678de38 Merge pull request #163 from overleaf/bg-use-encoding-on-process-output
set encoding when reading from streams
2020-05-19 10:26:26 +01:00
Henry Oswald
3834c37013 Merge pull request #165 from overleaf/ho-retry-url-downloads
add pipeUrlToFileWithRetry for file downloads
2020-05-19 10:25:19 +01:00
Henry Oswald
a425412bdd Merge pull request #168 from overleaf/ho-dynamic-disk-size-checker-2
add refreshExpiryTimeout function
2020-05-19 10:25:12 +01:00
Henry Oswald
c004d299c1 add refreshExpiryTimeout function
on clsi all data lives inside of / dir
dynamically reduce size of EXPIRY_TIMEOUT if disk starts to get full
2020-05-18 15:17:19 +01:00
Brian Gough
5ab45c1031 record latexmk output 2020-05-15 16:08:10 +01:00
Henry Oswald
0bd99a3edc add pipeUrlToFileWithRetry function to retry file downloads 3 times 2020-05-14 13:24:58 +01:00
Brian Gough
3592ffda52 fix deprecated usage of Buffer constructor 2020-05-07 10:42:05 +01:00
Brian Gough
5b5fd2f5df set encoding when reading from streams
using .toString() works most of the time but can lead to utf8 characters being
broken across chunk boundaries.

https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding
2020-05-07 10:30:14 +01:00
Henry Oswald
7254a025ae Merge pull request #146 from overleaf/bg-support-other-runtimes
support other runtimes
2020-04-23 14:42:18 +01:00
Henry Oswald
4bd567b78d Merge branch 'master' into bg-support-other-runtimes
port coffee changes to js
2020-04-23 13:59:05 +01:00
Henry Oswald
b10f0ae9ad Merge pull request #158 from overleaf/jpa-entry-point-cleanup
[misc] entry point cleanup
2020-04-23 13:52:04 +01:00
Henry Oswald
a4c64d7151 Merge pull request #155 from overleaf/ho-limit-lifespan
limit clsi lifespan via health checks and PROCESS_LIFE_SPAN_LIMIT_MS
2020-04-23 13:51:09 +01:00
Henry Oswald
557dc47e30 cleanup the shutdown code a bit 2020-04-23 11:32:33 +01:00
Jakob Ackermann
b18c9854b6 [LocalCommandRunner] run: block a double call of the callback
The subprocess event handler fires the "error" and "close" event in case
 of a failure.
Both events would call the given callback, resulting in double
 processing of the subprocess result downstream.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-04-16 15:55:55 +02:00
Henry Oswald
3513748f73 add variance into shutdown time to avoid stampeed 2020-04-14 13:36:11 +01:00
Jakob Ackermann
2b2fcca39c [DockerRunner] fix metric incrementing and error logging
- do not log on first EPIPE
- inc 'container-inspect-epipe-error' on permanent error only

Co-Authored-By: Tim Alby <timothee.alby@gmail.com>
2020-04-10 14:44:57 +02:00
Tim Alby
9e82ab0890 add metrics for EPIPE errors
Co-Authored-By: Jakob Ackermann <jakob.ackermann@overleaf.com>
2020-04-10 12:28:48 +02:00
Tim Alby
e3da458b37 retry once on EPIPE errors
Co-Authored-By: Jakob Ackermann <jakob.ackermann@overleaf.com>
2020-04-10 12:28:11 +02:00
Tim Alby
8fa4232148 fix arguments order
Co-Authored-By: Jakob Ackermann <jakob.ackermann@overleaf.com>
2020-04-10 12:27:15 +02:00
Jakob Ackermann
2bd4c1dbee Merge remote-tracking branch 'origin/master' into jpa-entry-point-cleanup 2020-04-03 14:05:36 +02:00
Jakob Ackermann
44f30d6c2e Merge pull request #159 from overleaf/jpa-fix-docker-modem-error-scheme
[misc] keep up with the error signature of dockerode/docker-modem
2020-04-03 14:04:06 +02:00
Jakob Ackermann
c56dcc4d15 Merge pull request #157 from overleaf/jpa-download-failed-metric
[misc] add a metric for failing downloads
2020-04-03 14:03:16 +02:00
Jakob Ackermann
2ff0564009 Merge pull request #156 from overleaf/jpa-logger-1-9-1
[misc] bump logger-sharelatex to 1.9.1
2020-04-03 14:03:04 +02:00
Jakob Ackermann
3db40804ba [misc] use a directory in /tmp for temporary data 2020-04-03 12:36:32 +02:00
Jakob Ackermann
4ee0dc2471 [misc] narrow down write access/ownership for the run-time user 2020-04-03 12:36:32 +02:00
Jakob Ackermann
c5d10d02fc [misc] move the sqlite database into a db/ directory 2020-04-03 12:36:31 +02:00
Jakob Ackermann
b69ea2f83f [misc] drop debug output and log docker version on stderr 2020-04-03 12:36:31 +02:00
Jakob Ackermann
638d2f30d3 [misc] add a metric for failing downloads 2020-04-03 12:35:40 +02:00
Jakob Ackermann
54ce1373af Merge pull request #160 from overleaf/jpa-build-scripts-2-1-0
[misc] bump the build-scripts to version 2.1.0
2020-04-03 12:33:06 +02:00
Jakob Ackermann
00c5ace592 [misc] bump the build-scripts to version 2.1.0
This will put acceptance and unit tests in own namespaces so that they
 can run and be teared down individually.
2020-04-03 12:18:09 +02:00
Henry Oswald
b445f7fb78 Merge branch 'master' of github.com:overleaf/clsi into ho-limit-lifespan 2020-03-31 09:52:37 +01:00