{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/501","repository_url":"https://api.github.com/repos/Microsoft/vsts-agent","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/501/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/501/events","html_url":"https://github.com/Microsoft/vsts-agent/issues/501","id":171227820,"number":501,"title":"Publish Artifact task using share option does not work correctly on Windows or Linux","user":{"login":"bbusacker","id":3932769,"avatar_url":"https://avatars.githubusercontent.com/u/3932769?v=3","gravatar_id":"","url":"https://api.github.com/users/bbusacker","html_url":"https://github.com/bbusacker","followers_url":"https://api.github.com/users/bbusacker/followers","following_url":"https://api.github.com/users/bbusacker/following{/other_user}","gists_url":"https://api.github.com/users/bbusacker/gists{/gist_id}","starred_url":"https://api.github.com/users/bbusacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbusacker/subscriptions","organizations_url":"https://api.github.com/users/bbusacker/orgs","repos_url":"https://api.github.com/users/bbusacker/repos","events_url":"https://api.github.com/users/bbusacker/events{/privacy}","received_events_url":"https://api.github.com/users/bbusacker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-15T18:14:21Z","updated_at":"2016-08-17T15:14:25Z","closed_at":"2016-08-17T15:14:25Z","body":"## **Agent version and platform**\r\nVersion of your agent? 2.104.2<br>\r\nWindows 10\r\nLinux CentOS 7.1\r\n<br>\r\n## **VSTS type and version**\r\nOn-Prem TFS\r\n<br>\r\n15 RC1\r\n<br>\r\n## **What's not working?** \r\nPublish Artifact Task  now requires escaping the UNC path when it didn't used to.   Otherwise task fails to work on both Linux and Windows\r\nOn Linux, if you use escaped UNC path it does not copy the files and does not fail the task even though files weren't copied.  It does however associate the artifact even though nothing is there.\r\n<br>\r\n\r\n## **Build log on Windows where non-escaped UNC path causes failure**\r\n2016-08-15T16:57:52.3560684Z ##[section]Starting: Publish Artifact: drop\r\n2016-08-15T16:57:52.7951030Z ##[debug]agent.workFolder=E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\r\n2016-08-15T16:57:52.7991008Z ##[debug]loading inputs and endpoints\r\n2016-08-15T16:57:52.8001025Z ##[debug]loading ENDPOINT_AUTH_$/\r\n2016-08-15T16:57:52.8021183Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN\r\n2016-08-15T16:57:52.8021183Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN\r\n2016-08-15T16:57:52.8031066Z ##[debug]loading ENDPOINT_AUTH_SCHEME_$/\r\n2016-08-15T16:57:52.8031066Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION\r\n2016-08-15T16:57:52.8031066Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION\r\n2016-08-15T16:57:52.8051046Z ##[debug]loading INPUT_ARTIFACTNAME\r\n2016-08-15T16:57:52.8051046Z ##[debug]loading INPUT_ARTIFACTTYPE\r\n2016-08-15T16:57:52.8061013Z ##[debug]loading INPUT_PATHTOPUBLISH\r\n2016-08-15T16:57:52.8061013Z ##[debug]loading INPUT_TARGETPATH\r\n2016-08-15T16:57:52.8070977Z ##[debug]loaded 10\r\n2016-08-15T16:57:52.8070977Z ##[debug]check path : E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\task.json\r\n2016-08-15T16:57:52.8080970Z ##[debug]set resource file to: E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\task.json\r\n2016-08-15T16:57:52.8080970Z ##[debug]system.culture=en-US\r\n2016-08-15T16:57:52.8151032Z ##[debug]PathtoPublish=E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\1\\a\r\n2016-08-15T16:57:52.8151032Z ##[debug]check path : E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\1\\a\r\n2016-08-15T16:57:52.8160992Z ##[debug]ArtifactName=drop\r\n2016-08-15T16:57:52.8171038Z ##[debug]ArtifactType=FilePath\r\n2016-08-15T16:57:52.8171038Z ##[debug]TargetPath=\\\\bowdmxtfs01\\Builds\\Windows DMX-UFS CI\\Windows DMX-UFS CI_4.0.160815.4\r\n2016-08-15T16:57:52.8291008Z ##[debug]creating path: \\\\bowdmxtfs01\\Builds\\Windows DMX-UFS CI\\Windows DMX-UFS CI_4.0.160815.4\\drop\r\n2016-08-15T16:57:57.2374429Z shell.js: internal error\r\n2016-08-15T16:57:57.2384437Z RangeError: Maximum call stack size exceeded\r\n2016-08-15T16:57:57.2384437Z     at String.slice (native)\r\n2016-08-15T16:57:57.2384437Z     at Object.dirname (path.js:795:17)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:7:22)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.2384437Z     at mkdirSyncRecursive (E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\node_modules\\shelljs\\src\\mkdir.js:16:3)\r\n2016-08-15T16:57:57.5664681Z ##[error]Exit code 1 returned from process: file name 'E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\externals\\node\\bin\\node.exe', arguments '\"E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\publishbuildartifacts.js\"'.\r\n2016-08-15T16:57:57.5704716Z ##[debug]Microsoft.VisualStudio.Services.Agent.ProcessExitCodeException: Exit code 1 returned from process: file name 'E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\externals\\node\\bin\\node.exe', arguments '\"E:\\TfsBuildAgents\\Agent2-BOWDMXTFS01\\_work\\_tasks\\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\\1.0.34\\publishbuildartifacts.js\"'.\r\n   at Microsoft.VisualStudio.Services.Agent.ProcessInvoker.<ExecuteAsync>d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.NodeHandler.<RunAsync>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.<RunAsync>d__20.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.<RunAsync>d__0.MoveNext()\r\n2016-08-15T16:57:57.5704716Z ##[section]Finishing: Publish Artifact: drop\r\n\r\n## **Worker's diag log on Linux where files are not getting copied**\r\n[2016-08-15 17:55:07Z INFO StepsRunner] Processing step: DisplayName='Publish Artifact: drop', AlwaysRun=True, ContinueOnError=True, Critical=False, Enabled=True, Finally=False\r\n[2016-08-15 17:55:07Z INFO StepsRunner] Starting the step.\r\n[2016-08-15 17:55:07Z INFO TaskManager] Loading task definition '/home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/_tasks/PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe/1.0.34/task.json'.\r\n[2016-08-15 17:55:07Z INFO TaskRunner] The original input is a rooted path, return absolute path: /home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/1/a\r\n[2016-08-15 17:55:07Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Worker.IJobExtension'\r\n[2016-08-15 17:55:07Z INFO BuildJobExtension] Build JobExtension resolving path use source provide: \r\n[2016-08-15 17:55:07Z INFO BuildJobExtension] The Default Path Root of Build JobExtension is build.sourcesDirectory: /home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/1/s\r\n[2016-08-15 17:55:07Z INFO BuildJobExtension] After prefix Default Path Root provide by JobExtension: /home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/1/s\r\n[2016-08-15 17:55:07Z INFO BuildJobExtension] Return absolute path after prefix DefaultPathRoot: /home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/1/s\r\n[2016-08-15 17:55:07Z INFO TaskRunner] build JobExtension resolved a rooted path:: /home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/1/s\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker] Starting process:\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker]   File name: '/home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/externals/node/bin/node'\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker]   Arguments: '\"/home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/_tasks/PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe/1.0.34/publishbuildartifacts.js\"'\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker]   Working directory: '/home/ufs/TfsBuildAgents/Agent1-DMX-UFS1/_work/1/s'\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker]   Require exit code zero: 'True'\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker]   Encoding web name:  ; code page: ''\r\n[2016-08-15 17:55:07Z INFO ProcessInvoker] Process started with process id 29976, waiting for process exit.\r\n[2016-08-15 17:55:07Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1.\r\n[2016-08-15 17:55:07Z INFO JobServerQueue] Try to upload 1 log files or attachments, success rate: 1/1.\r\n[2016-08-15 17:55:08Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:01.4577354.\r\n[2016-08-15 17:55:08Z INFO AsyncCommandContext] Start flush buffered output.\r\n[2016-08-15 17:55:08Z INFO AsyncCommandContext] Finsh flush buffered output.\r\n[2016-08-15 17:55:08Z INFO AsyncCommandContext] Wait till async command task to finish.\r\n[2016-08-15 17:55:08Z INFO StepsRunner] Step result: \r\n[2016-08-15 17:55:08Z INFO StepsRunner] Current state: job state = '', step failed = False, critical step failed = False\r\n"}}
{"actor":{"display_login":"ericsciple"}}