tab complete causes traceback on Juju 2.1

Bug #1648452 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Unassigned
juju-release-tools
Fix Released
Undecided
Unassigned

Bug Description

When typing a command, in this case, juju resolved, I tried tab completing the unit name.

Instead of either completing the unit name, or simply not completing at all, juju does a minor traceback on the console:

bladernr@galactica:~/development/charms$ juju resolved --no-retry canonicTraceback (most recent call last):
  File "<string>", line 5, in <module>
KeyError: 'services'

error: invalid unit name "canonic"

In the above, I have a charm called canonical-certification-server and the unit is canonical-certification-server/0. I was expecting to tab complete canonic<TAB> to at least canonical-certification-server, or at best canonical-certification-server/0.

Instead, the traceback occurs.

juju:
  Installed: 1:2.1-rc1~20161207~4636~42f3ab60-20161207+4636+42f3ab60~16.04

Revision history for this message
Anastasia (anastasia-macmood) wrote :

This is a duplicate of an earlier bug # 1646223.

Changed in juju:
status: New → Invalid
Revision history for this message
Jeff Lane  (bladernr) wrote :

How is this a duplicate of that bug? That bug is a packaging/upgrading bug and doesn't say ANYTHING about tracebacks caused by tab-complete.

This bug is pretty bad usability bug, NOT a packaging bug.

Please de-duplicate this or at least explain why this was duped to a seemingly unrelated bug.

Martin Packman (gz)
Changed in juju:
status: Invalid → Incomplete
Revision history for this message
Martin Packman (gz) wrote :

I think this is really a dupe of bug 1600257 - which I am not confident is fixed for all cases.

Can you do something along the lines of...

$ dpkg -S "/etc/bash_completion.d/juju*"
$ dpkg -S /usr/share/bash-completion/completions/juju-*

And attach the results and dpkg details of any packages listed?

Revision history for this message
Jeff Lane  (bladernr) wrote :

Sure:

bladernr@galactica:~$ dpkg -S "/etc/bash_completion.d/juju*"
juju-core: /etc/bash_completion.d/juju-core

bladernr@galactica:~$ dpkg -S /usr/share/bash-completion/completions/juju-*
juju-2.0: /usr/share/bash-completion/completions/juju-2.0
juju-2.0: /usr/share/bash-completion/completions/juju-version

And I agree, from reading the summary and some of the comments on bug 1600257, they do look to be the same or at least very similar.

Changed in juju:
status: Incomplete → Opinion
Changed in juju-release-tools:
status: New → Confirmed
status: Confirmed → New
Changed in juju:
status: Opinion → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

So, the workaround is manually delete the /etc/bash_completion.d/juju-core file - but that's something the 2.0 packaging really does need to do in a post-install step or similar.

Changed in juju:
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I believe this is fixed now in 2.1-beta5. There's some other packaging tweaks in there based on feedback. Have a look in /usr/bin/juju* as well and make sure it's too your liking.

Changed in juju:
status: Triaged → Fix Committed
Changed in juju-release-tools:
status: New → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
milestone: none → 2.1.0
Changed in juju-release-tools:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
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.