Conditional Snapshot Dependencies

I have two modules and a set of integration tests. Since the tests take non-trivial amount of time, I'm trying to only run the tests that are necessary based on what's changes. Here is what I mean:

When a change is made to Module 1, I'd like the following chain to be triggered:

Module 1a <-- Integration a <-- Module 1b <-- Integration b <-- Complete

When a change is made to Module 2, I'd like the following chain to be triggered:

Module 2a <-- Integration a <-- Module 2b <-- Integration b <-- Complete

When a change is made to the integration suite, I'd like the following chain to be triggered:

Integration a <-- Integration b <-- Complete

The other constraint is that when any of the chains is triggered, it should go all the through with the same revision (assuming all the tests pass) regardless of what other changes have been committed.

I'm having trouble setting up the build configurations and snapshot dependencies between them to make this work. I've using single vcs root with triggering rules as follows:

Module 1a
triggered by +modules/module1

Module 1b
snapshot on Integration a
triggered by changes in snapshot

Module 2a

triggered by +modules/module2


Module 2b
snapshot on Integration a
triggered by changes in snapshot

Integration a
snapshot on Module 1a, Module 2a
triggered by -modules/module1
                  -modules/module2
                  changed in snapshot

Integration b
snapshot on Integration a, Module 1b, Module 2b
triggered by changes in snapshot

Complete
snapshot on Integration b
triggered by changes in snapshot

(attaching an image that tries to capture this)

The main problem is that when Integration a is triggered, it will always trigger Module 1a *and* Module 2a regardless of which part of the code was made. I can't figure out how to make Integration a depend on Module 1a only if change was in Module 1a and only depend on Module 2a only if change was in Module 2 (by extension depend on Module 1 and Module 2 if changes were made to both).

Is there a way to make this work in TC? Using TC 6.0.2 with Subversion.

Coincidentally, I find the snapshot dependencies backward to how I tend to think :) (but I understand why it is so). My mind always drifts towards when X finishes start Y. TC supports this notion of course however you loose the revisions (i.e. I can't say start Y with revision x). This is also why I find the messages "Failed to start build #???" overly scary like something is wrong with the system rather than the normal occurance of tests failing.

Attachment(s):
Chains.png
1 comment
Comment actions Permalink

Ahhhh.... user error :). I was confused by the fact that TC enqueues all build configuration but only ends up running the ones that have changes.

With help of forums (in particular http://devnet.jetbrains.net/message/5233867) and further tests I was able to rectify my undertanding of what was happening. And it works. TC rules. The only concern is that TC will actually run a previously failed build configuration, even though there are no pending changes, when there is a snapshot dependecy on it. Instead I think TC should fail the chain immediately.

I still belive the "Failed to start build #??? on Agent ci4" is too harsh of a way to indicate what is a normal occurance. Perhaps TC 6.5 will improve up on this as this seems mostly UI pertaining. Also, it would be very very nice if #??? was actually filled in, but you already know that :).

0

Please sign in to leave a comment.