Wrong VCS Roots Being Checked for Changes

TeamCity Enterprise 2017.1.5 (build 47175), TFS Source Control.

We have a several branches for the project off the "Main" Branch,

The Builds are configured with a 2 VCS Roots , 1 pointing to some common build scripts, and one "BRANCH COMMON" VSC root pointing to the TFS folder $/TFSROOT/%BRANCH%, and in each build configuration the configuration parameter  %BRANCH%  is set to the correct TFS location for that build. So far so good (running fine for months).

A few days ago, we created a new branch ("NEWBRANCH") off the trunk branch ("MAIN") , and a new build config, with the %BRANCH% config parameter set to "NEWBRANCH". 

The problem is that now , the builds for both the trunk and new branch are checking for changes in BOTH locations. 

from the build log for MAIN configuration build:

Collecting changes in 3 VCS roots
[20:03:20][Collecting changes in 3 VCS roots] VCS Root details
[20:03:20][VCS Root details] "BRANCH COMMON" {instance id=215, parent internal id=25, parent id=TEAMBranchCommon, description: "tfs: http://TFSSERVER/ $/TFSROOT/NewBranch"}
[20:03:20][VCS Root details] "BRANCH COMMON" {instance id=109, parent internal id=25, parent id=TEAMBranchCommon, description: "tfs: http://TFSSERVER/ $/TFSROOT/Main"}

[
other root OK , build scripts
]

The Build Configuration Settings only has *2*  VCS roots. so I Can't figure out where the other root that is being checked are referenced.

My only thought is that the build configurations both have a snapshot dependency on another configuration that has a VCS root of $/TFSROOT/Main.

First, that would only explain how NewBranch became dependent on MAIN branch. Why did the MAIN Branch configuration start checking the NEWBranch Root? 

And secondly, we don't want the NewBranch to get Main Branch changes anyway, so I'd like to know if the snapshot dependency does cause this, so I can stop it. 

 

Any ideas much appreciated.

Thanks,

JS

0
2 comments

Hi,

Your only thought is basically correct. The build log does not just include the isolated build process, but also includes some of the actions that the server takes while preparing not just the build but the full build chain. In order to maintain consistency through the revisions of the different builds, the server first pulls all the changes from all VCS Roots, and that's logged in the "Collecting changes" step.

This said, this changes are pulled on the server and used only for configuration purposes. You can check the sources root on the agent, and you will find that only the appropriate contents should be there, not the combined contents.

0
Avatar
Permanently deleted user

Yeah thanks. I was confused by the fact that the NEWBranch changes were being checked in the MAIN config, but if the entire build chain is checked, I guess that it must look up and down the chain all ways.

I created a new copy of the other build that both 2 branches depended upon, set up the dependency of NewBranch on that build, and now that I have 2 totally separate build chains, I see the changes exactly as expected.

0

Please sign in to leave a comment.