22 Aug 2012, 21:42
Fototessera_pragsmall

Massimo Manca (4 posts)

Hi all, I would like to discuss these scenarios and eventually find a solution. Suppose that developer A sent to the project source version control (SVC) a modified file so the CIS should start to build and test the application.

  1. What happens if the developer B sends to the SVC a modified file while the project build is in progress? CIS will build also the modifications of developer B?
  2. What if developer B sends the new files to the SVC after the build but before the continuous test?
  3. Is there any possibility that a good CIS might have some type of solution to protect its infrastructure?
04 Sep 2012, 19:29
James2009_pragsmall

James Grenning (137 posts)

Hello Massimo

Cruise control used to have a delay period that would only initiate a build after the repo was quiet for a settable amount of time.

With Jenkins, I think you would get two builds. The first could fail if the dev B’s changes were pulled in with dev A’s changes, and they were incompatible, or maybe only part of B’s changes get pulled down.

Jenkins has a wait period, but there still is a race condition. A longer wait period would lessen the chances of a race.

26 Oct 2012, 17:51
Generic-user-small

Andy Neebel (1 post)

From what I’ve seen with continuous integration, the race condition should only apply between when developer A checks in code and when CI server starts to perform a checkout of the code. Once a CI server starts a job, it’ll check out the code to local and the perform a build. Changes made in source control shouldn’t affect that build once it has started, unless the build sequence has commands in it to update files from source control again (not very common, in my experience).

It does all depend a little on how you have configured things, but ideally you should be able to perform a single checkout at the start of a build to get all of your code and unit tests, so the build should occur based on the revision it actually checked out. The only real concern there is that developer B was checking in things piecemeal, in which case some of their changes may not be in the build while others were.

If you have multiple projects on the CI server - one that builds, one that tests, etc… then there is more likelyhood of having tests run against code that does not implement the changes the tests are meant to check, in that case you would have a failure.

  You must be logged in to comment