Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
charm generate seems to be broken with ruamel.yaml 0.10.13 #88
Comments
chuckbutler
added
the
charm-build
label
Jan 30, 2016
|
@bcsaller @marcoceppi we may need to pin at 0.10.12 until we have a proper fix. this appears to still be the case with |
|
Packaging and the PPA has this pinned. 0.10.2 is what gets installed from On Sat, Jan 30, 2016 at 8:44 AM Charles Butler notifications@github.com
|
|
@marcoceppi well, interesting thing here. I just built the charm from the provided layers, on the most recent ruamel and it worked. soooo.... i'm not sure where the disconnect is, but i'll work with liam to figure out whats happening here and why its angry. |
|
Some details on how to reproduce the bug. I've tracked it down to something in the ruamel.yaml handling PreservedScalarString objects (ruamel.yaml.scalarstring.PreservedScalarString) which is triggered by a '|' (pipe) character in the yaml file. This gets converted internally to a unicode string, but the rest of the yaml file is ordinary Py2 strings. e.g. the config.yaml options:
os-data-network:
type: string
default:
description: |
The IP address and netmask of the OpenStack Data network (e.g.,
192.168.0.0/24)
.
This network will be used for tenant network traffic in overlay
networks.
mac-network-map:
default:
type: string
description: |
Map of physical nic mac address to configured VLAN's.becomes (with some debugging added):
Notice the Anyway, this results in a blow-up (ultimately) in To reproduce it:
and then
This happens with ruamel.yaml 0.10.20 (latest version available on PiPy). However, I can't seem to reproduce it in ruamel.yaml's tests (as an extra test). So it looks like something that charm-tools is doing with ruamel.yaml ?? |
|
@marcoceppi we're using the pip package for new layered charms as we're using tox and venv to generate the final charm - so if this could be pinned elsewhere as well that would be great! |
johnsca
referenced this issue
Mar 9, 2016
Merged
Fix #118: TypeError when processing some Yaml files during charm build #119
|
This was duplicated in #118 and I was able to track it down to an interaction between |
gnuoy commentedJan 11, 2016
I'm trying to assemble a charm which has its own config.yaml and inherits some config.yaml from a layer. When I try and build the charm I get: http://paste.ubuntu.com/14470761/
Adding some debug seems to indicate that its exploding at the point of creating the config.yaml.
If I downgrade the version of ruamel.yaml to 0.10.12 it fixes the issue