openwhyd
openwhyd copied to clipboard
Finish/fix migration to Mongodb 3
TODO
- [ ] fix circular dependencies (see warnings included below)
- [ ] DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
- [ ] in calls to
find()
:fields:
-->projection:
- [ ] remove remaining references to deprecated functions (e.g.
count()
andremove()
)
Refs:
- node-mongodb-native/CHANGES_3.0.0.md at 3.6 ยท mongodb/node-mongodb-native
- https://mongodb.github.io/node-mongodb-native/3.6/api/
- fix: Improve use of MongoDB 3 (wip)
- notes from fix(mongodb): prevent "db.collections is not a function" error by adrienjoly ยท Pull Request #232 ยท openwhyd/openwhyd
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
After migrating to mongodb client v3 (see PRs #356 and #355, running in production for 2 days), we're getting the following warnings (and probably many others):
โ Error -- Sun, 08 Nov 2020 13:49:17 GMT (node:4241) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
โ Error -- Sun, 08 Nov 2020 13:49:17 GMT (node:4241) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
โ Error -- Sun, 08 Nov 2020 13:49:17 GMT (node:4241) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
โ Error -- Sun, 08 Nov 2020 13:49:17 GMT (node:4241) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
...as spotted in https://github.com/openwhyd/openwhyd/runs/1370367735#step:10:40.
Done in #630.