canonical / hardware-observer-operator

A charm to setup prometheus exporter for IPMI, RedFish and RAID devices from different vendors.
Apache License 2.0
7 stars 14 forks source link

Remove unnecessary use of `StoreState` for configs #209

Closed chanchiwai-ray closed 3 months ago

chanchiwai-ray commented 4 months ago

In config changed event, we should not keep the configs in StoreState just for tracking the which config option is changed, because any change of config option will result in a re-render of the exporter config yaml. The condition is almost always truthy so the tracking mechanism is useless.

Closes #176, closes #208

chanchiwai-ray commented 4 months ago

Will check if manual tests are required, marking WIP

chanchiwai-ray commented 3 months ago

These changes should not require a manual test since it almost did not touch the core logic in the charm. Marking it "ready to review" by removing "[WIP]". Feel free to let me know if you want to manually test the charm in some way.

chanchiwai-ray commented 3 months ago

Open an issue found in this PR: https://github.com/canonical/hardware-observer-operator/issues/215