Update Deprecated "mgo" Module to "mongo-driver"
-
Problem Description:
- The "mgo" Golang module is deprecated, and we need to migrate to the "mongo-driver" module.
-
Steps to Reproduce:
- N/A (This might not be applicable for this particular update, as it's more of a library replacement.)
-
Expected Behavior:
- After the migration, we expect the application to maintain its current functionality while utilizing the "mongo-driver" module for MongoDB operations.
-
Current Behavior:
- The "mgo" module is deprecated and will not receive updates or support, which might lead to compatibility issues or security vulnerabilities.
-
Proposed Changes:
- Replace all instances of "mgo" with the equivalent functionality provided by the "mongo-driver" module.
-
Dependencies:
- Confirm that the project's dependencies are up-to-date.
- Update the Go module file (
go.mod) to include the latest version of "mongo-driver." - Confirm the dockerfile in
deploymentsand test local usingmake install
-
Testing:
- Test the application thoroughly to ensure that all MongoDB-related functionalities are working as expected.
- Suggested test cases:
- Basic CRUD operations
- Connection handling
- Error scenarios
-
Documentation Updates:
- Update project documentation to reflect the change in the MongoDB module. Include any additional setup steps or considerations for developers.
-
Expected Impact:
- This update ensures that the project remains compatible with the latest MongoDB drivers, addressing any potential security vulnerabilities or compatibility issues.
hi, what if we move to using qmgo ?
@codenoid thanks for the indication, but at this point our core maintainers team choose to use mongo-drive. Maybe in the future I will look again to qmgo.
@fguisso I'll work on this. Can you assign it to me?
https://github.com/codenoid/huskyCI
might help anyone who contribute to this, I can't really find free time to continue work on this
Hi @fguisso, to have confidence when changing the driver, I would like to add integration tests for MongoDB in GitHub Actions. These tests consist of turning up a MongoDB instance, running the tests focused on the queries, and turning down the MongoDB instance.
Do you think it is a good idea? There is an issue related to the Github Actions, that is correct? If so, this issue must be closed before adding integration tests?
very good @michelaquino but this issue is for another case, I will open another for your case.
here #579
Ok, thank you. Can you assign this issue to me as well?
@michelaquino you need to comment in that issue to be part of assigns list