Brian Gough
6d5dfb7758
clean up log file deletion and add unit test
2020-05-20 14:12:08 +01:00
Eric Mc Sween
8d71548dd4
Merge pull request #134 from overleaf/em-ordered-updates
...
Accept single list of updates for file tree operations
2020-05-20 08:46:01 -04:00
Eric Mc Sween
9799b94752
Accept ordered doc and file updates
...
Add an `updates` parameter to the project update endpoint. It can be
used instead of `docUpdates` and `fileUpdates` to provide a single list
of updates in the order they should be processed.
2020-05-20 07:57:32 -04:00
Brian Gough
a684619bce
add unit tests
2020-05-20 11:52:53 +01:00
Brian Gough
63770bf390
clean up the stdout/stderr recording
2020-05-20 11:45:29 +01:00
Henry Oswald
5c3da905ba
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
b450a6e097
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
36e81cbe15
[misc] apply review feedback
2020-05-19 10:30:59 +01:00
Jakob Ackermann
2a3c2dd3d5
[misc] simplify the smoke test and process shutdown
2020-05-19 10:30:59 +01:00
Henry Oswald
2547725f35
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
e9c6f3b074
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
457b7d6657
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
44b36c2806
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
3925839c7f
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
Jakob Ackermann
79ea042959
Merge pull request #137 from overleaf/jpa-backport-strict-sequence
...
[misc] backport strict sequence of redis (un)subscribe
2020-05-18 12:31:31 +02:00
Jakob Ackermann
4e400dc7da
Merge pull request #136 from overleaf/jpa-backport-sinon-v2
...
[misc] backport sinon v2
2020-05-18 11:18:06 +02:00
Eric Mc Sween
65fe74fd2d
Upgrade Sinon
2020-05-15 15:34:14 -04:00
Eric Mc Sween
759d385be8
Decaf cleanup: unused variables
2020-05-15 14:43:05 -04:00
Eric Mc Sween
86747ba64f
Decaf cleanup: stub setup in tests
2020-05-15 14:43:03 -04:00
Eric Mc Sween
9e4280916a
Decaf cleanup: unnecessary returns
2020-05-15 14:41:04 -04:00
Jakob Ackermann
d13acb8ca3
[ChannelManager] port related and still mostly valid test from v2
...
I skipped the bulk of verifyConsistentBehaviour tests which are not
valid for the new implementation -- there is no optimization and
always cleanup.
2020-05-15 18:39:33 +02:00
Jakob Ackermann and Brian Gough
41debfae0f
[ChannelManager] rework (un)subscribing to redis
...
- send a subscribe request on every request
- wait for a pending unsubscribe request before subscribing
- wait for a pending subscribe request before unsubscribing
Co-Authored-By: Brian Gough <brian.gough@overleaf.com >
2020-05-15 18:34:33 +02:00
Brian Gough
3db513cfc9
record latexmk output
2020-05-15 16:08:10 +01:00
Eric Mc Sween
6269ace987
Decaf cleanup: move functions to top level
2020-05-15 09:59:32 -04:00
Eric Mc Sween
3d000bcbe6
Decaf cleanup: use arrow functions for callbacks
2020-05-15 09:59:32 -04:00
Eric Mc Sween
751d9ea718
Decaf cleanup: simplify loops
2020-05-15 09:59:32 -04:00
Eric Mc Sween
7a5a782dc7
Decaf cleanup: camel case variables
2020-05-15 09:59:26 -04:00
Jakob Ackermann
1095851dfe
[misc] test/unit: fix typos and assertion of error messages
...
Sinon does not check the contents of the passed error when checked via
sinon.stub().calledWith.
```
callback = sinon.stub()
callback(new Error("some message"))
.calledWith(new Error("completely different message"))
=== true
```
Cherry-pick plus an additional patch for the joinProject bail-out.
(cherry picked from commit d9570fee70701a5f431c39fdbec5f8bc5a7843fe)
2020-05-15 14:46:05 +02:00
Jakob Ackermann
17d04b9041
[misc] bump sinon to 2.x for promise support with stubs
...
(cherry picked from commit 3c92b937f9430175d7c51660e03c507635448e88)
2020-05-15 12:01:22 +02:00
Eric Mc Sween
ceb77f4c93
Decaf cleanup: remove unused variables
2020-05-14 16:54:08 -04:00
Eric Mc Sween
6b5760ca28
Decaf cleanup: simplify null checks
2020-05-14 16:53:22 -04:00
Eric Mc Sween
f2c67b66fa
Decaf cleanup: remove default callbacks
2020-05-14 16:50:04 -04:00
Eric Mc Sween
2bff83137c
Decaf cleanup: unnecessary returns
2020-05-14 16:35:10 -04:00
Eric Mc Sween
819aa378d9
Decaf cleanup: remove Array.from()
2020-05-14 16:32:05 -04:00
Henry Oswald
77e8ba74a7
add pipeUrlToFileWithRetry function to retry file downloads 3 times
2020-05-14 13:24:58 +01:00
Jakob Ackermann
b713beb7f0
Merge pull request #135 from overleaf/jpa-skip-leave-project-for-invalid-clients
...
[WebsocketController] skip leaveProject when joinProject didn't complete
2020-05-13 15:34:41 +02:00
Jakob Ackermann
df9d8ccbbe
Merge pull request #134 from overleaf/jpa-handle-redis-subscribe-error-on-join-project
...
[WebsocketController] handle redis subscribe error on joinProject
2020-05-13 15:34:17 +02:00
Jakob Ackermann
55af5e502f
[WebsocketController] skip leaveProject when joinProject didn't complete
...
Also drop dead code:
- user_id bailout
There is a check on a completed joinProject call now. It will always
set a user_id, see Router.coffee which has a fallback `{_id:"..."}`.
- late project_id bailout
WebsocketLoadBalancer.emitToRoom will not work without a project_id.
We have to bail out before the call.
2020-05-12 17:15:08 +02:00
Eric Mc Sween
a4de5848fb
Merge pull request #133 from overleaf/em-json-request-size
...
Make max JSON request size configurable and default to 8 MB
2020-05-12 08:02:25 -04:00
Jakob Ackermann
684cb3903c
[WebsocketController] handle redis subscribe error on joinProject
...
joinProject should not complete when the redis pub/sub subscribe request
failed.
2020-05-12 13:03:50 +02:00
Eric Mc Sween
16c0ed23db
Fix tests after decaf cleanup
...
* Camel casing in logs
* The Express request object always has query and body properties
2020-05-11 11:37:59 -04:00
Eric Mc Sween
0b1c7e90af
Decaf cleanup: remove unused variables
2020-05-11 11:26:28 -04:00
Eric Mc Sween
3acb970442
Decaf cleanup: simplify stubbed class
2020-05-11 11:24:07 -04:00
Eric Mc Sween
526ef25fcf
Decaf cleanup: unnecessary returns
2020-05-11 11:20:55 -04:00
Eric Mc Sween
a2a1914a53
Use max_doc_length setting to limit incoming doc size
2020-05-11 11:15:37 -04:00
Eric Mc Sween
cb959ddfc1
Decaf cleanup: use arrow functions for callbacks
2020-05-11 11:14:37 -04:00
Eric Mc Sween
e4ac63dd19
Decaf cleanup: move functions to top level
2020-05-11 11:12:15 -04:00
Eric Mc Sween
64a881461f
Decaf cleanup: camel case variables
2020-05-11 11:07:15 -04:00
Eric Mc Sween
fc73bbe1a5
Decaf cleanup: simplify null checks
2020-05-11 10:52:06 -04:00
Eric Mc Sween
80ea49c69c
Decaf cleanup: remove __guard__
2020-05-11 10:47:27 -04:00