Welcome to MSDN Blogs Sign in | Join | Help

Stop the *Nightly Build* madness (but keep Daily Builds)

I think it is pretty much common knowledge in the software world today that ‘Daily Builds’ are a good and necessary practice. I do not think that daily builds was that common a practice five years ago. I love this movement to building your product every day.

 

What I do not like is that some people (including some Microsofties) start their daily builds at *night* after everyone has gone home. I plead to all Microsoft writers to stop recommending that builds be run at night and instead recommend that automated tests run overnight. Builds should be run during the day – hence the name “Daily Builds’ - The main reason being that build breaks will be fixed a lot faster when people are in the office and not at home asleep. And sorry to break the news to you but build breaks will happen. It is just a fact of life. No matter how good your software or build process is, you will have build breaks - except maybe in the Windows Main Lab builds but then that's another complex story. There are ways to minimize breaks and the impact but that'll have to be another blog entry.

 

Many years ago in the NT Build lab we tried the nightly or overnight builds thinking that we would save a lot of time utilizing the high-power machines at night. The reality was that someone (aka: hero) on the build team ended up coming in very early in the morning to fix a build break that happened at night. Our overnight build success rate was around 15% which is totally unacceptable in any group, especially the NT Group. What we ended up doing was spending the whole morning fixing the build break and then restarting the build. The whole overnight effort actually slowed us down rather than helped us because it promoted bad development behaviors (such as no one took the build serious since it failed most of the time).

 

When I was in the BackOffice team we went through the same mistake; just ask my wife, she loved it when I would get a phone call at 4 or 5 in the morning (from the Build Verification Team) that something was broke in the build and they needed help getting it fixed asap. To put an end to this madness we just switched to building during the day. Sometimes we would be at the office until 11pm getting that daily build out but at least we could sleep in (until 9am) the next day because everyone was able to pick up a solid build (from the day before).

 

Here is roughly how this would look on a Daily basis (and pretty much how many teams build at MS):

 

9-10am            Bug triage meetings (talk about check-ins that will be built today)

11-2pm            Check-in window open (only allow check-ins into main source line during this time)

2-5pm              Build product (times may vary)

5-6pm              Release product to test shares

6pm-9am         Run automated tests at night

 

As part of the daily build process, a regular build schedule should be published.  This should include the last check-in time, the time that the build will be completed, and the time that initial Build Verification Tests (BVT) tests will be completed. When any part of this process is broken, the person and module that broke the build should be published via build intranet page and/or e-mail.

 

If you need more details or examples, wait for my book <grin>

Published Friday, November 19, 2004 12:12 AM by vincem
Filed under:

Comments

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Friday, November 19, 2004 12:35 AM by Ian Cooper
martin Fowler's reference on this practice - Continuous Integration - can be found here:

http://www.martinfowler.com/articles/continuousIntegration.html

We build and run our automated tests in repsonse to a checkin to the source control system. It is a lot easier to track problems down if the person who commited the changes is made aware of the problem while the cause it still fresh in their head.

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Friday, November 19, 2004 1:10 AM by David Leigh-Fellows
In our team we use continuous integration through Cruise control.net, our system is being built about 14 times a day (everytime we check in). We call this build our express build as once the build is complete we execute unit and component tests that give the developers express feedback in about 1min 30 seconds. However as well as our 'express builds' we also schedule 'daily builds' on a different server which are effectively our express builds with other automated tests (that tend to take longer) bolted on. For instance we regularly run automated acceptance tests, stress tests, soak tests, break tests, security penetration tests, on Java projects there's a tool call jester which tests our tests, we use fXcop to give us feedback about our compliance to coding standards, we even have an extension to msi called nunit MSI which deploys our systems before running deployment tests (check out James' Blog http://weblogs.asp.net/jsgreenwood/)....I'd add another note too we also depend heavily on 'LisaUnit' to make sure that not only do our builds work but that our automation gives us the correct feedback.

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Friday, November 19, 2004 4:51 AM by Ramon Smits
hmm let's see what is wrong here. In larger projects that I worked on where dailybuilds were common the developer had to make sure that code that would be checked in/merged would *at least* compile. Code that cannot be checked in because it cannot be compiled should be left checked out. This creates problems with for example Microsoft Sourcesafe because most projects have the policy to only enable single checkouts thus other developers cannot alter code in the same source files

On most projects I worked for we had the policy that files should not be checkout when you leave office because of the previous reason. So this results in doing 'undo checkouts' without overwriting local files and checking out the same files the next workingday without doing a get latest version. This method is also quite f**ked if somebody altered the file in between.

In a previous project we had a cap with the text "I broke the build" which you had checked in code that broke the dailybuild. Also having penalties like buying cake or beer for your collegues when you brake a build will make sure people think twice before checking in.

After code has been checked in it should be reviewed and compile tested by the code police. Biggest problem here is that most sourcecontrol systems do not have this kind of functionality build in AFAIK.

I am in favor for daily builds at lunch time or at night. Most systems in companies can easily be build and tested within half an hour. Developers that are responsible for build/test errors can then fix it after lunch.
I really don't see why you could not run a dailybuild at night. In your schedule I made the assumption that build, launch and test tasks are done automated.

2-5pm Build product (times may vary)
5-6pm Release product to test shares
6pm-9am Run automated tests at night

People can only fix build problems after they occure so after 5pm. Most people here won't be at the office then. Problems will be fixed the next day in both scenerios.

The time you reserved suits BIG projects. Big projects normally have big budgets. Big budgets allow for better and more development, test, acceptance, pre-production and production environments. In these kind of environments you could - theoretically - let dailybuils run all day long and reports be send to projectsmanagers and teamleaders.

Just my two cents :)

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Friday, November 19, 2004 6:45 AM by Matt
I am assuming that a code review process occurs for each code change and is a prerequisite to having a bug fix added to the Bug Triage Meeting discussion.

Also, do you typically do a build even if there are no new check-in's?

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Friday, November 19, 2004 7:46 AM by Hector Correa
> If you need more details or examples,
> wait for my book <grin>

Now that IS cruel! :)

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Friday, November 19, 2004 8:51 AM by michael stuart
Amen!

When the builds break frequently, it desensitizes the team and people lose the shame response to the failure.

Doing it during the day forces everyone to attend.

Keeping the success rate at > 75% makes it a shameful matter when it breaks.

Nighttime is for soak-testing, unit-testing, and scale-testing...and vampire feeding time :) People stuck in the build lab at night are vulnerable to vampires, too.

At customers I'm setting the builds to occur at natural "fissures" in the day--6AM, to catch the early birds; 12 noon, to catch people before lunch i.e. naptime; and 5PM, to catch the night-owls.

Staggering which demographic breaks will affect means they will scold their earlier peers for breaking it--it creates an atmosphere of mutual trust, or disgust depending on the outcome!

# re: Stop the *Nightly Build* madness (but keep Daily Builds)

Monday, November 22, 2004 9:20 AM by Brian McManus
We moved the build to night time to stop the culture of "build-creep" where people needed "just another minute" to check something in and this led to a very manual process of checking that everyone was ready. If this check wasn't done the build would inevitably fail.

Also, we found that the developers days focused around the build and this led to a sense of mad panic before the build and low productivity after.

If the build is done at night you can make a clear simple rule for developers: "check in everything that needs built before you go home".

After a couple of weeks of humiliation for build breakers, combined with a bvt test by the very early arrivers we settled into a period of virtually no build breaks.

We are now moving towards continuous integration by tacking on our FXCop rules and our nunits but have no plans to move the build to daytime.

# Take a look at console mode Build Manager system

Thursday, June 23, 2005 5:09 AM by adams
Look further at Build Manager system
which is working in distributed client / server mode. So far it is written in .net and supports borland c++ builder / delphi w32 platforms.
see it at http://republika.pl/dailybuilds/index.html

# The Build master

Monday, March 13, 2006 5:29 PM by Yves Hanoulle: Project Complete
Last week&amp;nbsp;I was very disappointed to see so little books at Developer &amp;amp; It-Pro days. I don't...

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | Cast Iron Cookware

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | Paid Surveys

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | Insomnia Cure

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | Quick Diets

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | bird baths

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | work from home

# vincem s WebLog Stop the Nightly Build madness but keep Daily Builds | alternative dating

Anonymous comments are disabled
 
Page view tracker