I seem to get random failures when running the first TASK of the plan that is supposed to clean up whatever is in the current REMOTE AGENT's working directory, which is an artifact directory with two multi level subdirectories with very few files, and only two of which are of any real size (7.5 Mb each).
When I look at the working directory after the failure, everything but the 2 top level directories has been removed, so it almost looks like a timing issue of some sort where there still is a file system lock at the time the TASK checks to see if it's been completed.
If/when the plan is re-run, the removal succeeds/completes.
Has anyone run into this type of issue with windows BAMBOO?
I suppose I could remove them myself, but I should think the plugin task would be able to handle this.
Thanks!
T.S.
SAMPLE ERROR LOG for reference :
...
22-Jan-2019 12:17:46 Build working directory is
\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1
22-Jan-2019 12:17:46 Executing build RETOOLS - TOOLS TEST - Default Job #151 (RET-TT-JOB1-151)
22-Jan-2019 12:17:46 Starting task 'clean' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask'
22-Jan-2019 12:17:46 Cleaning working directory 'D:\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1'
22-Jan-2019 12:17:46 Unable to clean working directory 'D:\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1'
\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1\testartifacts
22-Jan-2019 12:17:46 Error occurred while running Task 'clean(6)' of type com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask.
22-Jan-2019 12:17:46 com.atlassian.bamboo.task.TaskException: Unable to clean working directory 'D:\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1'
\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1\testartifacts
22-Jan-2019 12:17:46 at com.atlassian.bamboo.plugins.artifact.CleanWorkingDirectoryTask.cleanWorkingDir(CleanWorkingDirectoryTask.java:52)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.plugins.artifact.CleanWorkingDirectoryTask.execute(CleanWorkingDirectoryTask.java:26)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:319)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:319)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:91)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:81)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:129)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:123)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
22-Jan-2019 12:17:46 at java.lang.Thread.run(Unknown Source)
22-Jan-2019 12:17:46 Caused by: java.nio.file.DirectoryNotEmptyException:
\BAGENTS\AGENT3\xml-data\build-dir\RET-TT-JOB1\testartifacts
22-Jan-2019 12:17:46 at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
22-Jan-2019 12:17:46 at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
22-Jan-2019 12:17:46 at java.nio.file.Files.delete(Unknown Source)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooFiles.delete(BambooFiles.java:43)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooPathUtils.deleteNoThrow(BambooPathUtils.java:162)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooPathUtils.access$000(BambooPathUtils.java:38)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:121)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooPathUtils$1.postVisitDirectory(BambooPathUtils.java:91)
22-Jan-2019 12:17:46 at java.nio.file.Files.walkFileTree(Unknown Source)
22-Jan-2019 12:17:46 at java.nio.file.Files.walkFileTree(Unknown Source)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.utils.BambooPathUtils.cleanDirectory(BambooPathUtils.java:80)
22-Jan-2019 12:17:46 at com.atlassian.bamboo.plugins.artifact.CleanWorkingDirectoryTask.cleanWorkingDir(CleanWorkingDirectoryTask.java:48)
22-Jan-2019 12:17:46 ... 17 more
22-Jan-2019 12:17:46 Failed to prepare the build 'RETOOLS - TOOLS TEST - Default Job #151 (RET-TT-JOB1-151)'
22-Jan-2019 12:17:46 Running on server: post build plugin 'NCover Results Collector'
22-Jan-2019 12:17:46 Running on server: post build plugin 'Build Hanging Detection Configuration'
22-Jan-2019 12:17:46 Running on server: post build plugin 'Clover Delta Calculator'
22-Jan-2019 12:17:46 Running on server: post build plugin 'Maven Dependencies Postprocessor'
22-Jan-2019 12:17:46 All post build plugins have finished
22-Jan-2019 12:17:46 Generating build results summary...
22-Jan-2019 12:17:46 Saving build results to disk...
22-Jan-2019 12:17:46 Logging substituted variables...