{"action":"created","issue":{"url":"https://api.github.com/repos/juju/charm/issues/217","repository_url":"https://api.github.com/repos/juju/charm","labels_url":"https://api.github.com/repos/juju/charm/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/juju/charm/issues/217/comments","events_url":"https://api.github.com/repos/juju/charm/issues/217/events","html_url":"https://github.com/juju/charm/issues/217","id":167466992,"number":217,"title":"Charm build: Leaking exception when charms begin with a number","user":{"login":"kat-co","id":5490961,"avatar_url":"https://avatars.githubusercontent.com/u/5490961?v=3","gravatar_id":"","url":"https://api.github.com/users/kat-co","html_url":"https://github.com/kat-co","followers_url":"https://api.github.com/users/kat-co/followers","following_url":"https://api.github.com/users/kat-co/following{/other_user}","gists_url":"https://api.github.com/users/kat-co/gists{/gist_id}","starred_url":"https://api.github.com/users/kat-co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kat-co/subscriptions","organizations_url":"https://api.github.com/users/kat-co/orgs","repos_url":"https://api.github.com/users/kat-co/repos","events_url":"https://api.github.com/users/kat-co/events{/privacy}","received_events_url":"https://api.github.com/users/kat-co/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-25T21:12:09Z","updated_at":"2016-07-26T15:02:04Z","closed_at":null,"body":"metadata.yaml:\r\n\r\n```yaml\r\nname: 1605096\r\nsummary: Dummy charm to reproduce bug 1605096.\r\nmaintainer: Katherine Cox-Buday <katherine.cox-buday@canonical.com>\r\ndescription: |\r\n  N/A\r\ntags:\r\n  - debug\r\nseries:\r\n  - trusty\r\n  - xenial\r\nresources:\r\n  foo:\r\n    type: file\r\n    filename: foo.txt\r\n    description: Debug resource.\r\n```\r\n\r\n```bash\r\n16:08> charm build\r\nbuild: Composing into /home/kate/workspace/charm-1605096\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/charm-build\", line 9, in <module>\r\n    load_entry_point('charm-tools==1.11.2', 'console_scripts', 'charm-build')()\r\n  File \"/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py\", line 579, in main\r\n    build()\r\n  File \"/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py\", line 461, in __call__\r\n    self.find_or_create_repo()\r\n  File \"/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py\", line 198, in find_or_create_repo\r\n    self.create_repo()\r\n  File \"/usr/lib/python2.7/dist-packages/charmtools/build/__init__.py\", line 179, in create_repo\r\n    self.target_dir = (self.repo / self.name)\r\n  File \"/usr/lib/python2.7/dist-packages/path.py\", line 237, in __div__\r\n    return self._next_class(self.module.join(self, rel))\r\n  File \"/usr/lib/python2.7/posixpath.py\", line 68, in join\r\n    if b.startswith('/'):\r\nAttributeError: 'int' object has no attribute 'startswith'\r\n```"},"comment":{"url":"https://api.github.com/repos/juju/charm/issues/comments/235296142","html_url":"https://github.com/juju/charm/issues/217#issuecomment-235296142","issue_url":"https://api.github.com/repos/juju/charm/issues/217","id":235296142,"user":{"login":"jrwren","id":106443,"avatar_url":"https://avatars.githubusercontent.com/u/106443?v=3","gravatar_id":"","url":"https://api.github.com/users/jrwren","html_url":"https://github.com/jrwren","followers_url":"https://api.github.com/users/jrwren/followers","following_url":"https://api.github.com/users/jrwren/following{/other_user}","gists_url":"https://api.github.com/users/jrwren/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwren/subscriptions","organizations_url":"https://api.github.com/users/jrwren/orgs","repos_url":"https://api.github.com/users/jrwren/repos","events_url":"https://api.github.com/users/jrwren/events{/privacy}","received_events_url":"https://api.github.com/users/jrwren/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T15:02:04Z","updated_at":"2016-07-26T15:02:04Z","body":"It is probably worth mentioning that charms cannot start with a digit.\r\n\r\nFrom https://github.com/juju/names/blob/master/charm.go, \r\n\r\n    // CharmNameSnippet is a regular expression representing charm name\r\n    CharmNameSnippet = \"[a-z][a-z0-9]*(-[a-z0-9]*[a-z][a-z0-9]*)*\"\r\n\r\nSo while the exception leak is bad, a nice fix might be  warning which states that charms must start with lowercase a-z"}}
{"actor":{"display_login":"jrwren"}}