Snapshot dependencies triggered without pending changes

I'm seeing several unexpected behaviors with snapshot dependencies. I'm running TeamCity 7.1.4 (build 24331) and using Subversion 1.7 for source control.

I have defined a build chain consisting of multiple configurations created from the same template. The builds all use the same svn VCS root, which is parameterized so that each configuration can fill in the svn path elements for that specific component. The chain is configured with snapshot dependencies set to 'not run if there is suitable build' and 'run build even if depenency failed'.

My expectation is that triggering a build in the chain will cause a sequence of builds starting from the earliest point in the chain with pending changes up to the build that was triggered. When I trigger a build, everything is added to the queue as expected. However, from there:

  1. Some builds in the queue get run even though there are no pending changes. I can't find any indication anywhere as to why these builds were executed. I would expect 'do not run if there is a suitable build' to prevent this.
  2. If I manually remove a build from the queue (because I know it has no pending changes and doesn't need to build), the chain isn't built because of a failed snapshot dependency. I would expect 'run build even if dependency failed' to prevent this.

Are other folks seeing this sort of thing? I poked around the TeamCity issues database and don't see anything open that matches what I'm seeing, though it looks like similar issues have been reported in the past.


Bit of a separate topic but I'd also love the option to disable snapshot dependencies for a specific run. The Run dialog has the option to force a rebuild but not to prevent one. Would other folks find this useful?

We maintain build artifacts outside of TeamCity and can often build/test a component against artifacts in the repository rather then rebuilding the whole chain. I'd like the default behavior of my build chain to run everything with pending commits but have the option to run specific steps in the build 'stand-alone', on demand. I don't see a way to do this without duplicating every step -- once with dependenices and once without.


A specifc example of what I've seen. I have a build chain A --> B --> C. I commit changes for build C, then trigger a build. There are no pending changes for A or B, and build A is correctly queued and then removed from the queue without running. However build B runs with 'no changes'.

Not sure if this is a defect or if I'm not fully understanding the factors in deciding whether a 'suitable build' is available.



Sorry for the delay in replying.

Could you please check if any of the possible contributions to a build becoming not suitable from the section "Suitable Builds" in the doc e.g. please make sure you do not use externals option "checkout but do not detect changes". Please also make sure there were no changes in the build configuration since the previous build.

If that does not help, your case might deserve a dedicated investigation.
Does the change you have checked in for C appears in B at all (i.e. in other builds of B)?

As to other points of yours:

> If I manually remove a build from the queue (because I know it has no  pending changes and doesn't need to build), the chain isn't built  because of a failed snapshot dependency.

That seems "as designed" as when you remove a build it is actually canceled, not considered failed and that in turn affects the builds depending on the canceled one.

> Bit of a separate topic but I'd also love the option to disable snapshot dependencies for a specific run.

If you already have a build which you want to use, you can invoke "promote" action from the actions of the build and run the build you want selecting anpother change. This action is also avaialble from the Chains/Dependencies tabs for a Build configuration/build.
There is a related feature request, but it is not incredibly popular so far...


Please sign in to leave a comment.