6 Replies Last post: Mar 18, 2010 12:20 AM by C K  
C K Newbie 4 posts since
Mar 16, 2010
Currently Being Moderated

Mar 16, 2010 8:46 PM

Multiple Build Agents - question

Hey guys,

 

We have two build agents set up now.

 

Just noticed that when DeveloperA checked into ProjectX and 5 mins later, DeveloperB also checks into ProjectX that his check-in kicked off a second build even though DeveloperA's first build has not even completed.

 

Somehow this seems strange to me. I would like to see the first checkin complete (and either pass or fail) before a second build on the same project is kicked off.

 

Is there a way to configure TC so that our second agent is never "used up" to start running a build on a project that is already building??

 

This seems like a waste of processing, I mean, why would you want to be running two separate builds simultaneously (just staggered) on the same project?

 

 

Thoughts?

 

 

Thanks!

Pavel Sher JetBrains 2,081 posts since
Mar 6, 2008
Currently Being Moderated
Mar 16, 2010 11:53 PM in response to: C K
Re: Multiple Build Agents - question

You can limit number of simultaneously running builds in a build configuration on the General serttings page.

BTW it is useful to have several builds running simultaneously because it simplifies investigation of possible test failures - the lesser number changes in each build - the faster you can find the cause of the failure.

Pavel Sher JetBrains 2,081 posts since
Mar 6, 2008
Currently Being Moderated
Mar 17, 2010 10:27 AM in response to: C K
Re: Multiple Build Agents - question

Let's look at this from the developer point of view. He checked in a fix and once TeamCity detected a change a build was started. Isn't it good for developer to see status of his changes immediately?

 

In your screenshot it seems build A did not have changes, while build B had. I do not know while build A was started (maybe it was triggered manually), but I definitely would not say that build B is a waste of processing time - it runs build with changes, and this build can behave differently. Note that usually TeamCity starts builds when changes are detected (if VCS trigger is enabled), moreover some of our users asked to implement feature to start builds so that each build run with one change only, becuase it greatly simplifies search for changes that lead to test failures.

 

Note that with help of trigger rules on VCS trigger page, you can disable triggering for some files. For example, if you have *.html files in your project and changes in them may not affect build status, you can disable triggering for changes with such files.

Pavel Sher JetBrains 2,081 posts since
Mar 6, 2008
Currently Being Moderated
Mar 17, 2010 7:18 PM in response to: C K
Re: Multiple Build Agents - question

If you do not have enough agents and builds are slow, then indeed you may want to include as much changes in the build as possible.

 

By "change" I mean a single changelist detected by TeamCity (containing comment and a number of changed files). Some users want their builds to run with single change only. In this case it is obvious whom to blame if build fails.

 

In your case you can limit the number of simultaneously running builds. You can also specify quiet period for VCS trigger (http://confluence.jetbrains.net/display/TCD5/VCS+Triggers). In either way the effect should be similar - builds will run more rarely and will include more changes.

More Like This

  • Retrieving data ...