BugHelperPLBClass

Revision 2 as of 2008-02-21 05:45:43

Clear message

Notes for Ubuntu Developer Week class on 2008-02-21

I'm going to make an educated guess as to why you all are here. It's because you want to know how the bughelper suite and python launchpad bugs can help you! Well, Markus and I intend to tell you how it can.

Python-launchpad-bugs is a python interface to work with bugs, and blueprints, in Launchpad. While bughelper is a suite of utilities that uses python-launchpad-bugs to help you find specific bugs in Launchpad. We'll start off talking about the bughelper suite and then move on to python-launchpad-bugs.

The bughelper suite is comprised of buginfo, bugnumbers and bughelper.

buginfo is designed for reporting information about one specific bug

  • buginfo --title 38442 will just return the bug's title
  • it's really kind of boring but there you have it

bugnumbers is designed for reporting and querying lists of bugs

  • starting points for a query are
    • -p a package
    • -D a Distro
    • -P a project in Launchpad
    • -l or a url of a search in Launchpad
  • you can then filter based on features in Launchpd and some not in Launchpad
    • some features not in Launchpad are querying on the number of duplicates, subscribers, comments, attachments, the date or author of the last comment and the reporter
    • For example lets say I'm the gdm maintainer and I know Brian Murray reports some useful bug reports I could find all the bugs he's reported using 'bugnumbers -p gdm --reporter=brian-murray' or if I wanted just the new ones I could add that as a filter too so 'bugnumbers -p gdm --reporter=brian-murray --status New'
    • Another example is xorg bug reports which should always contain 2 attachments /etc/X11/xorg.conf and /var/log/Xorg.0.log. We could look for New bug reports with than 2 attachments using 'bugnumbers -p xorg --na "=2"' to find "more complete" bug reports that might be worth triaging first.
    • I run reports on busy packages for bugs with more than 2 duplicates, more than 5 subscribers and more than 5 comments at http://people.ubuntu.com/~brian/reports/

  • you can also control the output of bugnumbers formats available are
    • plain - ex 120269 (Confirmed, Low) - Gnome hides utility windows in fullscreen mode
    • numbers - just the bug numbers
    • url - urls linking to the bug numbers
    • wiki - formatted in moinmoin markup for wiki.ubuntu.com
    • bugday - (bzr only) formatted for the Ubuntu bug days
    • html - same info as in plain but marked up for html
    • it is also quite easy to add a new format if you want they are located in bugHelper'/format/
  • additionally bugnumbers can report on stats about your package / project
    • bugnumbers -p gnome-power-manager --stats -C
    • the -C also includes the Closed bug reports - this is what I use to generate the data for the bug graphs

bughelper searches bug reports for a specific string and provides you with a clue about that bug report

  • as an example lets use update-manager it has a few bug reports so we'll reduce the set to New bugs only
    • bughelper -p update-manager --status New
    • bughelper will search all New update-manager bug reports for the information defined in the update-manager.info and then return a "clue" as to what the bug may be about
    • the update-manager query I mentioned returned:

    http://launchpad.net/bugs/191834 [update-manager (Ubuntu): New/Undecided] - This is expected when someone is running a development release of Ubuntu

    • Looking at the clue file the string that matched was "Could not calculate the upgrade" which appears in bug 191834 and we are reminded that this is normal behavior if someone is running the development release of Ubuntu
      • unfortunately this person isn't and this is a terrible example
    • bughelper also can search attachments of bug reports which is quite useful for crash reports
  • clue files use a separate bzr branch bughelper-data

python-launchpad-bugs bit

  • features accessible via python-launchpad-bugs
    • tags, status, importance ...

How you can participate

  • bughelper has a separate mailing list
  • code available at ...