Thursday, June 25, 2009

Recently, Our QA team noticed that Team System build reports weren’t operating correctly – it appeared that the reports were emitting work items that we knew should’ve been included.

While troubleshooting, our Microsoft contact also noticed our reports where not only missing items, but also including items that shouldn’t have been. They put this down to a label scoping issue and gave us a bit of background regarding how Team Build determines what is in each build, and what might be causing our issue:

“During a build process, at a specific time point a label will be applied to record this build. Next time when we do build again, the build will check the label, and list all changesets that happened after the label. ”

So the first thing for us to check was that our Team Build was targeting the correct repository:



By Microsoft’s own admission this wasn’t going to be the cause of our issue, but ensuring that the Source Control repository mappings are accurate for the mainline and each branch will in turn ensure accurate labelling...

Microsoft product group:
“Label only what you have mapped in the build's workspace. We specifically do not want folks overriding any Core* targets, as that can cause the build to stop working in future updates. While the scope is $/teamproject, the items in the label are only those that you have mapped. The label scope is independent of what is included in the label. The label scope is merely the visibility level of the name.”
And
“The default workspace mapping is almost never appropriate. Certainly for the case of multiple branches within a team project, the workspace mapping should be scoped to include only the folders necessary for the build. In TFS 2005, this is accomplished via the workspacemapping.xml file. In TFS 2008, you can edit the workspace mapping directly in the build definition dialog.”

So for us, the simplest and best answer is a mapping so that the scope of both CoreGet and CoreLabel targets match the desired branch.

At this point we should now only have work items being reported in a Team Build report that relate to the mainline or specific branch repository - and we were, scope issue resolved!!

but... the reports were STILL emitting items we expected to be included!! The final solution was hotfix KB969868:
http://support.microsoft.com/kb/969868

No comments:

Post a Comment