Skip to content

Conversation

DrewM-Hax0r
Copy link
Contributor

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

  • Drew

…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
@DrewM-Hax0r
Copy link
Contributor Author

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).

@JohannesHoppe
Copy link
Member

Excellent! Thank you very much for you hard work. I will prepare a new release in the next day! :-)

@gogetenk
Copy link

Hey @JohannesHoppe , we are waiting for this awesome upgrade :)
If you are not actively maintaining the project anymore, any chance you would give some of us the power to approve the upcoming PRs ?
Would be easier than forking...

Thanks !

@reyarmstrong
Copy link

Hi @JohannesHoppe . I'm also interested in this update. If we can review and approve the PR would be awesome.

Thanks

@JohannesHoppe JohannesHoppe merged commit e2f5314 into Mongo2Go:master Nov 19, 2024
@JohannesHoppe
Copy link
Member

@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?

@JohannesHoppe
Copy link
Member

Ok, this is only half-way true:

dotnet test
Passed!  - Failed:     0, Passed:    49, Skipped:     0, Total:    49, Duration: 13 s - Mongo2GoTests.dll (net8.0)

Rosetta is impressive. It just worked??

@DrewM-Hax0r
Copy link
Contributor Author

DrewM-Hax0r commented Nov 20, 2024

@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!

@JohannesHoppe
Copy link
Member

Many thanks for keeping this project alive! 🙏

Do you think it's much work to switch to the latest MongoDB binaries?

@DrewM-Hax0r
Copy link
Contributor Author

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

@JohannesHoppe
Copy link
Member

@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.

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

Successfully merging this pull request may close these issues.

4 participants