Merge-o-Matic not updating

Bryce Harrington bryce at canonical.com
Wed Dec 23 19:20:21 GMT 2009


On Wed, Dec 23, 2009 at 01:28:23PM +0100, Lucas Nussbaum wrote:
> On 22/12/09 at 21:38 +0100, Lucas Nussbaum wrote:
> > On 22/12/09 at 13:25 -0500, Jordan Mantha wrote:
> > > To find what packages are likely to need a merge you can use the
> > > "Outdated in Lucid, and Lucid has local changes" section of the lists
> > > at:
> > > 
> > > http://qa.ubuntuwire.com/multidistrotools/
> > 
> > I've also put together a list at
> > http://udd.debian.org/cgi-bin/merges.cgi
> 
> Hi,
> 
> I've changed the architecture a bit.
> http://udd.debian.org/cgi-bin/merges.json.cgi now generates a JSON dump
> with the info from UDD (version in debian & ubuntu, LP bugs).
> That dump is processed by a cronjob on people.ubuntuwire.com to generate
> a web page, also using launchpadlib to query for the last uploader.
> 
> So, from now on, please use http://people.ubuntuwire.com/~lucas/merges.html
> 
> Patches are very much welcomed to improve the script. I've written it in
> python to maximize the chances that other will participate. Also, my
> Python is not very good, so don't hesitate to rewrite it ;)

Nice!  I have a few ideas for improving it...


Sorting the rows based on component/source/last-uploader would be
helpful.  I have some javascript that implements this:

  http://www2.bryceharrington.org:8080/js/sorttable.js

This adds an arrow in the column header you can use to sort with.  You
can see how it works and is implemented in html tables from this page:

  http://www2.bryceharrington.org:8080/X/Reports/ubuntu-x-swat/patches.html


For the json data, it might be helpful to prett-print it so the
structure is clearer to those using it.  You can do this by adding the
'indent=4' parameter:

  print json.dumps(report, indent=4)

(Btw, is the source code for the merges.json.cgi program online?)
The output will be marginally larger in size due to the tabs, but IMHO
it's worth it since it saves some time for whomever will be using it.


In merges.py it appears that the only thing you need launchpadlib for is
to get the package creator name.  One suggestion I'd make is if you
could move that into the json file, then it'd let you simplify merges.py
a whole bunch because you could take out all the launchpadlib stuff, and
just have it all encapsulated in merges.json.cgi.


I notice you're using EDGE_SERVICE_ROOT... it's been my experience that
edge is really unreliable.  An approach I took to work around this that
you might consider, is instead of calling launchpad from a .cgi file, to
do it from a cron job and write the json data out to a static file.
This way, if EDGE goes bonkers and gives you the 503 error, you still
have the most recent data in a file on disk your program can use.


Hope this helps,
Bryce



More information about the ubuntu-devel mailing list