charm url has invalid charm name

Bug #1375398 reported by David Britton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Undecided
Unassigned
juju-store
Confirmed
Undecided
Unassigned

Bug Description

I somehow managed to create a charm that I can't deploy:

11:58 dpb | anyone know why this is invalid? charm URL has invalid charm name:
                   | "cs:~landscape/trusty/quantum-gateway-fix-1361712-stable-0" ?
11:59 arosales | dpb: I think cause charm store only ingestets the format with postfix trunk
11:59 arosales | ie something like landscape/trusty/quantum/trunk
11:59 dpb | no, we actually have a charm 'quantum-gateway-fix-1361712-stable
11:59 dpb | it has a 'trunk' branch
11:59 dpb | why is that charm name invalid?
12:00 dpb | too long? to many dashes? :)

https://manage.jujucharms.com/api/3/charm/~landscape/trusty/quantum-gateway-fix-1361712-stable-0

Tags: landscape
Revision history for this message
Antonio Rosales (arosales) wrote :

I can confirm I see this:
$ juju --debug deploy cs:~landscape/trusty/quantum-gateway-fix-1361712-stable-0
error: invalid charm name "cs:~landscape/trusty/quantum-gateway-fix-1361712-stable-0"
$ juju --version
1.20.7-trusty-amd64

Charmworld API seems to ingest:
https://manage.jujucharms.com/api/3/charm/~landscape/trusty/quantum-gateway-fix-1361712-stable-0

and the charm is in the correct format:
https://code.launchpad.net/~landscape/charms/trusty/quantum-gateway-fix-1361712-stable/trunk

Not sure why deploy isn't finding it, and manage doesn't seem to find it either:
http://manage.jujucharms.com/search?search_text=quantum-gateway-fix-1361712-stable-0&op=

-thanks,
Antonio

Revision history for this message
Curtis Hovey (sinzui) wrote :

This issue is the juju-store and I suspect the store is correct. Since Lp is co-opted to manage charms, its rules are looser than Juju's. charmworld talks to Lp, not the store since the store doesn't yet support queries , so the charm looks correct from the source and viewing locations, but the store that interpets the branch knows the version is bad:
     https://store.juju.ubuntu.com/charm-info?charms=cs:trusty/quantum-gateway-fix-1361712-stable
^ "-1361712-" is the most likely cause of the issue. When I worked on charmworld, version matching was a challenge because the version and charm names are conflated. Juju's own rules probaby think the "-number-" is a charm version, not a name.

These charm/package names are probably acceptable to the store/Launchpad:
   quantum-gateway-fix1361712-stable/trunk
   quantum-gateway-fix-stable/trunk

And the store will find these and published the versions as
   quantum-gateway-fix1361712-stable-0
   quantum-gateway-fix-stable-0

Changed in juju-core:
status: New → Invalid
Changed in juju-store:
status: New → Confirmed
Revision history for this message
Curtis Hovey (sinzui) wrote :

The juju store was extracted from juju-core. I don't know where that code is to properly show where the issue lies. I am confident that the owner of the code would suggest a rename, explaining that the fault is Lp, This issue will be implicitly solved in the future when the juju published command will validate the name and explain the name must be changed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.