Charm Proof: Ensure the default configs match the defined type
Bug #1200713 reported by
Antonio Rosales
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charm Tools |
Fix Released
|
Medium
|
Marco Ceppi |
Bug Description
The GUI team suggested Charm Proof check the config.yaml defaults match the defined type.
Changed in charm-tools: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 1.0 |
tags: | added: charmbrowser |
Changed in charm-tools: | |
milestone: | 1.0 → 1.1 |
Changed in charm-tools: | |
status: | Triaged → In Progress |
assignee: | nobody → Marco Ceppi (marcoceppi) |
Changed in charm-tools: | |
milestone: | 1.1.0 → 1.2.0 |
Changed in charm-tools: | |
milestone: | 1.2.0 → 1.3.0 |
Changed in charm-tools: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
Kapil gave the example of bool. The GUI is actually doing it wrong, AFAICT, actually. Here's an except from our config.yaml:
staging:
description: |
Connect the Juju GUI to the staging backend (i.e. a simulated Juju
environment). Currently juju-core does not support the staging
backend. For this reason, this option is ignored if the charm is
deployed using juju-core.
type: boolean
default: false
The given default is actually a string, "false," and not the boolean value false. YAML specifies a typecast (http:// www.yaml. org/spec/ 1.2/spec. html#id2803629):
staging:
description: |
Connect the Juju GUI to the staging backend (i.e. a simulated Juju
environment). Currently juju-core does not support the staging
backend. For this reason, this option is ignored if the charm is
deployed using juju-core.
type: boolean
default: !!bool false