dots in charm names (shelr.tv)

Marco Ceppi marco at ondina.co
Tue Mar 26 16:25:23 UTC 2013


For what it's worth, I've already unpromulgated the shelr.tv charm and
re-promulgated the new shelrtv charm in order to rectify this error. This
might explain why the store is no longer returning anything for cs:precise/
shelr.tv


On Tue, Mar 26, 2013 at 11:47 AM, Abel Deuring
<abel.deuring at canonical.com>wrote:

> On 26.03.2013 15:41, Gustavo Niemeyer wrote:
> > On Tue, Mar 26, 2013 at 11:35 AM, Abel Deuring
> > <abel.deuring at canonical.com> wrote:
> >> well, we retrieve the data about charms from Launchpad. My question was
> >> simply: Is it worth to change charmworld so that it can properly deal
> >> with the name shelr.tv, or should the name be fixed because it might
> >> also be unusable in juju-core?
> >
> > That's exactly the point I'm trying to make: everything that is not in
> > the charm store is not usable. It should filter based on whether the
> > charm exists or not, rather than whether it can import it from
> > Launchpad directly.
>
> Divergence betwen LP and the charm store might be an issue (though
> charmworld checks the main store too), but that's not my main point,
> neither is importing from LP an issue with shelr.tv. The problem we have
> with this charm is that we use MongoDB records like {'_id':
> 'cs:<long-path>/shelr.tv', ...}
>
> i.e., the charm name is used in the ID. But dots should not be used in
> MongoDB keys because queries like collection.find({'a.b': 'c'}) search
> for records like {'a': {'b': 'c'}}. And more recent versions of pymongo
> raise an error when you try to insert or update a record with a dot in a
> key.
>
> >
> > There's an existing API in the charm store that gives you [1] precise
> > information about what exists, including the actual digest that was
> > imported.
>
> ok, one step forward:
>
> https://store.juju.ubuntu.com/charm-info?charms=cs:precise/shelrtv&stats=0
>
> returns some reasonable data (and a related charm is indeed available), but
>
> https://store.juju.ubuntu.com/charm-info?charms=cs:precise/shelr.tv&stats=0
>
> returns an error:
>
> {"cs:precise/shelr.tv":{"revision":0,"errors":["charm URL has invalid
> charm name: \"cs:precise/shelr.tv\""]}}
>
> So we have a possible name inconsistency between LP and the charm
> store... Can we assume that dots (and perhaps other other symbols) are
> simply removed when an LP product name is mapped to a charm name? (A
> quick "grep -r shelrtv" in a local copy of
> lp:~charmers/charms/precise/shelr.tv/trunk returned no results.)
>
> Abel
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130326/ade2563c/attachment.html>


More information about the Juju mailing list