Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After switching to building different flavors in parallel, we intermittently see build failures due to CreateLabel failure

Tags:

tfsbuild

We use TFS 2010 continuous integration automated builds that get kicked off on every check-in. I recently changed the process template to build Debug and Release in parallel on different build agents as opposed to sequentially on the same agent.

Ever since then, we are itermittently seeing a build failure due to the following error. It happens frequently enough that it is unacceptable (every 5th-10th build or so).

"TF203059: The label already exists. Retry the command with a different label name"

I haven't been able to figure out a specific pattern that causes this to happen. Has anyone come across this before? Is there a change that should be made to the Create Label activity in the build process?

like image 345
LiliaP Avatar asked Mar 27 '12 21:03

LiliaP


1 Answers

There are a couple of issues that can come from parallelization. The labels is one, and modifying work items is the second. There may be more, but that's what I've run into. If you move both into the single threaded part, it should fix your problems. However, that often comes with its own host of problems. IIRC, labeling requires you to map the workspace and get latest before you can label, so if you have a lot of files, this can mitigate any performance benefits of parallelizing. For the work items, the problem can occur because one process modifies the work item after another branch reads it, and TFS pitches a fit that it's changed so it cannot update.

like image 76
Rob Rodi Avatar answered Oct 14 '22 14:10

Rob Rodi