a little madness

A man needs a little madness, or else he never dares cut the rope and be free. -Nikos Kazantzakis

Zutubi

Archive for the ‘Zutubi’ Category

Pulse 2.0 RC: The Docs Are In

I’ve just pushed up version 2.0.16 of Pulse, the first 2.0 build that can be considered as an RC. Part of the criteria for getting to RC was of course to update the documentation: a large task due to the many changes in 2.0.

This gives me a chance to highlight a cool new feature in 2.0: built-in documentation for all forms. Now when you are configuring your Pulse server, there is no need to leave the UI to look up the docs, they are all there in a slide-out panel. The help UI also sports tooltips for the most commonly-needed pointers, and includes examples to illustrate field values. The shiny new online manual has a screenshot showing the configuration UI complete with help panel.

This is not the sort of feature that makes headlines, but it sure as heck is useful when you are doing admin tasks. Reducing time spent fighting configuration is a key goal of Pulse and this is another piece of the puzzle. And lets face it, any time saved on admin can be spent doing something more interesting!

Pulse 2.0 Beta Rolls On; Subversion 1.5 Working Copy Support

Today we’ve just released Pulse 2.0.15. The release notes for this build show that the beta phase is running hot now: 29 improvements and fixes since 2.0.14 which itself was released just 9 days ago! Thanks to our beta users: the feedback has been great lately allowing us to nail several minor bugs in the past week.

The key new feature in this build is an upgrade to SvnKit 1.2, which supports Subversion 1.5 working copies. I know several Subversion-based projects that are keen users of personal builds have been waiting for this one.

We’ve also finally updated the dashboard view to match the new 2.0 browse view:

New Layout

Just like the browse view you can now view projects in their template hiearchy if you like, as well as expanding/collapsing groups. The new format also uses a lot less vertical space per project, so you can fit more in one screen. And like always, you are able to filter the groups and projects you see on your dashboard to suit your preference.

So, what are you waiting for — go and get it!

CITCON Amsterdam 2008 Retrospective

Over the weekend I attended the latest CITCON in Amsterdam. Like the last CITCON I made it to (in Sydney), this was a great event. There is no doubt that the conference formula of:

  • free
  • focused
  • open spaces
  • on the weekend

works well. I attended a bunch of interesting sessions, my favourite probably being Ivan Moore’s on “Flickering Builds”. Our own Selenium-based acceptance tests have brought a world of flickering pain, which we only eliminated with a great deal of effort. Even though we may know how to test an asynchronous UI, mistakes are still made and they are always more difficult to diagnose when they are timing-dependent. The important message from this session was that unexplained failed builds cannot be tolerated: every failure should be investigated, and underlying bugs in the software, tests or environment resolved.

I also gave a short demo of Pulse 2.0 in the “CI Server Smackdown” session. Due to a limited amount of time and a high amount of overlap among the feature sets of all tools, I opted to focus primarily on one of our new killer features: templated configuration. In Pulse 2.0, there is no need to duplicate configuration among similar projects, or for different builds of the same project. Instead, you define a template with all the shared configuration, and inherit concrete projects from that. After all, you don’t tolerate duplication in your codebase — so why tolerate it in your CI server configuration? The demo seemed to go down well from the feedback I got afterwards. In fact I was really humbled by the feedback from people who had tried Pulse at the conference — it was all really positive!

Thanks go out to PJ, JtF and the CITCON volunteers for putting on another great event. Looking forward to CITCON Europe next year…

Zutubi @ CITCON Asia-Pacific 2008

Just a quick note to mention that Daniel will be carrying the torch for Zutubi at CITCON Asia-Pacific 2008 in Melbourne this weekend. After enjoying the event last year we signed up to sponsor this time around. Catch up with Daniel and ask him about Pulse 2.0 beta!

Sadly I won’t make it, on account of being on the other side of the planet…

Running Selenium Headless

Our dog food Pulse server, which spends all day building itself, is a headless box. This presented no challenge for the Pulse 1.x series of releases, as our builds are all scripted and don’t require any GUI tools. With Pulse 2.0, however, things changed. As mentioned in my previous post, this new release has a whole new acceptance test suite based on Selenium. The problem is: Selenium runs in a real browser, and that browser requires a display.

Fortunately, the dog food server is also a Linux box. Thus there is no need to add in a full X setup with requisite hardware just to have Selenium running. This is thanks to the magic of Xvfb – the X virtual framebuffer. Basically, this is a stripped back X server that maintains a virtual display in memory. Hence no actual video hardware or driver is needed, and we can keep things simple.

Setting things up is straightforward. First, install Xvfb:

# apt-get install xvfb

on Debian/Ubuntu; or

# yum install xorg-x11-Xvfb

on Fedora/RedHat. Then, choose a display number that is unlikely to ever clash (even if you add a real display later) – something high like 99 should do. Run Xvfb on this display, with access control off1:

# Xvfb :99 -ac

Now you need to ensure that your display is set to 99 before running the Selenium server (which itself launches the browser). The easiest way to do this is to export DISPLAY=:99 into the environment for Selenium. First, make sure things are working from the command line like so:

$ export DISPLAY=:99
$ firefox

Firefox should launch without error, and stay running (until you kill it with Control-C or similar). You won’t see anything of course! If things go well, then you need to modify the way you launch the Selenium server to ensure the DISPLAY is set. There are many ways to do this, in our Pulse setup we actually use a resource as it is a convenient way to modify the build environment.

An alternative which may suit some setups is to use the xvfb-run wrapper to launch your Selenium server. I opted against this as Pulse has resources to modify the environment and this way I do not need to change the actual build scripts at all. However if you are not using Pulse (shame! :) ) then you may want to look into it.


1 If you are worried about access on your network, then using -ac long-term is not a good idea. Once you have things working, I would suggest tightening things up by turning access control on.

Zutubi London Office

Wondering why everything has gone quiet over here? Well, all should become clear now: I have just completed a move from rainy Sydney to sunny London1. Combine the Christmas break with an overseas move and you have a recipe for zero blog posts!

The good news is that I am back in action in a new home in central London (Baker Street area). So, for now at least, Zutubi is operating in both Sydney (Daniel – GMT+11) and London (me – GMT) – the company never sleeps!

I intend on travelling to quite a bit of the UK and continental Europe while we are living here. This will hopefully give me the opportunity to meet some of our European customers. Let me know if you are in the area, and perhaps we can arrange to hook up over the coming months at some point.


1 Yes, it really has been quite sunny and mild since we got here, quite to our surprise! Reports from back home tell of plenty more rain down that way.

Continuous Integration Done Quick

OK, so it’s not quite the same as Quake Done Quick, but Chris has put together a few demo videos that show just how easy it is to set up Pulse and get building. In less than 5 minutes a server is setup with a first project and build. Another 5 minutes and you have integrated tests, SCM-triggered builds and RSS notifications. Sweet.

Zutubi @ CITCON Sydney

CITCON Sydney (the Continuous Integration and Testing Conference) is coming up tomorrow. Daniel and myself will both be attending, and look forward to the experience both as vendors of a CI tool and as of developers who are always looking to improve our own build process. This is my first open spaces conference, so it will also be interesting to see how the format works in practice. I find the theory a lot more appealing than being talked at by vendors that have paid their way into speaking slots!

Anyhow, if you’re lucky enough to be in Sydney, we’ll see you there!

Hanselman: First Rule of Software Development

Coincidentally soon after my post on Keeping It Green, Scott Hanselman posts his colleague’s First Rule of Software Development:

Never commit code just before you leave for the day.

This is identical the third item on my list for keeping the build healthy. Interestingly the developer had obeyed the first item on the list, i.e. testing locally before checkin:

The CCNET (Continuous Integration) build subsequently broke – despite the fact that he ran a local build first – and team members who were still in the office had difficulty progressing with their work for several hours.

But I’m obliged to repeat that an even better way to meet the first item is with a personal build. If the developer had been using Pulse, then they could have submitted a personal build to Pulse and found out that the build would break before they checked the code in, and all in the same or less time than it takes to run the tests locally. A small investment in better tools could have avoided the costly loss of team productivity ;) .

Continuous Integration: Keeping It Green

Continuous integration is all about feedback, but feedback is no good when the signal-to-noise ratio is too low. That’s when people start to ignore the feedback altogether. This starts to happen when your CI server sends out too many “broken build” emails. Eventually the team will find it is not worth their while to pay the emails any attention. Once you lose their attention, the feedback is worthless and you may as well not be doing CI at all.

How do you solve this? The absolute key is to make sure that the normal state of your build is green. Broken builds should be the minority, so when they happen people start asking why. How do you keep the build green? There are multiple ways, such as:

  • Have developers test before checking in. Even better, if your CI server supports personal builds let the server test the changes before they are checked in. If the full suite is too long, at least have a fast subset that can be run pre-checkin.
  • You break it, you bought it. When the build breaks, the first priority should be to fix it. The CI server should identify the suspect changes, and their authors should immediately investigate.
  • No check-in-and-bust-outs. Don’t check in then leave the scene of the crime before the light goes green. If you want to run a build before taking off somewhere, make it a personal build!
  • Categorise known failures separately. Just removing these failures runs the risk of the test cases being forgotten altogether, so find a way to leave them in without them breaking the build. Even a low-tech solution that reports a warning for each known failure without running the test case would suffice.
  • Clean up your mess. More involved test suites often play with lots of external resources. When a build stops up short, these resources can be left hanging around. Make sure your build cleans up these resources, lest the following build (and beyond) be affected. I have found it helpful to have a cleanup step just before the tests are started, as depending on how the previous build was killed it may not have been given the opportunity to do the cleanup itself.
  • Track down intermittent failures. These problems can be difficult to debug, and if they happen rarely enough it is tempting to ignore them. Don’t. Imagine how hard this problem would be to debug for a remote customer!
  • Use dedicated CI machines. Don’t let other activities interfere with your builds. Machines are cheap, your time is not.

Encompassing all of these points is the creation a culture where green is The Way. Sure, failures will happen, but the team needs to know that it is not cool to be a regular build breaker.