Depenedencies on multiple build agents

Hello,

I am using Teamcity 4.5 on a Windows Server 2003 32Bit host.  The TC server is on that machine as well as a build agent.  On a second machine (Windows Server 2003 32Bit as well), I have installed a TC build agent only.  Both of these machines are VMs (VMWare ESX3.5).  Both of these machines also have MS Visual Studio 2005 (full install minus SQL server).  I am using Subversion (server / repo version 1.4.6) for the repository.

I have a couple of projects, let's say Project A and Project B.  Projects A, and B have multiple configurations: Debug, Debug MT, Release, Release MT (MT = multi-threaded).

Project A depends on Project B.  I have set up the snapshot dependencies in the "Dependencies" tab to reflect this on a per configuration level (Project A, Configuration Release depends on Project B Configuration Release, etc).

Projects A, and B are both VS2005 solution file based.  I have enabled both build agents to build VS2005 solution files.  The build runner for each project is sln2005.

All projects are checked out from Subversion.

Here is my problem.

I go to manually run (not triggered by VCS) all 4 configurations at the same time in Project B (which depends on nothing).  Two of the configs (let's say Release and Release MT) run on build Agent #1 and the other two (Debug and Debug MT) run on build Agent #2.  Build Agent #1 builds the Release and Release MT configs for Project B and produces the binaries (which are also stored on Agent #1) for those two configs.  Build Agent #2 builds the Debug and Debug MT configs for Project B and likewise produces and stores the binaries for those configs on Agent #2.

When I go and run Project A (which depends on Project B) in the Release configuration on build Agent #2 (remember the Release config for Project B does not exist on Agent #2), Teamcity does not build the Release config of Project B on Agent #2 which causes Project A to fail.

I've also noticed that if Project B doesn't exist at all on Agent #2 and I run Project A on Agent #2 that Teamcity does not automatically checkout Project A from Subversion and build it.  But, I can force Project B to run on Agent #2 and then things work fine.

Am I doing something wrong here?  What is the behavior supposed to be when you create a snapshot dependency between two projects?

Thanks for any help you can give!

6 comments
Comment actions Permalink

What VCS roots are used in Project A if any?

0
Comment actions Permalink

Each Project (A and B) have separate VCS roots.  For example sake, let's say http://svnserver/svn/trunk/projecta and http://svnserver/svn/trunk/projectb.

0
Comment actions Permalink

Maybe you can provide screenshots of Version control settings and Dependencies pages for the mentioned build configurations?

0
Comment actions Permalink

Sure.  I've replaced the project names with Project A and Project B.  I should also mention that since I ran into this problem, I've started to explore Artifact dependencies, which is why you see them on project A.



Attachment(s):
projectb_VCS.JPG
projectb_dependencies.JPG
projecta_VCS.JPG
projecta_dependencies.JPG
0
Comment actions Permalink

First thing to mention: most likely you should not use last successful rule in artifact dependencies if you have snapshot dependency on the same configuration. Note the warning sign near the rule name.

> When I go and run Project A (which depends on Project B) in the Release configuration on build Agent #2 (remember the Release config for Project B does not exist on Agent #2), Teamcity
> does not build the Release config of Project B on Agent #2 which causes Project A to fail.

How Project A and Project B relate in terms of source code? Does Project A need source code from Project B to compile? I guess you expected that Project A will be executed on the same agent as ProjectB, but this is not the case usually. There is related feature request in our tracker: http://www.jetbrains.net/tracker/issue2/TW-3098

Right now you probably can publish as artifacts of Project B files required by Project A and configure artifact dependency in Project A on Project B for these files.

0
Comment actions Permalink

I am debating on whether or not to use Last Successful Build or last finished build.  Traditionally, I've used LSB for continuous integration purely because if a dependency fails, then it's nice to not have everything hold up until that dependency is fixed.  Could be a change in process though.  Opinions?

Also Project A does depend on the source code from Project B.  So the source code would need to be updated.

Right now I am working with the artifacts dependencies to try to work around all this.  At this point I would be happy to have only the dependency's (Project A in this example) source code updated even if it's not built when running Project B (in this example).  Is there a way to ensure this?

0

Please sign in to leave a comment.