overleaf / spelling

The backend spellcheck API that performs spell checking for Overleaf
GNU Affero General Public License v3.0
9 stars 17 forks source link

[misc] migrate to the native mongo driver #69

Closed das7pad closed 4 years ago

das7pad commented 4 years ago

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

das7pad commented 4 years ago

I've added a similar commit as overleaf/chat#60 to this PR.