microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
131 stars 57 forks source link

TFVC fails with the path is already mapped to in workspace ws_2_3 #204

Closed yacaovsnc closed 8 years ago

yacaovsnc commented 8 years ago

The issue happens when we reinstall/configure a new agent in the same path as the original agent.

The workspace naming convention is 'ws_sourcenum_agentId'. If we reinstall agent, the agentId is updated to a different number but the path is still the same. Then we will hit this issue.

We need to figure out a way to avoid workspace naming collision.

yacaovsnc commented 8 years ago

The workaround for this problem is to install agent in new folders each time.

bryanmacfarlane commented 8 years ago

And note that's not a workaround, that's the supported thing to do. You can update each agent in place but if it's logically a different agent by a different name, it's unpredictable to just re-use a folder. If that folder is really special for some reason, at least wack the _work folder to ensure all the state from the previous instance of the agent is gone.

yacaovsnc commented 8 years ago

Also of course there is "tf workspace -delete", we can delete the offending workspace if we have the right credential, and that should unblock this issue too.