Closed JKennedy24 closed 8 years ago
Are you using git or tfsvc?
tfsvc
That's currently by design. Scorch isn't available, so the current approach is recreate the workspace.
I am a Xamarin developer developing for iOS, Android, UWP so continuous integration is great for me to keep ontop of these 3 projects. but recreating a workspace every time means my Mac build server HD is filling up and my tfs workspaces look silly
yes, that's a bad bug. it should tf scorch or if not available, delete the dir if clean. on windows we scorch and if git we clean -fdx and reset head.
What is your scenario? "Clean = true" currently should do those two things:
OK so some more info. I am only experiencing this on my mac. (Windows works as expected as you stated) I set the property "Clean = True" in the repositories tab. behavior I'm seeing is Brand new directory created, brand new workspace created. Prepare Workspace log shows:
2016-05-11T14:44:03.207Z: running clean 2016-05-11T14:44:03.207Z: workspace name: ws_12_13 2016-05-11T14:44:17.632Z: getting code 2016-05-11T14:44:17.633Z: workspace name: ws_12_13 2016-05-11T14:44:22.837Z: Creating workspace ws_12_13
ever increasing the first number each run.
Hope that helps let me know if you need any more info
Although in addition to that. I am actually using the Windows Build agent provided by VSTS online
Are you running the same build definition in a pool that has both windows and mac build agents?
The workspace is per machine, so if you run a build on a Windows build agent, it will create one workspace; but when the same build is run on Mac, you should see a new workspace created.
Yes I the workspaces work and that there should be one mapped to on Windows and one mapped on Mac. So let me clarify with whats happening. I am running the agent as a service so....
Today: I do 3 seperate builds on Windows build agent. End Result After all 3 builds: 1 directory created, 1 workspace created.
I do 3 seperate builds on my Mac build agent: End Result after all 3 builds: 3 directories created, 3 workspaces created.
The problem is that the "Clean" setting is being ignored on the mac build agent
and yes my build definition is running in a pool that contains mac and windows build agents
2016-05-11T14:44:03.207Z: running clean
Clean flag isn't ignored. The problem maybe because we are getting different source folder mapping each time. The workspace format is "ws_agentId_sourcefolder" -> I assume the middle number never incremented in all those three runs and the last digit kept incrementing?
When we detect clean flag, we try to delete this path calculated from the source folder id, and recreate the workspace, but if the source folder id changed, we have no idea what was the original workspace path and name.
If the format is "ws_agentId_sourcefolder" then this just got even stranger. It would make more sense if it was "ws_sourcefolder_agentId". below is a screen shot of my TFS workspaces output. GMPs = Mac Build Agent GMP10 = Windows build agent.
The two windows build agent w/s are expected because of two different build definitions. as for the mac ones these are all from the same build agent
Sorry my bad! I meant the other way, it's ws_sourcefolderid_agentid!
This does indicate we are getting different source folder every time. I will ask Eric and Bryan about that.
What version of the node agent are you using?
Can you run a build for a definition, capture the _work/sourcerootmappings folder, queue the same definition, capture that folder again? I can't remember if the GC folder is within the sourcerootmappings folder or sibling, please capture that both times as well (if one exists). The diff between the two will likely reveal why it's not reusing the same folder. Or you can zip and email to and I can analyze (at microsoft com).
What version of the node agent are you using?
Sorry I missed your question in the email. The version is in the package .json, e.g. "version": "0.6.5",
It looks like this may be the same issue: https://github.com/Microsoft/vso-agent/issues/305
Can you try out the new agent (different repo): https://github.com/Microsoft/vsts-agent
@JKennedy24
@ericsciple I've installed the new agent and at the "Get Sources" stage I'm getting the following error:
/Users/chrisjohn/myagent/externals/tee/tf eula -accept Exit code 13 returned from process: file name '/Users/chrisjohn/myagent/externals/tee/tf', arguments 'workspaces -format:xml -collection:https://gmpsoftware.visualstudio.com/ -login:_,**** -noprompt'.
@JKennedy24 On the variables tab of your definition, can you set system.debug
to true
and run the build again?
I would expect some output from the command (in addition to non-zero exit code). The output of the command should be dumped already when it fails... system.debug will reveal the output regardless of whether it fails.
@ericsciple I have set debug = true and put the logs here: http://pastebin.com/i5TnXdjM
@JKennedy24 i've got a local repro. digging in now. sorry for the inconvenience.
The execute bit was missing on my externals/tee/tf. We shifted around how the externals were pulled in at build time, I'll have to go back and look at what the difference is.
As a workaround, it looks like you should be able to chmod +x /Users/chrisjohn/myagent/externals/tee/tf
I'm not sure how to use the workaround. I don't mind hanging on for a fix as the iOS build isnt vital at the moment. Let me know if you want me to try anything out
This is fixed in the latest drop: 2.101.0 https://github.com/Microsoft/vsts-agent
So by setting Clean = true, my understanding is that it should re use the same workspace but this isnt the case and it creates a brand new one on each run.
(my build does infact fail at building my project time, I don't know whether this affects this issue)