I am using the Batch Task plugin to perform releases for my Hudson jobs. But every once in a while, Hudson would start the real job in parallel with the release task, and almost always, this leads to failed builds with very odd behaviors.
I am using a high frequency for checking CVS changes, about once every 15 minutes (I should change this, but that is a different problem), and when the release task checks in the updated POM into CVS, then this shows up as a code change, and Hudson would start the main job, even though the batch task is not done yet.
To prevent this issue, I have to disable the main job when I start a batch task to prevent the race condition, and once the release is complete, I enable the job again. The problem is that I often forget this.
It would be real nice if Hudson or the Batch task can use a form of a lock for the workspace to ensure that only one job/batch can execute at a given time.