Snapshot dependency behavior

Hi all,

I have a question about snapshot dependencies with the option "Do not run new build if there is a suitable one" and "Only use successful builds from suitable ones".

Snenario:
  - I have two build configurations A and B that shares the same VCS root
  - Build configuration B has a snapshot dependency to A with the option "Do not run new build if there is a suitable one" and "Only use successful builds from suitable ones"

When I run the configuration B the following happens:
  - Build A is triggered
  - Build B is triggered

When I re run build configuration B and there are no VCS changes then Build A gets triggered again.
This is not what I expect. I would expect Build B to use A that has already run with the same sources.

Can someone clarify this?
Thanks in advance.

5 comments

If B depends on A, both builds will be added to the queue. This is expected behavior. Then server will decide whether it can replace build A with already started or finished build. If suitable build exists build A will be removed from the queue and build B will point to a started build.

0

I understand that both builds are added to the queue.

The problem is that in my case the server never replaces build A with the finished build. (both build configurations share the same set of VCS roots and no commits occured)

Why does TeamCity decide to rebuild instead of using the suitable build?


Many thanks,

0

Then I guess we need more information because there are some configuration settings which may cause such behavior. For example, if you are using subversion and in subversion VCS root externals mode is set to "Checkout, but ignore changes", TeamCity won't be able to determine whether builds have same source revisions or not.

Also please provide details on your TeamCity server version.

0

Thanks a lot :^O

My subversion VCS root externals mode is set to "Checkout, but ignore changes".
I have modified it to "Full support" and it works perfectly.

0

The problem with "Checkout but ignore changes" is that in this case TeamCity won't detect changes in externals while in fact they were submitted in version control and on the agent sources would be different. Without changes detection enabled TC can't decide whether two builds are similar or not and thus can't guarantee synchronized sources.

0

Please sign in to leave a comment.