canonical / mongodb-operator

Charmed solution for MongoDB
Apache License 2.0
12 stars 14 forks source link

[DPE-5318] charm manges only created users #475

Closed MiaAltieri closed 2 months ago

MiaAltieri commented 2 months ago

Issue:

  1. Users created by clients get automatically deleted by MongoDB charm
  2. Users for mongos K8s charm get automatically deleted by MongoDB charm

Solution:

Keep track of which users the charm should manage and only remove/update those users

Testing

Lib tested for all charms that use it i.e. MongoDB VM+K8s and Mongos K8s

Gu1nness commented 2 months ago

This is a wonderful PR and I love the change it brings, but we need to test it thoroughly. Each of the for functions independently, and then all at once, to ensure that indeed we are only removing the relation created users :)

MiaAltieri commented 2 months ago

@Gu1nness Please let me know which paths are not tested by the integration tests that you would like to see tested in the unit tests. (keep in mind there are already some unit tests that are pre-existing)

Gu1nness commented 2 months ago

Oh no we forgot to bump the library numbers. Adding this to https://github.com/canonical/mongodb-operator/pull/480