1.0 – It lives!

I have finally finished my DPS911 course work. For this release I have written a log view page and hooked Logfribulator into the BuildBot. After fixing a bunch of bugs with data persistence I wrote a viewing page. Because of the data persistence framework I am using (SQLAlchemy), this was an enjoyable experience. This framework makes querying very logical, almost functioning like jQuery. I haven’t enabled the filtering that was on the old page because I am going to be re-implementing the HTML generation using Pylon’s Mako templating engine. Originally I had planned to use CherryPy for the controller of my page.

After a chat on irc.freenode.net/#python I have decided to look at Pylons instead. It is a popular framework and already has SQLAlchemy built in. The only reason I don’t like this framework is because I don’t understand how it works yet. Unlike CherryPy, I haven’t yet figured out how to run the development server from within Eclipse. This is something which would be very nice as I love the Eclipse debugger interface.

To help with debugging my system and aid in hacking on BuildBot, I wrote a simple ‘dump’ script in Python. I used SQLAlchemy to create a simple table which I could use anywhere. This was a great solution for my next bit of hacking. I finally hooked up BuildBot to submit logs to Logfribulator as they are completed. To do this I spent quite a few hours figuring out how each class in BuildBot is connected. In the end I was successful. I found that between the exception handler build into BuildBot and my database dump script this wasn’t as painful as I thought it would be.

The main thing I learned from this exercise is that code searching is invaluable. I used the built in Eclipse project search function. An example was where the string form of an object had the information I wanted. It would print in the format <Build ‘full-osx’>. When I did a search for “<Build “ I was directed to code which shows how this information was retreived. The hardest bit of information to find was the BuildBot’s running base URL. Once I found this I tried to use the Python urllib.urlopen method. This didn’t work the way I had hoped. This function blocks the main thread of BuildBot. If I had left this as is, I would have frozen BuildBot at the end of every test run. That is unacceptable.

BuildBot is coded on a framework called Twisted. This is a very network oriented framework and luckily has a built in http client. After some time on the Matrix irc channel I had a working replacement, sans freezing. After I put together the URL and tested the post I was greated by a nice little surprise. my code works :) I only have XPCShells fully tested but it shouldn’t be difficult to modify the Reftest and Mochitest build steps to work with my system.

On the patch front, I have reworked my XPCShell harness patch after Ted’s requests. There is question of the merit of individual test times. I am neutral on this issue and will let other people decide if this is useful information. I have designed my system to be able to store this information, so it wouldn’t be too difficult to add at a later time if need be.

I am really excited that I am going to California to do an internship with Mozilla. I am going to continue to work on this system there and I hope that it is used, once the kinks are worked out.

3 Responses to 1.0 – It lives!

  1. CA is really nice please, where a girl lives now after dumping me and her parents in China.

    While I have difficulty in using Eclipse(Pydev) debug mode for hacking the Buildbot module, would you please give some links or instructions on how to setup? I had included the package(under the lib/site-packages), then how?

    Thanks in advance.

  2. Sorry for bothering. It’s OK now, I just added a script the same with buildbot(under buildbot/script) and add argument to the ‘Debug configurations’

    • Hey. Good to hear that you got it figured out. I have given up on using an IDE for my buildbot work. Now I use just vim with a proper indentation setting, an interactive python interpreter and epydoc. I find that I am more productive and I know the code better as a result. I also found pydev a little buggy at times and was very resource intensive.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>