June Kelly
7b1044b8a8
Merge pull request #4870 from overleaf/jk-bg-validate-ids
...
RealTime: Validate IDs
GitOrigin-RevId: 884600125d362c5632faa75dc22d957cdddc101b
2021-09-02 08:03:14 +00:00
Jakob Ackermann
b8fcb265b2
[misc] EventLogger: drop explicit metrics.inc amount
...
The module has a hard-coded increment of 1, which is the only value the
prometheus backend supports.
2021-07-13 12:40:46 +01:00
Jakob Ackermann
bd5e8b8f71
[misc] fix chai assertions .equal.true -> .equals(true)
2021-07-13 12:34:56 +01:00
Jakob Ackermann
7e8e231059
[misc] run format_fix and lint:fix
2021-07-13 12:04:45 +01:00
Jakob Ackermann
a26ae73597
[misc] switch from settings-sharelatex to @overleaf/settings
2021-07-12 17:47:18 +01:00
Eric Mc Sween
b9e7cbf73b
Add global test setup
...
Configure chai and SandboxedModule in a central place. Configure
SandboxedModule globals that are needed in Node 12.
2021-03-18 16:41:31 -04:00
Jakob Ackermann
b7b13a90d1
[misc] ApplyUpdateTests: process all the pending-updates-lists
2021-03-01 15:26:18 +00:00
Henry Oswald
46b389e8b3
fix off by 1 error in key sharding
2021-02-09 10:48:40 +00:00
Henry Oswald
31e1808dd8
shard the pending-updates-list queue
2021-02-08 16:02:41 +00:00
Henry Oswald
c308e60b6b
speed up DocumentUpdaterControllerTests by directly injecting redis into
...
tests
2021-02-08 11:13:22 +00:00
Jakob Ackermann
746c5aeb80
[misc] bump metrics module to 3.4.1
...
- renamed package from `metrics-sharelatex` to `@overleaf/metrics`
- drop support for statsd backend
- decaffeinate
- compress `/metrics` response using gzip
- bump debugging agents to latest versions
- expose prometheus interfaces for custom metrics (custom tags)
- cleanup of open sockets metrics
- fix deprecation warnings for header access
2020-11-25 11:57:22 +00:00
Jakob Ackermann
15af5c7977
[misc] bump @overleaf/redis-wrapper to version 2.0.0
2020-11-11 16:24:22 +00:00
Jakob Ackermann
e846192db0
[MatrixTests] add a large testing matrix
...
Layers/Dimensions:
- users: anonymous, registered, registeredWithOwnedProject
- session setup: noop, joinReadWriteProject, joinReadWriteProjectAndDoc,
joinOwnProject, joinOwnProjectAndDoc
- invalid requests: noop, joinProjectWithDocId, joinDocWithDocId,
joinProjectWithProjectId, joinDocWithProjectId,
joinProjectWithProjectIdThenJoinDocWithDocId
2020-10-07 16:20:21 +01:00
Jakob Ackermann
4ec73acb88
Merge branches 'jpa-prepare-for-matrix-tests' and 'jpa-setup-session-helper' into jpa-matrix-tests
2020-10-01 12:57:40 +01:00
Jakob Ackermann
2900c60c4a
[FixturesManager] add a helper for setting up project and doc together
2020-10-01 12:33:15 +01:00
Jakob Ackermann
78fbd04ef8
[MockWebServer] grant users at least the privileges of anonymous users
2020-10-01 12:28:39 +01:00
Jakob Ackermann
4f860995d8
[MockDocUpdaterServer] return a 404 when a requested doc does not exist
2020-10-01 12:25:41 +01:00
Jakob Ackermann
c6f2a3b387
Merge pull request #189 from overleaf/jpa-relevel-log
...
[misc] re-level expected error log messages
2020-09-02 10:46:08 +02:00
Jakob Ackermann
4960bdd6fe
[misc] re-level log: 404 from web -> WARN and emit 'project not found'
...
A stale browser tab tried to join a deleted project.
Emitting 'project not found'/'ProjectNotFound' will trigger a page
reload in the frontend, upon web can render a 404.
See frontend: ConnectionManager.joinProject callback
2020-08-27 11:51:57 +01:00
Jakob Ackermann
55d938ba14
[misc] add tests for web replying with a 404 for joinProject
2020-08-27 11:51:56 +01:00
Jakob Ackermann
884b340c75
[misc] re-level log: 403 from web goes to WARN and emit 'not authorized'
...
Users will get redirected to the login page and will see a 'restricted'
page after logging in again.
See frontend: ConnectionManager.reportConnectionError
2020-08-27 11:51:56 +01:00
Jakob Ackermann
d2a2b9d46e
[misc] add tests for web replying with a 403 for joinProject
2020-08-27 11:51:56 +01:00
Jakob Ackermann
2ce7b36c95
[misc] drop duplicate log line for unauthorized applyOtUpdate calls
...
The violation is logged in Router._handleError.
2020-08-27 10:22:31 +01:00
Jakob Ackermann
425052ff91
Merge pull request #187 from overleaf/jpa-o-error-tagging
...
[misc] migrate to OError tagging/wrapping
2020-08-25 11:46:28 +02:00
Jakob Ackermann
ee3d3b09ed
[misc] wrap redis errors as tagging does not work with them
...
ioredis may reuse the error instance for multiple callbacks. E.g. when
the connection to redis fails, the queue is flushed with the same
MaxRetriesPerRequestError instance.
2020-08-24 10:12:20 +01:00
Jakob Ackermann
537e97be73
[misc] OError.tag all the errors in async contexts
...
See the docs of OError.tag:
https://github.com/overleaf/o-error#long-stack-traces-with-oerrortag
(currently at 221dd902e7bfa0ee92de1ea5a3cbf3152c3ceeb4)
I am tagging all errors at each async hop. Most of the controller code
will only ever see already tagged errors -- or new errors created in
our app code. They should have enough info that we do not need to tag
them again.
2020-08-24 10:12:06 +01:00
Jakob Ackermann
4cb8cc4a85
[DocumentUpdaterManager] use a new ClientRequestedMissingOpsError
2020-08-21 12:47:07 +01:00
Jakob Ackermann
8abfdb87ff
[DocumentUpdaterManager] use a new DocumentUpdaterRequestFailedError
2020-08-21 12:47:07 +01:00
Jakob Ackermann
68bc9d0d23
[WebApiManager] use a new WebApiRequestFailedError
2020-08-21 12:47:06 +01:00
Jakob Ackermann
af50f9b02c
[DocumentUpdaterManager] use a new UpdateTooLargeError
2020-08-21 12:47:05 +01:00
Jakob Ackermann
5950b26a42
[SafeJsonParse] migrate to OError and use a new DataTooLargeToParseError
2020-08-21 12:47:05 +01:00
Jakob Ackermann
f82177a46a
[Errors] migrate to OError
2020-08-21 12:47:04 +01:00
Brian Gough
831d794bf4
clean up join/leave handling
...
Co-Authored-By: Jakob Ackermann <jakob.ackermann@overleaf.com>
2020-08-12 10:54:22 +01:00
Jakob Ackermann
8601084a2e
[misc] WebsocketControllerTests: remove debugging code
2020-07-01 11:36:36 +01:00
Jakob Ackermann
a77222470b
[misc] WebsocketControllerTests: always pass cb to updateClientPosition
...
...and fix the inconsistent async behaviour for logged-in vs anonymous
users in the app.
2020-06-29 18:11:33 +01:00
Jakob Ackermann
4d01c02946
[misc] WebsocketControllerTests: explicitly pass a cb to leaveProject
...
...and fix the stubbing of `io.sockets.clients`.
We were running the assertions prior to the actual completion of the
leaveProject. Which in turn shadowed the broken test setup --
`io.sockets.clients()` was returning the `this.clientsInRoom=[]` from a
previous context.
2020-06-29 17:38:22 +01:00
Jakob Ackermann
bea0e9beb7
[misc] RoomManagerTests: explicitly pass a cb to joinProject/joinDoc
2020-06-29 17:12:26 +01:00
Jakob Ackermann
c76bcb7732
[misc] fix eslint errors in XMLHttpRequest.js
2020-06-24 10:52:37 +01:00
decaffeinate
53058452ee
prettier: convert miscellaneous files to Prettier format
2020-06-24 10:28:28 +01:00
decaffeinate
8a7fc78dc8
prettier: convert test/acceptance decaffeinated files to Prettier format
2020-06-23 18:30:45 +01:00
decaffeinate
db98fdac0a
decaffeinate: rename test/acceptance/coffee to test/acceptance/js
2020-06-23 18:30:37 +01:00
decaffeinate
5443450abb
decaffeinate: Run post-processing cleanups on ApplyUpdateTests.coffee and 18 other files
2020-06-23 18:30:34 +01:00
decaffeinate
d318e4fd0e
decaffeinate: Convert ApplyUpdateTests.coffee and 18 other files to JS
2020-06-23 18:30:29 +01:00
decaffeinate
30a9c6ed2c
decaffeinate: Rename ApplyUpdateTests.coffee and 18 other files from .coffee to .js
2020-06-23 18:30:23 +01:00
decaffeinate
3eceb8a5f6
prettier: convert test/unit decaffeinated files to Prettier format
2020-06-23 18:30:16 +01:00
decaffeinate
68e2adebf5
decaffeinate: rename test/unit/coffee to test/unit/js
2020-06-23 18:30:06 +01:00
decaffeinate
93697a8c5c
decaffeinate: Run post-processing cleanups on AuthorizationManagerTests.coffee and 13 other files
2020-06-23 18:30:03 +01:00
decaffeinate
2ca620e7a0
decaffeinate: Convert AuthorizationManagerTests.coffee and 13 other files to JS
2020-06-23 18:29:59 +01:00
decaffeinate
e5d07bd3af
decaffeinate: Rename AuthorizationManagerTests.coffee and 13 other files from .coffee to .js
2020-06-23 18:29:53 +01:00
Jakob Ackermann
8ac973e767
[misc] help prettier/decaffeinate with scoping a comment into a fn body
2020-06-23 18:04:09 +01:00