Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with MongoDB 6.0.2 #7275

Closed
milarevictor opened this issue Apr 12, 2023 · 33 comments
Closed

Incompatibility with MongoDB 6.0.2 #7275

milarevictor opened this issue Apr 12, 2023 · 33 comments

Comments

@milarevictor
Copy link

milarevictor commented Apr 12, 2023

[incompatibility with mongodb 6.0.2]

Node version:
Sails version 1.5.4:
ORM hook version 4.0.2:
Sockets hook version 2.0.3:
Organics hook version 2.2.1:
Grunt hook version 5.0.0:
Uploads hook version 0.4.3:
DB adapter & version [email protected]:


Hi,

The current version is throwing an error when trying to connect to MongoDB 6.0.2 server.

2023-04-12T18:59:07.015417+00:00 app[web.1]: AdapterError: Unexpected error from database adapter: Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal

@sailsbot
Copy link

@milarevictor 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:

  • look for a workaround. (Even if it's just temporary, sharing your solution can save someone else a lot of time and effort.)
  • tell us why this issue is important to you and your team. What are you trying to accomplish? (Submissions with a little bit of human context tend to be easier to understand and faster to resolve.)
  • make sure you've provided clear instructions on how to reproduce the bug from a clean install.
  • double-check that you've provided all of the requested version and dependency information. (Some of this info might seem irrelevant at first, like which database adapter you're using, but we ask that you include it anyway. Oftentimes an issue is caused by a confluence of unexpected factors, and it can save everybody a ton of time to know all the details up front.)
  • read the code of conduct.
  • if appropriate, ask your business to sponsor your issue. (Open source is our passion, and our core maintainers volunteer many of their nights and weekends working on Sails. But you only get so many nights and weekends in life, and stuff gets done a lot faster when you can work on it during normal daylight hours.)
  • let us know if you are using a 3rd party plugin; whether that's a database adapter, a non-standard view engine, or any other dependency maintained by someone other than our core team. (Besides the name of the 3rd party package, it helps to include the exact version you're using. If you're unsure, check out this list of all the core packages we maintain.)

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.

@milarevictor milarevictor changed the title Imcompatibily with MongoDB 6.0.2 Incompatibility with MongoDB 6.0.2 Apr 12, 2023
@ebarojas
Copy link

ebarojas commented Apr 13, 2023

My workaround was migrating to a dedicated MongoDB cluster that I could configure to run Mongo 4.4.

This works so far, but, I will have to pay around 50 usd / month extra (it used to be free) + I think Mongo 4.4 support will not last more than 2 years. Not ideal but works.

Edit: to add some more feedback, as far as I can see this issue means sails will no longer with free versions of MongoDB Atlas.

@vidueirof
Copy link

It's loos like sails-mongo is using an old mongo driver :-(

@jogbuwa
Copy link

jogbuwa commented Apr 16, 2023

@vidueirof @ebarojas @milarevictor @tedkulp
I'm having this issue too on two different apps of ours. Please, is there any fix for this, now?

@lcborn4
Copy link

lcborn4 commented Apr 16, 2023

My workaround was migrating to a dedicated MongoDB cluster that I could configure to run Mongo 4.4.

This works so far, but, I will have to pay around 50 usd / month extra (it used to be free) + I think Mongo 4.4 support will not last more than 2 years. Not ideal but works.

Edit: to add some more feedback, as far as I can see this issue means sails will no longer with free versions of MongoDB Atlas.

I tried this workaround and it worked. I will use this in the mean time while I look up alternatives.

@vidueirof
Copy link

vidueirof commented Apr 17, 2023

I'm working on a update to sails-mongo with mongodb driver 4.8.1, min version with mongo 6 support (https://www.mongodb.com/docs/drivers/node/current/compatibility/).
This is my fork: https://github.com/vidueirof/sails-mongo#upgrade-mondgo-driver

@vidueirof
Copy link

balderdashy/sails-mongo#497 but it requires to deprecate node 10 support.

@tonysparksUC
Copy link

this is super duper not cool. my apps dont work.... and i dont have money to pay for a dedicated server. can we please figure out a solution to work with mongo db 6

@vidueirof
Copy link

@tonysparksUC you can temporally try the fix that it is in my fork: https://github.com/vidueirof/sails-mongo/tree/upgrade-mondgo-driver

Try updating your package.json like this

"sails-mongo": "git+https://github.com/vidueirof/sails-mongo.git#upgrade-mondgo-driver",

@NachtRitter
Copy link

@tonysparksUC I would recommend you just to switch to another normal modern alive framework.
You're expecting a lot of from dead framework 😆

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

My workaround was migrating to a dedicated MongoDB cluster that I could configure to run Mongo 4.4.
This works so far, but, I will have to pay around 50 usd / month extra (it used to be free) + I think Mongo 4.4 support will not last more than 2 years. Not ideal but works.
Edit: to add some more feedback, as far as I can see this issue means sails will no longer with free versions of MongoDB Atlas.

I tried this workaround and it worked. I will use this in the mean time while I look up alternatives.

But moving to a dedicated cluster as much as I know is an irreversible action. You'll keep paying as much as you are currently paying. So, it's not really a temporary fix.

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

@sailsbot Do we have any hopes of getting a fix to this outdated sails-mongo adapter soonest?

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

@tonysparksUC you can temporally try the fix that it is in my fork: https://github.com/vidueirof/sails-mongo/tree/upgrade-mondgo-driver

Try updating your package.json like this

"sails-mongo": "git+https://github.com/vidueirof/sails-mongo.git#upgrade-mondgo-driver",

@vidueirof
Do you have this working for you now?

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

git+https://github.com/vidueirof/sails-mongo.git#upgrade-mondgo-driver

@tonysparksUC you can temporally try the fix that it is in my fork: https://github.com/vidueirof/sails-mongo/tree/upgrade-mondgo-driver

Try updating your package.json like this

"sails-mongo": "git+https://github.com/vidueirof/sails-mongo.git#upgrade-mondgo-driver",

Is this update supposed to happen at the app root folder package.json file? I don't seem to be getting this right. Thanks

@vidueirof
Copy link

@jogbuwa, yes I have this fix working on some projects. You have to replace where you usually have sails-mongo import, and run npm installto fetch the new dependency.

Screenshot 2023-04-19 at 12 58 43

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

@jogbuwa, yes I have this fix working on some projects. You have to replace where you usually have sails-mongo import, and run npm installto fetch the new dependency.

Screenshot 2023-04-19 at 12 58 43

I see. I'll give that a try and let you know how it goes.

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

@jogbuwa, yes I have this fix working on some projects. You have to replace where you usually have sails-mongo import, and run npm installto fetch the new dependency.

Screenshot 2023-04-19 at 12 58 43

Hey @vidueirof
It worked on the development server of one of our apps. Yet to move it to staging and production. Do you have an idea of any caveats to this temporary implementation?

Thanks

@vidueirof
Copy link

@jogbuwa the only thing, as far we know, with this update we are dropping node 10 support. Maybe you want to test it in development a bit more to be sure it's stable before going to production (or other environments).

@jogbuwa
Copy link

jogbuwa commented Apr 19, 2023

@vidueirof Noted with thanks.

@tonysparksUC
Copy link

@vidueirof thank you for making the fork and @jogbuwa please post here and let me know if the fork works well.

id like to help you and your apps if I'm able. what your other pain points in life or businesses?

@DominusKelvin
Copy link
Contributor

Hey all. I'm just getting more acquainted with this issue and I really think like you all we should look at this to upgrade sails-mongo to support the latest version of MongoDB

I'll update this issue with progress as we look to resolve this.

@DominusKelvin
Copy link
Contributor

Hey @vidueirof how is your availability like for next week? I think we can pair on this one to move this adapter to the latest and greatest MongoDB driver.

We discussed this in core and we are happy to move forward with this but want an input from a Sails user shipping MongoDB with Sails so we can test it a great deal.

Are you up for it @vidueirof?

@DominusKelvin
Copy link
Contributor

Also @jogbuwa would you be open to also dogfooding when we release a major for sails-mongo? This is to ensure it works without regressions for you in your production apps?

@DominusKelvin
Copy link
Contributor

Hey @milarevictor, @jogbuwa and @vidueirof just a heads up, work has already begun on this to move sails-mongo to the latest and greatest of MongoDB. I'll make a PR soon that you can all track. Thanks

https://github.com/DominusKelvin/sails-mongo/tree/feat/upgrade-to-mongo-6

@DominusKelvin
Copy link
Contributor

Hey all, here is the WIP PR. This is looking to be a significant upgrade especially since we are moving from the callback based API that was previously supported by mongodb driver before the latest version to a promise-based API.

balderdashy/sails-mongo#499

@luislobo
Copy link
Contributor

luislobo commented Oct 1, 2023

As mentioned on that PR:

@DominusKelvin I've been spending a lot of time working on first cleaning up sails-mongo code to more current one, removing travis and appveyor and using github actions.

We have been talking with @Josebaseba (who has been a long time maintainer/contributor, like me) to sails-mongo.

We are all wasting time working on the same things in parallel.

Please check: #498

@mikermcneil We really need to get together and have a real action plan here.

@vidueirof
Copy link

Hi Dom, yes sure https://calendly.com/d/3cw-qyk-xbb/dom-sails-sails-mongo

Hey @vidueirof how is your availability like for next week? I think we can pair on this one to move this adapter to the latest and greatest MongoDB driver.

We discussed this in core and we are happy to move forward with this but want an input from a Sails user shipping MongoDB with Sails so we can test it a great deal.

Are you up for it @vidueirof?

@marecatg
Copy link

Hello, any news about a potential release ?

Regards,

@DominusKelvin
Copy link
Contributor

Hello, any news about a potential release ?

Regards,

Hi @marecatg not yet. But I'll leave an update soon. Thanks for your patience on this one

@DominusKelvin
Copy link
Contributor

Hey @milarevictor, @marecatg, @jogbuwa, @tonysparksUC, @ebarojas, @NachtRitter, I'll be closing this issue as this PR has implemented the upgrade and it has been merged. Thank you for waiting on this 💙

Also you can check here for the upgrade information. 👇🏾

https://blog.sailscasts.com/sails-mongo-v2-1-0

@jogbuwa
Copy link

jogbuwa commented Dec 12, 2023

Hey @milarevictor, @marecatg, @jogbuwa, @tonysparksUC, @ebarojas, @NachtRitter, I'll be closing this issue as this PR has implemented the upgrade and it has been merged. Thank you for waiting on this 💙

Also you can check here for the upgrade information. 👇🏾

https://blog.sailscasts.com/sails-mongo-v2-1-0

@DominusKelvin Glad to hear! Kudos to you and the team for upgrading the Sails Mongo adapter!
However, I think it is worth noting that it'll be a lot helpful to have these sort of system breaking issues attended to and resolved sooner to ensure Sails' competitiveness as a modern and reliable MVC framework that teams can continue to utilize. Quite frankly, April to December 2023 was a really long time to get a fix on a framework that has lots of apps in production, that are being used daily.

Currently, my team and I are contemplating using Sails or another popular framework for a new, robust project for the reason above. Prior to now, it was always a no-brainer for us to use Sails.

I'm hoping this feedback would get a warm reception from the Sails team.

Thanks!

@jogbuwa
Copy link

jogbuwa commented Dec 12, 2023

Hey @milarevictor, @marecatg, @jogbuwa, @tonysparksUC, @ebarojas, @NachtRitter, I'll be closing this issue as this PR has implemented the upgrade and it has been merged. Thank you for waiting on this 💙

Also you can check here for the upgrade information. 👇🏾

https://blog.sailscasts.com/sails-mongo-v2-1-0

Looking forward to implementing this new update.

@DominusKelvin
Copy link
Contributor

Hey @milarevictor, @marecatg, @jogbuwa, @tonysparksUC, @ebarojas, @NachtRitter, I'll be closing this issue as this PR has implemented the upgrade and it has been merged. Thank you for waiting on this 💙

Also you can check here for the upgrade information. 👇🏾

https://blog.sailscasts.com/sails-mongo-v2-1-0

@DominusKelvin Glad to hear! Kudos to you and the team for upgrading the Sails Mongo adapter!

However, I think it is worth noting that it'll be a lot helpful to have these sort of system breaking issues attended to and resolved sooner to ensure Sails' competitiveness as a modern and reliable MVC framework that teams can continue to utilize. Quite frankly, April to December 2023 was a really long time to get a fix on a framework that has lots of apps in production, that are being used daily.

Currently, my team and I are contemplating using Sails or another popular framework for a new, robust project for the reason above. Prior to now, it was always a no-brainer for us to use Sails.

I'm hoping this feedback would get a warm reception from the Sails team.

Thanks!

Hey I understand it was a long wait and definitely frustrating. I apologize for this.

We plan to be more swift with the changes and upgrades as needed but rest assured work is actively being done on the framework(both maintenance and adding new features.)

Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests