Description of problem: python-bugzilla and bugzilla's xmlrpc interface lack a way to get the dependency chain of a particular bug in a sane fashion. Recursively calling getbugsimple() and getbug() following down bug.dependson takes crazy long. Querying using an HTTP buglist.cgi request and screenscraping is 8-10x faster, but is ugly. I would like to see an xmlrpc interface which python-bugzilla can make use of, which provides a fast function to recursively get the bug dependency list, optionally excluding bugs which are closed.
The showdependencytree.cgi script has a XML ctype that could be used for this. For example: https://bugzilla.redhat.com/showdependencytree.cgi?id=406071&hide_resolved=0&ctype=xml will display the full dependency tree in XML format. Simple change hide_resolved=0 to hide_resolved=1 if you want to hide the resolved bugs from the tree. Would this be sufficient? Dave
yes, I can make that work, thanks.
Created attachment 315226 [details] deptree.py - example code for generating a deplist from a given bug ID For the record, here's some example python code that uses expat to parse the XML output mentioned. I'm working on integrating it into python-bugzilla.
Created attachment 315229 [details] merge-mock-list-to-bz-csv.py Unfortunately, the XML returned with the dependency list doesn't include a <component> field for each bug, which I need. So I wind up doing it in two steps: 1) get the dependency list, then 2) get bug status for all the bugs on that list so I can get the component tag. Attached is the hackjob I put together. Sorry for the use of curl+subprocess, but it's necessary behind my stupid proxy servers...
(In reply to comment #4) > Created an attachment (id=315229) [details] > merge-mock-list-to-bz-csv.py > > Unfortunately, the XML returned with the dependency list doesn't include a > <component> field for each bug, which I need. So I wind up doing it in two > steps: 1) get the dependency list, then 2) get bug status for all the bugs on > that list so I can get the component tag. > > Attached is the hackjob I put together. Sorry for the use of curl+subprocess, > but it's necessary behind my stupid proxy servers... File a Bugzilla RFE to add the component to the XML output (and may be useful for the cgi output as well) and I will put it in for the next update. We are sending an update out today but it is too late to get in today. We normally update each Thursday for non-critical fixes. Dave
RFE filed: https://bugzilla.redhat.com/show_bug.cgi?id=460559