Incompatible configurations - False positives with snapshot dependencies and their parameters

NOTE: This question is NOT answered. How do I remove that tag?

TeamCity 8.0.4, two agents on one machine with different service names and different install, work and temp directories.

Create a project named "Test Bed".

Create config named "Config Chain".
Add build parameter "BuildConfig" with value "Profile"

Create three configs named "Build A", "Build B", "Build C".
Make all three snapshot dependent on "Config Chain".
Add step "Step 1" with a simple script runner to all three, such as "Command Line" or "Python" (I'm using Python).
Add to the scripts of all three a reference to "%dep.TestBed_ConfigChain.BuildConfig%".
Note that in the build params section of these three builds there are no errors.

Create a new config named "Build ABC".
Make it snapshot dependend on "Build A", "Build B", and "Build C".
Add step "Step 1" with a simple script runner and add a reference to "%dep.TestBed_ConfigChain.BuildConfig%".

Go to the agents list and select an agent.
Go to Compatible Configurations.
Set policy to "Run all compatible configurations".
Note that "Build B" and "Build C" are listed as incompatible with the following error:
"Implicit requirements: dep.TestBed_ConfigChain.BuildConfig defined in Build step: Step 1"
The same error appears for the other agent.

Go to projects list and run "Build ABC".
Note that all the builds run correctly and in order, including those listed as incompatible, and the references to "%dep.TestBed_ConfigChain.BuildConfig%" correctly resolve the value "Profile".

Comment actions Permalink

Figured it out.

For "Config Chain" my build number format is "{build.vcs.number.1}.%autoinc.BuildRevAutoinc%". I used the same format for all the builds that followed. This caused the incompatibility among build configs that were parallel in the chain.

Changing builds numer formats of all the configs in the chain except "Config Chain" to "" solved the problem.

In my report of the problem, I said the builds were all running despite the incompatibility. What was happening was each of the parallel agents were incompatible with one of the agents, but not all the same agents. So all the builds ran, and did so in parallel, making it look like everything was perfect.

Still, the errors reported were not the problem. They said the agents were incompatible based on parameters in the scripts, but it was all caused by the build number.

Comment actions Permalink

Ok, there is still something buggy with the reporting of false positives.

I posted the "solution" above shortly after successfully running the build and seeing no incompatibility among agents. Shortly after posting I looked again and some of the configs had become incompatible with ALL agents. I looked around and could not figure out what happened, since I knew I had changed nothing.

On a whim, I ran the entire chain, and wouldn't you know it, they all ran fine. And after that, I looked and all the agent incompatibilities had disappeared again.

Comment actions Permalink

So this still seems like a pretty big problem. We have quite a few build chains that run fine dispite TeamCity saying some of the configs
are incompatible with the agents they run on.

Also, how do you remove the "This Question Is Answered" tag?


Please sign in to leave a comment.