Unsetting a value with "juju unset" is not reflected in the config
Bug #1513805 reported by
Данило Шеган
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
New
|
Undecided
|
Данило Шеган |
Bug Description
Charm helpers Config() class initializes "previous" values from a file on disk to allow for detecting changes between config values.
However, when one does a "juju unset" to remove a config value, this is never detected.
I'm attaching a branch that does what I expect, however, it breaks tests since the code has been designed to disallow unsetting of config values (once it's set, there's no way to drop it from the cache).
Note that I have tested and can confirm that juju does trigger the config-changed hook.
I've seen this while working on landscape-charm and trying to unset an explicit value of worker-counts in testing, and then attempting to unset it to restore automatic recalculation.
Related branches
lp:~danilo/charm-helpers/unset-config-change
On hold
for merging
into
lp:charm-helpers
- Stuart Bishop (community): Needs Fixing
-
Diff: 103 lines (+13/-29)2 files modifiedcharmhelpers/core/hookenv.py (+2/-5)
tests/core/test_hookenv.py (+11/-24)
Changed in charm-helpers: | |
assignee: | nobody → Данило Шеган (danilo) |
To post a comment you must log in.