I'm seeing some issues in our TeamCity (8.1, 29879) setup which don't seem to correspond with the intended behavior, and I'd like to know if anyone else has had the same problem or knows what the cause is. In short, what happens is that a snapshot dependency we have set up will resolve sources/builds which are NOT from the same point in time, causing incompatability issues in our system.
Our setup looks something like this:
- We have some 10 modules, each with their own VCS root and TeamCity project, and one build configuration each. The configurations will run some local tests and produce one executable artifact each. They will trigger on VCS check-ins. Let's call these build configurations A1, A2, A3, and so on.
- We have a build configuration, B, which has artifact and snapshot dependencies on the A configurations. B will start the executables and run a system test. B has a "Finish Build Trigger" for each of A1, A2, etc.
Now here's the strange part:
- When someone does a code check-in to e.g. the module corresponding to A10, a build will start. If the build is successful, B will be triggered.
- With "Do not run new build if there is a suitable one" turned off, A1-A9 will be queued, get built, and used as inputs for B (correct behavior).
- With "Do not run new build if there is a suitable one" turned on, semi-random builds from A1-A9 will be used. We've seen cases where e.g. a week old build of A1 will be used, even though there are several successful builds that are newer (wrong behavior).
- When I trigger B manually:
- With "Do not run new build if there is a suitable one" turned off, the behavior is the same as above (correct behavior).
With "Do not run new build if there is a suitable one" turned on, all the newest builds from A1-A9 will be used (correct behavior).
My understanding of snapshot dependencies is that, when the build configurations your are depending on have different VCS roots, TeamCity will find the newest check in for each configuration that is not newer than the one that started the chain, and build those check-ins (or used equivivalent, finished builds if "Do not run new build if there is a suitable one" is turned on), but this does not seem to be the case. I also noted that many (but not all) build logs have the line "Skip checking for changes - changes are already collected" at the top of the log, which I'm not sure how to interpret.
Any help or ideas are welcome!