I have two configured Build Agents on one Controller:
- Default Agent
- Default Agent1
I defined a build definition with the following Agent Settings:
Maximum Agent Execution Time: 00:00:00
Maximum Agent Reservation Wait Time: 04:00:00
Name Filter: Default Agent
Tag Comparison Operator: MatchExactly
Tags Filter:
I created some BuildInformation Activities after the GetAgent Activity.
String.Format("Build Agentname: {0}", BuildAgent.Name)
String.Format("AgentSettingsName: {0}; AgentSettingsTags: {1}", AgentSettings.Name, String.Join(",", AgentSettings.Tags))
The Output is:
AgentScope (reserved build agent Default Agent1)
Build Agentname: Default Agent1
AgentSettingsName: Default Agent; AgentSettingsTags:
So the AgentSettings.Name
argument is set to "Default Agent", but paradoxically "Default Agent 1" is used.
Workflow:
The strange thing is that sometimes the right Build Agent is chosen.
Is this a bug? What is my mistake?
It would be nice if someone could reproduce this behaviour too.
EDIT:
I have created an error feedback: https://connect.microsoft.com/VisualStudio/feedback/details/725885/tfs-2010-wrong-build-agent-is-choosen