charmstore icon indicating copy to clipboard operation
charmstore copied to clipboard

list-resources does not 404 properly when looking at something that doesn't exist.

Open mitechie opened this issue 8 years ago • 4 comments

Deployed and used cs:~marcoceppi/charm-svg

I then ran juju charm resources charm-svg and got

RESOURCE REVISION

Which confused me since it's a published charm.

It took a bit of debugging

charm list-resources charm-svg
No resources found.

Then I realized I bet that the charm command wanted the charmstore url, and not my application name.

I think that we should 404 on the charm name and not say "no resources found".

I think then the juju charm command should note the name given is a running application and map to the proper charmstore url for that command.

mitechie avatar Jun 27 '16 08:06 mitechie

@mitechie which client version are you using? my tip build reports:

$ charm list-resources charm-svg
ERROR could not retrieve resource information: cannot get resource metadata from the charm store: no matching charm or bundle for cs:charm-svg
$ charm list-resources cs:~marcoceppi/charm-svg
[Service]
RESOURCE       REVISION
python-jujusvg 1
webapp         1

mhilton avatar Jun 27 '16 09:06 mhilton

charm 2:2.1.0-0~ubuntu16.04.1~ppa0

On Mon, Jun 27, 2016 at 5:21 AM Martin Hilton [email protected] wrote:

@mitechie https://github.com/mitechie which client version are you using? my tip build reports:

$ charm list-resources charm-svg ERROR could not retrieve resource information: cannot get resource metadata from the charm store: no matching charm or bundle for cs:charm-svg $ charm list-resources cs:~marcoceppi/charm-svg [Service] RESOURCE REVISION python-jujusvg 1 webapp 1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/juju/charmstore/issues/648#issuecomment-228694793, or mute the thread https://github.com/notifications/unsubscribe/AAEoiwc1HzepHp5itVhXcgQJzdZ16gz3ks5qP5YNgaJpZM4I-4xv .

mitechie avatar Jun 27 '16 09:06 mitechie

I also see the correct output from Martin. So looks like this is fixed in trunk, and will be available on next release.

frankban avatar Jun 27 '16 09:06 frankban

Thanks, I've asked Martin to check what the juju native command does with the new tip code then to make sure both commands behave well:

juju charm list-resources cs:~marcoceppi/charm-svg
charm list-resources cs:~marcoceppi/charm-svg

If it works to submit a patch for the updated dep to Juju.

mitechie avatar Jun 27 '16 09:06 mitechie