Ran into an issue recently where a number of builds were being listed as having no compatible agents, due to a requirement on "%teamcity.build.branch%" needing to be set.
After some searching, we managed to discover that all the VCS roots were using a %Watch Branches% variable for their branchSpec, which had the value:
Now, if you enter that directly into the VCS root, it won't let you save because multiple stars are not allowed on a single line. However, if you enter this into a variable and then use that in the root, TC doesn't validate and the root will save and run.
When a build is run with this root and no specified branch, the %teamcity.build.branch% variable seems to be unset entirely (not just set to "<default>", it's not there). This prevents the build from ever running. If you explicitly tell it which set of changes to use, it seems to be fine, but automated builds on the default branch are not.
This is something of a corner-case and a configuration issue, but is there a way for the VCS root to validate the branch spec when the build runs, or provide some sort of warning that this won't work? Is there any particular reason we can't use multiple wildcards in a single line?