Problems with asynchronous VCS root labelling

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?

0
3 comments

Hello,

Currently labeling is performed in the background. Please vote for https://youtrack.jetbrains.com/issue/TW-41822.
If you use labeling to provide a consistency of the source code between projects, it would be better to use snapshot dependencies.
As workaround you can perform labeling as an explicit step.

0

Thanks Alina, I have voted for the issue. Snapshot dependencies would work within TeamCity but in our case it's other tooling that relies on labels being added in a timely manner.

When you say add the labelling as a build step, do you mean making our own build scripts do the labelling at the end? I figured that would have to be the workaround. I don't see a "labelling" type build runner in the list.

0

Yes, I suggested a workaround - you can create a command line build step that runs the build script do the labeling. There is no special runner for labeling in TeamCity.

0

Please sign in to leave a comment.