globocom / huskyCI

Performing security tests inside your CI
https://huskyci.opensource.globo.com
BSD 3-Clause "New" or "Revised" License
572 stars 137 forks source link

Update Deprecated "mgo" Module to "mongo-driver" #568

Open fguisso opened 1 year ago

fguisso commented 1 year ago
  1. Problem Description:

    • The "mgo" Golang module is deprecated, and we need to migrate to the "mongo-driver" module.
  2. Steps to Reproduce:

    • N/A (This might not be applicable for this particular update, as it's more of a library replacement.)
  3. Expected Behavior:

    • After the migration, we expect the application to maintain its current functionality while utilizing the "mongo-driver" module for MongoDB operations.
  4. Current Behavior:

    • The "mgo" module is deprecated and will not receive updates or support, which might lead to compatibility issues or security vulnerabilities.
  5. Proposed Changes:

    • Replace all instances of "mgo" with the equivalent functionality provided by the "mongo-driver" module.
  6. 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 deployments and test local using make install
  7. 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
  8. Documentation Updates:

    • Update project documentation to reflect the change in the MongoDB module. Include any additional setup steps or considerations for developers.
  9. Expected Impact:

    • This update ensures that the project remains compatible with the latest MongoDB drivers, addressing any potential security vulnerabilities or compatibility issues.
codenoid commented 1 year ago

hi, what if we move to using qmgo ?

fguisso commented 1 year ago

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

michelaquino commented 12 months ago

@fguisso I'll work on this. Can you assign it to me?

codenoid commented 11 months ago

https://github.com/codenoid/huskyCI

might help anyone who contribute to this, I can't really find free time to continue work on this

michelaquino commented 11 months ago

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?

fguisso commented 11 months ago

very good @michelaquino but this issue is for another case, I will open another for your case.

here #579

michelaquino commented 11 months ago

Ok, thank you. Can you assign this issue to me as well?

fguisso commented 11 months ago

@michelaquino you need to comment in that issue to be part of assigns list