Commit graph

603 commits

Author SHA1 Message Date
Jakob Ackermann
dea6968fa9 [misc] explicitly install underscore
Use the same (outdated) version that is already in place.
2020-11-11 16:23:12 +00:00
Jakob Ackermann
222caeb9a8 Merge pull request #196 from overleaf/jpa-drop-duplicate-join
[RoomManager] drop duplicate joining of entities
2020-10-19 17:01:40 +02:00
Jakob Ackermann
307c04c442 Merge pull request #195 from overleaf/jpa-plain-dev-env
[misc] bump the dev-env to 3.3.5 -- drop custom unit test timeout
2020-10-19 17:01:32 +02:00
Jakob Ackermann
d6ac8c14e7 [RoomManager] drop duplicate joining of entities
REF: 0437e1d03f89a058f97a8884e3532a9a58b68b9d
REF: 62be5e29e5232150e7063bc189c5ad8a1189f972
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-10-19 15:54:37 +01:00
Jakob Ackermann
b20cdc0122 [misc] bump the dev-env to 3.3.5 -- drop custom unit test timeout 2020-10-19 15:20:57 +01:00
Jakob Ackermann
e8911babe0 Merge pull request #182 from overleaf/dependabot-npm_and_yarn-lodash-4.17.20
Bump lodash from 4.17.15 to 4.17.20
2020-10-08 10:42:21 +02:00
Jakob Ackermann
e9c23b6409 Merge pull request #191 from overleaf/dependabot-npm_and_yarn-node-fetch-2.6.1
Bump node-fetch from 2.6.0 to 2.6.1
2020-10-08 10:42:08 +02:00
Jakob Ackermann
5b53832bf2 Merge pull request #192 from overleaf/jpa-bump-dev-env-3-3-4-node-10-22-1
[misc] bump the dev-env to 3.3.4 and bump the node version to 10.22.1
2020-10-08 10:41:56 +02:00
Jakob Ackermann
152f6c5596 Merge pull request #194 from overleaf/jpa-matrix-tests
[MatrixTests] add a large testing matrix
2020-10-08 10:41:44 +02: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
65eed4138e Merge pull request #193 from overleaf/jpa-swallow-write-after-end
[app] ignore error from writing to disconnected long-polling client
2020-09-22 15:23:47 +02:00
Jakob Ackermann
cc681a94f4 [app] ignore error from writing to disconnected long-polling client 2020-09-22 14:10:23 +01:00
Jakob Ackermann
f3c7619fb5 [misc] revert back to high timeout for unit tests 2020-09-17 15:34:03 +01:00
Jakob Ackermann
ba3b4f7dcd [misc] bump the dev-env to 3.3.4 and bump the node version to 10.22.1 2020-09-17 15:26:45 +01:00
dependabot[bot]
ee06705377 Bump lodash from 4.17.15 to 4.17.20
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-16 10:38:21 +00:00
dependabot[bot]
10c6e01bd8 Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-12 15:08:05 +00:00
Jakob Ackermann
a2f5bf463e Merge pull request #190 from overleaf/jpa-socket-io-logger
[misc] socket.io: use a custom logger
2020-09-02 10:46:23 +02: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
54c0853aa5 Merge pull request #188 from overleaf/jpa-drop-duplicate-log
[misc] drop duplicate logs
2020-09-02 10:45:57 +02:00
Jakob Ackermann
72282a07df [misc] socket.io: use a custom logger
- forward the previously enabled log messages to our logger-module
- stub the previously disabled logger methods
- drop the log-level config for socket.io
2020-09-01 09:30:11 +01: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
1ff9c1e71b [misc] add the rpc-method into the log context in Router._handleError 2020-08-27 11:51:55 +01:00
Jakob Ackermann
0647abf433 [misc] drop info-log in WebApiManager for joinProject being rate-limited
The CodedError is logged at warn-level in Router._handleError.
2020-08-27 11:51:09 +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
dee4749e6d [misc] re-level log: properly silence unauthorized updateClientPosition 2020-08-27 10:11:40 +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
64e659bf43 Merge pull request #186 from overleaf/jpa-fix-join-project-error-context
[misc] fix join project error context
2020-08-25 11:46:18 +02:00
Jakob Ackermann
849a1cf416 Merge pull request #185 from overleaf/jpa-doc-id-in-error-context
[misc] add/bring back doc_id in error context
2020-08-25 11:42:41 +02:00
Jakob Ackermann
735027a2b7 Merge pull request #184 from overleaf/jpa-custom-errors
[misc] migrate to custom OErrors
2020-08-25 11:42:19 +02:00
Jakob Ackermann
6df23a9712 Merge pull request #183 from overleaf/jpa-increase-unit-test-timeout
[misc] increase the timeout for unit tests -- CI boxes are too slow
2020-08-25 11:41:53 +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
8e31cc5c23 [Router] _handleError: joinProject error-context may not have project_id
The ol_context patch changed the priority of client context and rpc
 context.
This lead to the (possibly missing) project_id of the client context
 overwriting the project_id of the rpc context.
REF: f1d55c0a5437a518e9f4617473caed9ba928e648
2020-08-21 13:29:28 +01:00
Jakob Ackermann
f935b1881a [Router] leaveDoc: pass the doc_id into the error-context 2020-08-21 12:47:42 +01:00
Jakob Ackermann
fd88819eec [Router] _handleError: ol_context.doc_id does not exist, drop overwrite 2020-08-21 12:47:42 +01:00
Jakob Ackermann
880056d397 [Router] use a new UnexpectedArgumentsError 2020-08-21 12:47:08 +01:00
Jakob Ackermann
50140f785a [WebsocketController] use a new JoinLeaveEpochMismatchError 2020-08-21 12:47:08 +01:00
Jakob Ackermann
0462e3e437 [WebsocketController] use a new NotJoinedError 2020-08-21 12:47:07 +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
02a2382264 [WebApiManager] use a new CorruptedJoinProjectResponseError 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
59c4c884a5 [WebsocketController] use the new NotAuthorizedError 2020-08-21 12:47:06 +01:00