Check that resource names are valid #300

Open
cjwatson opened this Issue Jan 17, 2017 · 0 comments

Comments

Projects
None yet
1 participant

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.2.0-0ubuntu1~ubuntu16.04.1~ppa2
charm-tools 2.1.9

I am using: Ubuntu 16.04 LTS

Issue/Feature

I expect/expected the following

charm proof should check that resource names are valid.

What I got

I spent some time trying to debug a mysteriously-failing juju deploy. Eventually I found the following log entry:

2017-01-17 12:17:01 ERROR juju.worker.dependency engine.go:539 "mgo-txn-resumer" manifold worker returned unexpected error: cannot resume transactions: The dotted field 'launchpad.tar.gz' in 'meta.resources.launchpad.tar.gz' is not valid for storage.

The charm's metadata.yaml was as follows:

name: launchpad-importd
summary: Launchpad code import daemon
description: |
    A Launchpad code import daemon.
tags:
    - application_development
maintainer: Colin Watson <cjwatson@canonical.com>
subordinate: false
series:
    - xenial
resources:
    launchpad.tar.gz:
        type: file
        filename: launchpad.tar.gz
        description: The Launchpad source code.
min-juju-version: 2.0.0

However, charm proof only emitted the following informative message, with no errors:

I: No icon.svg file.

I think that charm proof should have told me that the resource name I'd chosen was invalid.

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