proof complains about null default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charm Tools |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
I use 'default: null' in config.yaml to allow an item to be unspecified. I cannot hard code the default value, as it is chosen at deploy time based on the environment. For example, the default 'version' in the PostgreSQL charm is '9.1' if you are deploying on precise, and '9.3' if you are deploying on trusty. Similarly, the default 'listen_port' is whatever the postgresql package chose to use (probably 5432, but not always).
charm proof complains about these:
$ charm proof
I: config.yaml: option listen_port has no default value
I: config.yaml: option install_sources has no default value
I: config.yaml: option install_keys has no default value
I: config.yaml: option version has no default value
The work around would be to use magic values like "" or -1 to indicate 'unset', although null works just fine everywhere except 'charm proof' and is the correct value to use so I'm considering these spurious warnings. In addition, there is no way to specify a boolean as unset without using null.
Changed in charm-tools: | |
status: | New → Fix Committed |
milestone: | none → 1.4.0 |