I’ve talked about preventing bugs from being reported by apport and creating duplicate signatures so the apport retracer can mark bugs as duplicates of another. There is another process for preventing bugs from being reported and that is writing bug patterns something I’ve given a class on.
When apport begins the bug reporting process it first checks to see if the bug being reported matches a pattern and if the bug does it redirects the reporter to the bug, or wiki page, matching that pattern. Additionally, the apport retracer helps us identify bug reports that would benefit from a pattern (those with 10 duplicates) by tagging them bugpattern-needed and subscribing the Ubuntu Bug Control team to the bug report.
After we write a bug pattern we should do three things to the bug report:
1) Remove the tag bugpattern-needed
2) Add the tag bugpattern-written
3) Unsubscribe Ubuntu Bug Control
While modifying the tag is essentially one operation in the Launchpad web interface there are still two steps involved here. This was two too many in my opinion! I wanted to write a bazaar plugin to modify the Launchpad bug report appropriately after the bzr branch with the pattern was pushed to Launchpad. I became extremely motivated yesterday when I saw about a dozen merge proposals from Vadim Rutkovsky (thanks!) for bug patterns.
So now there is a bazaar plugin in the bug patterns branch that will properly take care of a bug report once a pattern is written for it. To use it you need to have python-launchpadlib-toolkit installed, for working with the Launchpad API, and create a symlink to bugpattern_written.py in your ‘~/.bazaar/plugins/’ directory. Enjoy!
Brian, should we modify tags on posting a merge proposal - or this will be done on merging in the branch?
This is done during the bzr push process so it will happen after merging the branch. To be clear my process looks likes this:
1) bzr merge
2) test-local 828550
3) bzr commit -m ‘my comment’
4) bzr push (bug gets modified)
Thanks!
One more question on bugpatterns - ss it safe to remove ‘bugpattern-needed’ tag from Fix Released issues? If yes, should bugpatterns.xml be cleared of Fix Released bugs?
Not necessarily - keep in mind that bug tasks are for the development release so its possible that a bug is only Fix Released in Oneiric and the bug pattern is still useful for Natty. Although people shouldn’t have apport running on Natty.
However, bugpatterns.xml certainly does have some old patterns in there that could use some gardening.
Thanks for so much information, Brian!