show status updates during long bughelper runs

Bug #110937 reported by Andrew Ash
2
Affects Status Importance Assigned to Milestone
Bug Helper
Confirmed
Wishlist
Unassigned

Bug Description

The problem: No feedback. When using bughelper on a particularly long run, there is little feedback shown to the user about what's going on in the background.

The solution: Status bar. I think an updating info line at the bottom of the console with stats such as what bug is being processed, what attachments are being downloaded now, how large they are, etc would solve the problem. Hopefully this can be done without cluttering the console too. See this semi-mockup of two points in time:

===========
$bughelper -A -p hugepackage

--- Currently on bug 123456 ... Attachment Xorg.0.log ... [ ====> ] 3,879 55.25K/s

===========
$bughelper -A -p hugepackage
http://launchpad.net/bugs/123456 [hugepackage Ubuntu: Needs Info/Medium] - big bad crash
  - http://librarian.launchpad.net/7393543/Xorg.0.log

--- Currently on bug 234567 ... Attachment Xorg.0.log ... [ ====> ] 5,678 25.73K/s

===========

As bughelper would find new matches, they would be output to the console while the "status bar" moved further down. The download progress would be similar to wget's in that respect. It may also be possible to calculate % of bugs checked on and other neat things. But I'd mainly like to know that bughelper hasn't hung and that it's still getting stuff done even though it's silent.

And maybe if this is too obtrusive to others it could have an optional argument to enable it. --verbose or something.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your bug report. The progress bar should be easy to implement, after the BugList() has been initialized. For the utilized bandwidth, I'm not sure if we should have that and how to implement it.

Changed in bughelper:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Maybe have a command line switch to turn this functionality off. It will make no sense in logfiles, reports, etc.

Revision history for this message
Markus Korn (thekorn) wrote :

Hi Andrew,
I think adding a progress bar to show the download status of a file might be the easiest solution. This (huge) patch against python-launchpad-bugs/main r9 adds the progress bar module written by Nilton Volpato to this branch. I used this module to show the download process of each file.

Markus

Revision history for this message
Markus Korn (thekorn) wrote :

Oh, I forgot the url of that module:
[http://cheeseshop.python.org/pypi/progressbar/2.2]

Revision history for this message
Daniel Holbach (dholbach) wrote :

The patch in launchpadBugs/HTMLOperations.py is simple enough - nice work.

Some reservations I personally have:
 - shipping external code in lpbugs - I'm not extremely fond of it. I'd much prefer to ship it in a separate package where it gets updated regularly, etc.
 - verbose=True - I'd rather this was False - tools/scripts (which might pipe the output somewhere else) should have to enable it
 - my gut feeling is, that the output is too verbose - can we change this somehow so that the percentage of visited bugs is reflected in the progressbar and not every attachment?

If we package python-progressbar, it'd need to be reviewed for main inclusion, as python-launchpad-bugs would depend on it. I don't know if that's at all possible, but could we have it as a dependency of bughelper? (it doesn't feel so much python-lp-bugs related to me).

Revision history for this message
Andrew Ash (ash211) wrote :

Glad Markus' patch looks clean.

Showing how far bughelper's total operation has progressed would be fine for me, rather than each attachment.

Maybe the progress bar could show overall progress on commands that deal with multiple bugs in a % of bugs completed form, and then on commands dealing with only one bug report show progress as a % of total bytes downloaded that will need to be in the attachments. If that's too much for this first run at the progress bar, I'm fine with it. Maybe a future release could incorporate some of these ideas too.

The verbosity I was planning on was for more of an end-user that's using bughelper straight from the command line in the form of the progress bar. That bar only serves as a notification to users of how far that run has progressed, and obviously wouldn't mean much to those looking at output of scripts like the one on your site, Daniel. My gut feeling is that the progress bar should be enabled by default for those that use bughelper manually, but with an option to disable it for output to scripts. Notification of progress is best suited to users manually using the tool, which I feel is the majority currently, so it should be enabled by default.

Notice of exactly what files from what bugs were downloaded when wasn't really in the scope of what I had originally proposed in the progress bar, and I don't really see a need for it. I was just wanting to see a display of progress as I was waiting for the run to finish.

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.