Misleading error message when trying to deploy a local charm that's not found

Bug #1625306 reported by Casey Marshall on 2016-09-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I was trying to deploy a local charm today with recent Juju 2.0 from master and got the path wrong. The error message was misleading:

c@zeugmatic:~/src/kubs$ juju deploy /home/c/build/kubernetes --to 0
ERROR charm or bundle URL has invalid form: "/home/c/build/kubernetes"

Invalid? What'd I do wrong?

In fact, I had messed up the path, it was actually:

c@zeugmatic:~/src/kubs$ juju deploy /home/c/builds/kubernetes --to 0
Deploying charm "local:xenial/kubernetes-0".

So, if the path doesn't exist, you get a really misleading error message.

Is there a way we can tell the difference between:

- Local path, but the path doesn't exist
- Charmstore charm URLs that don't exist

Because the cs: prefix is optional, I'm not sure we can in all cases!

I think this is kind of a UX fail. Some suggestions:

- Require local charms to be deployed with --path, which would be nice and consistent with upgrade-charm. (Explicit rather than implicit, and consistent. I prefer this option.)
- Avoid deciding and just include this possibility in the above error message to say "invalid form or local charm not found"
- Bring back the local: charm URL prefix?
- Something else?

Casey Marshall (cmars) on 2016-09-19
description: updated
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: usability
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers