balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.83k stars 1.95k forks source link

Recommended use of sails-mongo with current MongoDB? #7111

Open mactyr opened 3 years ago

mactyr commented 3 years ago

Node version: 14.16.0 Sails version (sails): 1.4.2 ORM hook version (sails-hook-orm): 3.0.2 Sockets hook version (sails-hook-sockets): N/A Organics hook version (sails-hook-organics): N/A Grunt hook version (sails-hook-grunt): N/A Uploads hook version (sails-hook-uploads): N/A DB adapter & version (e.g. sails-mysql@5.55.5): sails-mongo@1.2.0 Skipper adapter & version (e.g. skipper-s3@5.55.5): N/A


I have a sails application I am trying to update from mongodb 3.4 (which is past end-of-life) to the current stable, 4.4, or as near as possible.

The latest released version of sails-mongo in npm appears to be 1.2.0, and the readme says it's been tested with MongoDB 3.4 and 3.6. sails-mongo 1.2.0 requires node mongodb driver version 2.2.25, which based on this compatibility chart appears to be officially only compatible with MongoDB up to 3.4.

The sails-mongo repo readme says "This version of the adapter has been tested with MongoDB versions 3.6, 4.0, and 4.2. It uses MongoDB 3.5.x connection options." and its package.json lists mongodb driver 3.5.9 as a dependency, which according to the compatibility chart should support up to MongoDB 4.2 (though not 4.4).

I see that a sails-mongo 2.0.0-0 pre-release (which would presumably be compatible up to MongoDB 4.2) was tagged in Nov 2020, but it doesn't look like there's been any further activity since that month.

My questions are:

  1. Are there known issues with the sails-mongo 2.0.0-0 pre-release, or is it considered reasonably safe to use? If there are known issues, is there an expected timeline for resolving them and releasing 2.0.0 to npm?
  2. Are there plans to support MongoDB 4.4 in sails-mongo?
  3. In general, should we still consider sails-mongo to be a maintained, core adapter, or do you recommend migrating away from MongoDB for sails applications? The latest MongoDB version supported by the released (1.2.0) sails-mongo is 3.6, which is scheduled for end-of-life this month (April 2021), so we seem to be quite close to a situation where it's impossible to use a stable sails-mongo with a supported MongoDB.
sailsbot commented 3 years ago

@mactyr Thanks for posting! We'll take a look as soon as possible.

In the mean time, there are a few ways you can help speed things along:

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

lfelipeqn commented 3 years ago

Hopefully this can be solved soon. Looking forward to upgrade Mongo to 4.4 version

mactyr commented 3 years ago

I notice that sails-mongo 2.0.0 was tagged and released to npm on Apr 29, so that answers my first question above, but it would still be helpful to understand the status/roadmap for sails-mongo: are there plans to support MongoDB 4.4? In general, is there appetite on the team to continue to maintain sails-mongo as a core adapter?

eashaw commented 3 years ago

Hi @mactyr and @lfelipeqn, as of sails-mongo v2.0.0 mongodb databases up to 4.2 are fully supported. We do not have any updates about mongodb 4.4 support to share right now, but we would be happy to look at a PR if anyone is willing and has the time.

designbymind commented 1 year ago

Just wanted to chime in here. Realizing this thread is (well over) a year old. I've been successfully using MongoDB v4.4 for quite some time with sails-mongo v2.0.0-0. I hope that helps. — Also, I'm very interested in using MongoDB v6, so if anyone has tested sails-mongo with v5.1+, please advise. Thank you 🙂

DmitrKulagin commented 1 year ago

Hi! I've done apt upgade and am now looking for a solution to roll back the upgrade to version 5.0 to 4.2 or move to a different adapter. My project has stopped working and the database is crashing. Lots of user complaints and problems.