[sd] Some hints for bugzilla support

Cyril Brulebois kibi at debian.org
Thu Aug 12 23:50:14 EDT 2010


I've recently attended DebConf 10 and Christine's talk about SD[1].

 1. http://penta.debconf.org/dc10_schedule/events/591.en.html

I'm totally excited about two aspects in particular:
 - being able to keep both debian bugs and upstream bugs at the same
   place (possibly with cross-references);
 - being able to have all bugs around when I'm offline.

The issue being that currently, bugzilla isn't supported yet, so I had
a quick look.

First lead: WWW::Bugzilla(::Search). I tried fetching all bugs
matching a given product and a given component; although wireshark
shows that the list of bugs is known after a few seconds, since
WWW::Mechanize is used to get all data, there's one query going on for
each bug, making it impossible to use for more than a few bugs.

Second lead: Bugzilla's XMLRPC interface. I've set up a tiny
repository[2] to hold a few lines of Perl to play around with it. That
interface is nice because you can stay anonymous most of the time, and
because fetching bug status is quite fast, as well as fetching
comments. One can reach a 50x internal server error when fetching a
few thousand bugs, but I played with limit + order to avoid this kind
of situation.

 2. http://git.debian.org/?p=users/kibi/bz-playground.git tag 0.01
    [I failed to include copyright notices, make it MIT, but that can
    be changed if needed by anyone.]

[When I say fast, I mean fetching 2500+ Driver/intel bugs & comments
took 3m33 with limit=200; not sure whether my bandwidth or the
bugzilla server is the limiting factor here.]

My Perl is very rusty, so there are probably better ways to write
that, but at least it seems I'm able to get all bugs for a given
product/component (say I want all xorg+Driver/intel bugs), or for a
given reporter, merging bug status and related comments.

It seems like it's working for both Freedesktop[3] (the one I
particularly care about, holding all X bugs) and Gnome[4]'s bug

 3. http://bugs.freedesktop.org/
 4. http://bugzilla.gnome.org/

I din't test more (well-known) bugzilla instances; but fortunately,
the documentation[5] gives some clues about what changed and when, and
there's some code already to check the bugzilla version at the very
beginning of my tiny script, so workarounds / version-specific issues
could be handled if needed.

 5. http://www.bugzilla.org/docs/tip/en/html/api/
    [See Bugzilla::WebService*, Bugzilla::WebService::Bug in particular]

I'm not sure whether I'm qualified to work on adding a bugzilla
replica to sd, but that doesn't sound too hard. Read-only would be
sufficient at the time being, but I shall highlight that the XMLRPC
interface also handles updates and creations, one just needs to login
(again, through XMLRPC) right before doing write operations.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.bestpractical.com/pipermail/sd/attachments/20100812/7058a99b/attachment.pgp>

More information about the SD mailing list