-
Notifications
You must be signed in to change notification settings - Fork 73
Updated MongoDB driver to version 3 + minor project maintenance #153
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
Conversation
…y the requirements of the new version of the driver
…nnection strings not compatible with the latest version of the mongo driver
…s and updated vulnerable dependant packages to patch vulnerabilities
I would recommend creating a new major version for Mongo2Go (4.x). This is due to the change in framework targets (now dropping support for old .NET Framework versions less than 4.7.2) and also due to the mongo DB driver switching to strong named assemblies (see .NET Driver Version 2.28.0 Release Notes). |
Excellent! Thank you very much for you hard work. I will prepare a new release in the next day! :-) |
Hey @JohannesHoppe , we are waiting for this awesome upgrade :) Thanks ! |
Hi @JohannesHoppe . I'm also interested in this update. If we can review and approve the PR would be awesome. Thanks |
@DrewM-Hax0r Finally, the release is ready. 🎉 Thank you very much for your patience. Everything seems to have been fine. But since I'm on a Mac M1 (ARM) myself, I can't test the package locally. Does it work for you? |
Ok, this is only half-way true:
Rosetta is impressive. It just worked?? |
@JohannesHoppe Yes! I removed the version from my project that I compiled for myself last week, and replaced with the new NuGet 4.0.0 version. Works great. Thanks! |
Many thanks for keeping this project alive! 🙏 Do you think it's much work to switch to the latest MongoDB binaries? |
I don't necessarily think it would be that much work. The driver library should take care of a lot of the heavy lifting on its own, so now that it's running the latest version updating MongoDB should be on the table. Really, most incompatibilities would just come with how consumers of the library code against it. I am not super familiar with how this project provides the MongoDB binaries, so I would have to spend some time looking into that before deciding what the best path forward would be, either just updating the binaries straight up and leaving the old v4 behind completely, or something else |
@DrewM-Hax0r Oh, that's simple! 😃 This repository includes a project called "MongoDownloader," which is designed to download the binaries and place them in the correct folder. Mongo2Go ships with all binaries directly in the package, which is why the package size is relatively large. To ensure a trustless setup, I will run the Downloader again before merging to verify that the binaries haven't been altered. The main task will be to test whether the new package still works seamlessly with existing projects. |
This pull request contains the following changes:
Updated the MongoDB driver package to the latest version (v3.0.0)
Adjusted how the connection string is built when using single node replica sets. This change was done due to a change in functionality with the new MongoDB driver version.
Adjusted project framework targets. The project now multi-targets .NET Framework 4.7.2+ and .NET Standard 2.1. This change was due to the minimum supported .NET version requirements for the new version of the MongoDB driver. I could have just switched from .NET Standard 2.0 to .NET Standard 2.1, but decided instead to multi-target to retain compatibility with the older .NET Framework versions when possible.
Updated Microsoft.Extensions.Logging.Absttractions dependency from version 5.0.0 to version 6.0.0. This was done due to the 5.0.0 version being deprecated and no longer supported.
Updated System.Text.Json from version 5.0.1 to version 6.0.10. This was done to patch multiple vulnerabilities with this library that have been found and patched over time.
Retargeted the downloader and test projects from .NET 5 to .NET 8. .NET 5 is out of support, and .NET 8 is the current LTS release of .NET.
Various dependent package updates in the downloader and test projects to replace deprecated packages and patch vulnerabilities.
Please Note that the bundled version of Mongo included with this package has not changed and is still v4.4.4. This version of MongoDB is still compatible with the latest version of the driver, so there was no need to update at this time. More changes would need to be made to support more recent releases of MongoDB, so it was out of scope for the driver update. If this change goes over well and there is demand for it, I may look into updating the version of MongoDB in the future.
Thanks