Re: Scheduled build always say build not required

Jim Hague <[email protected]> Tue, 28 Mar 2006 10:02:46 +0100
Newsgroups gmane.comp.java.anthill
Message-ID <[email protected]>
On Monday 27 March 2006 23:27, Eric Minick wrote:
> Interesting. The problem we had seen earlier is that the SVN adapter had
> been deciding it was time to build too frequently. I believe that was
> addressed in the most recent build. The approach taken, roughly, is to
> request a list of changes since the date of the most recent build. The
> svn client will return too many results due to a subtelty in how it
> handles revisions. The driver will then filter out any results that
> appear to have been checked in before the previous build. If there are
> any revisions remaining, the build will execute.

The 'Right Way' to determine whether a build is required with Subversion would 
simply to be to look at the change number at the base of the repository - if 
it is bigger than the change number at the previous build, off we go.

Anthill OS (I've not seen/used Pro) keeps this decision in generic code, not 
on the repository driver. It stores the date/time it started the last build, 
and asks the repository adapter for the date/time of the last change.

Unfortunately in the first version of the Subversion adapter I missed a 
subtlety of Subversion behaviour. If you ask Subversion for changes since a 
particular date, what it gives you back is a list of the changes comprising 
the active change at that date and all subsequent changes. This would mean 
that typically Anthill would build a new change twice, the second being 
kicked off because the change that caused it was the active change at the 
time of the first build. This is fixed in the latest Anthill OS by simply 
filtering out any changes with a date before the last build time.

> My first guess would be that the build server and svn server have clocks
> which are wildly out of sync. Is that possible?

I'm running Anthill OS on Linux, so there may be Windows issues I am unaware 
of. If it is never running a build, then I think this must be a problem with 
the last build date.

What is the content of the project file? This is under 'projects', and named 
<project>.anthill. Here's the relevant bit of one of mine:

anthill.lastBuildFailDate = 03/15/2006 23:56:06
anthill.lastBuildSucceeded = true
anthill.lastGoodBuildDate = 03/27/2006 20:54:54

I'm wondering if either this date is being interpreted as way in the future, 
or else if something about how dates are handled in the Subversion adapter is 
causing problems in the Windows world. If you set logging to debug, then each 
check will produce some chatter from the Subversion adapter which should help 
pin it down.
-- 
Jim Hague - [email protected]          Never trust a computer you can't lift.