changed startup
The startup behavior has been changed in the chat service already https://github.com/overleaf/chat/pull/54 and is running with success in prod by now.
> This PR changes the startup of the service to not accept any http requests until after the mongo connection has been established. It also adds the correct way to handle connection setup errors, to catch and log them -- vs just letting them bubble up as unhandled PromiseRejections.
>
> The web service can start without an established/working mongo connection, which is bad. Eventually we can port this snippet over.
Potential Impact
High. All interactions which persist changes to mongo.
Manual Testing Performed
create a new project
enable spell check
write two typoed words
see the two words with red underline
add both words to the dics
reload the page
no red underline for the words
in the admin panel -> select user -> dict -> delete one word
reload the page and see one word only
open project and see the deleted words with red underline
add the word back in
in the admin panel -> user -> dict -> delete the full dict
Description
For https://github.com/overleaf/issues/issues/2907 This PR is migrating the mongo driver from mongojs to mongodb -- the native driver.
Related Issues / PRs
https://github.com/overleaf/issues/issues/2907 Previous migration: https://github.com/overleaf/chat/pull/53 https://github.com/overleaf/chat/pull/54 https://github.com/overleaf/docstore/pull/66 (https://github.com/overleaf/contacts/pull/49 https://github.com/overleaf/document-updater/pull/144 https://github.com/overleaf/github-sync/pull/57 https://github.com/overleaf/notifications/pull/27 https://github.com/overleaf/project-history/pull/358 pending in review)
Review
changed startup
The startup behavior has been changed in the chat service already https://github.com/overleaf/chat/pull/54 and is running with success in prod by now. > This PR changes the startup of the service to not accept any http requests until after the mongo connection has been established. It also adds the correct way to handle connection setup errors, to catch and log them -- vs just letting them bubble up as unhandled PromiseRejections. > > The web service can start without an established/working mongo connection, which is bad. Eventually we can port this snippet over.Potential Impact
High. All interactions which persist changes to mongo.
Manual Testing Performed