Config dependencies and build version
What is supposed to happen in the following scenario?
Three configurations: A, B and C
B has a snapshot dependency on A (don't rebuild if there's a good build already)
C has a snapshot dependency on A and B (don't rebuild if there's a good build already)
B derives its build number from A (ie. %dep.bt<A>.system.build.number%)
C derives its build number from A (ie. %dep.bt<A>.system.build.number%)
A has a build script that automatically increments the build number every time it builds (##teamcity[buildNumber '1.0.0.N'])
A starts at build number #1.0.0.1
A builds, its build number becomes #1.0.0.2
B builds:
A is already built, so it doesn't build again
B becomes build number #1.0.0.2
C builds:
A and B are already built, so they don't build again
C becomes build number #1.0.0.2
A builds, its build number becomes #1.0.0.3
B builds, its build number becomes #1.0.0.3
B gets a checkin, so it now has new pending changes
C builds
What I would expect to happen is this:
A is already built, so it doesn't build again
B has pending changes, so it builds, and its build number (derived from A) remains #1.0.0.3
C builds, its build number becomes #1.0.0.3
What I'm actually seeing is this:
A is already built, so it doesn't build again
B has pending changes, so it builds, but its build number becomes #1.0.0.2 ?? (This is the current build number of C ??)
C builds, its build number becomes #1.0.0.3
Please sign in to leave a comment.
Please take a look at the dependencies tab. Build B should be shown as depending on build A, what is the build number of A on this page?
There are no build numbers on that page -- only a list of the dependencies and their "Dependency Options", and buttons to edit or delete the dependencies.
I meant Dependencies Tab of the build, not Dependencies Step of the administration area.
Ah, OK. For the latest build of B this screen displays the following. I'm not sure what I'm looking at here:
1.0.0.3 -> 1.0.0.1 -> 1.0.0.3
C A
If I check "Show indirect dependencies", I get the following:
1.0.0.3 -> 1.0.0.1 -> (Direct dependencies)
C 1.0.0.3
A
(Indirect dependencies)
1.0.0.1
A
This page shows dependencies graph between builds. You mentioned that build of build configuration B has got build number 1.0.0.2 but on this page there is no such build number (there is unnamed build with build number 1.0.0.1, is this a build of build configuration B?).
May I ask you to attach all dependency settings for each build configuration (C, B and A)? If you do not like to show these settings in the forum you can send this information to teamcity-feedback[at]jetbrains.com , and it would be nice if you can provide screenshot of the Dependencies tab of the build C depending on the build B with build number 1.0.0.2 (with indirect dependencies shown).
Yes, config B goes from 1.0.0.2 to 1.0.0.1 as a result of building C, which depends on B, which has changes pending when the build of C is initiated. That's what I don't understand.
I'll prepare some screenshots.
I think I've figured it out. B also has a dependency on D, which used to have, but no longer has, its own dependency on A.
D had not been rebuilt successfully since removing its dependency on A.
It's this old indirect dependency between B and A that caused the problem. The solution is to rebuild D.
Make sense? (I'm not sure it does to me )
Please provide some screenshots, it is hard to understand what happens without them.