Something changed in ruamel #229

Closed
chuckbutler opened this Issue Jul 8, 2016 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

chuckbutler commented Jul 8, 2016

Checklist

  • Confirmed this is an issue with charm-tools, not charmstore-client
  • Provide versions of tools used
  • Described the feature or ways to replicate the issue

What version am I running?

I ran the following command: charm version and got the following ouput:

charm 2.1.1-0ubuntu1
charm-tools 2.1.3

I am using: A toaster

Issue/Feature

When running charm build, it appears that ruamel has changed the init() signature, and dropped the preserve_quotes field. See the upstream issue tracker here https://bitbucket.org/ruamel/yaml/issues/38

ubuntu@devbox:~/layers/kubernetes$ charm build -l debug -r --no-local-layers

I expect/expected the following

The charm to build successfully

What I got

build: Composing into /home/ubuntu
build: Destination charm directory: /home/ubuntu/builds/kubernetes
build: {
  "INTERFACE_PATH": "/home/ubuntu/interfaces",
  "JUJU_REPOSITORY": "/home/ubuntu",
  "LAYER_PATH": "/home/ubuntu/layers",
  "_charm": ".",
  "_charm_metadata": {
    "description": "Kubernetes is an open-source platform for deplying, scaling, and operations\nof appliation containers across a cluster of hosts. Kubernetes is portable\nin that it works with public, private, and hybrid clouds. Extensible through\na pluggable infrastructure. Self healing in that it will automatically\nrestart and place containers on healthy nodes if a node ever goes away.\n",
    "maintainers": [
      "Matthew Bruzek <matthew.bruzek@canonical.com>",
      "Charles Butler <charles.butler@canonical.com>"
    ],
    "name": "kubernetes",
    "requires": {
      "etcd": {
        "interface": "etcd"
      }
    },
    "series": [
      "trusty"
    ],
    "subordinate": false,
    "summary": "Kubernetes is an application container orchestration platform.",
    "tags": [
      "infrastructure"
    ]
  },
  "_name": "kubernetes",
  "_top_layer": null,
  "config": "BuildConfig({'_tactics': [], 'configured': False})",
  "deps": "/home/ubuntu/deps",
  "description": false,
  "force": false,
  "hide_metrics": false,
  "interface_service": "http://interfaces.juju.solutions",
  "log_level": "DEBUG",
  "no_local_layers": true,
  "output_dir": "/home/ubuntu",
  "repo": "/home/ubuntu/builds",
  "report": true,
  "series": null,
  "target_dir": "/home/ubuntu/builds/kubernetes"
}
Traceback (most recent call last):
  File "/usr/local/bin/charm-build", line 9, in <module>
    load_entry_point('charm-tools==2.1.3', 'console_scripts', 'charm-build')()
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 675, in main
    build()
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 517, in __call__
    self.validate()
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 473, in validate
    self._validate_charm_repo()
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 502, in _validate_charm_repo
    if 'repo' not in self.top_layer.config:
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 136, in top_layer
    self._top_layer = Layer(self.charm, self.deps).fetch()
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 99, in fetch
    self._name = self.config.name
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/builder.py", line 43, in config
    self._config.configure(self.config_file)
  File "/usr/local/lib/python2.7/dist-packages/charmtools/build/config.py", line 57, in configure
    data = yaml.load(config_file.open())
  File "/usr/local/lib/python2.7/dist-packages/ruamel/yaml/main.py", line 73, in load
    loader = Loader(stream, version, preserve_quotes=preserve_quotes)
TypeError: __init__() got an unexpected keyword argument 'preserve_quotes'

Contributor

chuckbutler commented Jul 8, 2016

Looks like this was an artifact from the brief window it was broken. This was fixed in today's charmbox image

@chuckbutler chuckbutler closed this Jul 8, 2016

Member

johnsca commented Jul 11, 2016

I thought we had the ruamel.yaml dependency version-pinned to an older version (0.10.23) precisely because updates to this library had broken things for us before? Does the charmbox perhaps unpin it somehow? If so, we should probably fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment