A while ago we upgraded from an old version of TeamCity (7.x) to 9.x. Since then we've had problems/delays in some of our internal tooling that depends on TeamCity labelling VCS roots in a timely manner after a build has completed (i.e. we have various automated processes and other builds that depend on tags being added to git to know what commits are in what builds), problems which weren't happening when we were runnig 7.x. We use agent side checkout.
I'm guessing that 7.x used to label the VCS roots immediately after a build finished, whilst in 9.x the labelling happens ansynchronously. The issue is that labelling seems to require the agent that ran the build and the checkout directory on the agent to be free for a while. We have limited agents available and some of our builds take a long time (around an hour or more) and often another build is queued to run before the current one finishes. For this and other competing builds, the agent is often grabbed before the labelling can happen, meaning the builds don't get labelled for an hour or more.
Is there a way to force the labelling to happen before the agent gets grabbed for another build?