config_changed complexity too high - refactor needed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MongoDB Charm |
Won't Fix
|
Low
|
Unassigned |
Bug Description
While linting the charm, it was found there is a lot of complexity and duplicate code in the config_changed hook code in hooks/hooks.py that should be refactored.
for instance, these are two different sections of the that function that could be simplified.
# current ports
current_
current_
new_
****SNIP****
# web_admin_ui
if config_
else:
and later in the function:
if config_
Also, most functions in this hooks.py should be pulled out into another library.
This bug is to track the need for a general refactoring of hooks.py.
summary: |
- config_changed hook has too much complexity and duplicate code + config_changed complexity too high - refactor needed |
Changed in charm-mongodb: | |
importance: | Undecided → Low |
This charm is no longer being actively maintained. Please consider using the new mongodb- k8s-operator instead. /github. com/canonical/ mongodb- k8s-operator
https:/
I will close this feature request