Details
-
Bug
-
Resolution: Timed out
-
Low
-
None
-
5.10.0
-
1
-
Severity 3 - Minor
-
Description
Build plan with repositories associated with it:
Repository | Source Code Checkout | Checkout Directory |
---|---|---|
repo.git | repo_working_directory | |
repoA.git | repo_working_directory-A | A |
repoB.git | repo_working_directory-B | B |
repoC.git | repo_working_directory-C | C |
Running build plan:
- source code checkout from 'repo_working_directory'
- source code checkout from 'repo_working_directory-A'
- source code checkout from 'repo_working_directory-B'
- source code checkout from 'repo_working_directory-C'
simple 25-Feb-2016 10:17:34 Receiving objects: 0% (123/456789), 123.45 MiB | 12.34 MiB/s simple 25-Feb-2016 10:17:34 fatal: The remote end hung up unexpectedly simple 25-Feb-2016 10:17:34 fatal: early EOF simple 25-Feb-2016 10:17:34 fatal: index-pack failed simple 25-Feb-2016 10:17:34 Warning: failed to checkout source code to directory '<bamboo-home>/xml-data/build-dir/PROJ-PLAN-JOB1', trying to recover... simple 25-Feb-2016 10:17:34 Cleaned source directory '<bamboo-home>/xml-data/build-dir/PROJ-PLAN-JOB1'...
Cleanup seems to be running only against 'Build Working Directory' and not taking into consideration 'Checkout Directory' when set up. Consequently, the only source code found in the Build Working Directory is from 'repo_working_directory-C' as retries the source code checkout only from the failure one.
By changing the scenario to the following, Bamboo would clean up the 'Build Working Directory' and 'A, B and C' would be deleted.
- source code checkout from 'repo_working_directory-A'
- source code checkout from 'repo_working_directory-B'
- source code checkout from 'repo_working_directory-C'
- source code checkout from 'repo_working_directory'
In this case, Bamboo should keep track of previous 'Source Code Checkout' tasks configuration and:
- re-run them in case of failure OR;
- delete only the content from failure checkout
Sample clean up Build Working Directory
rethrowOrRemoveDirectory(e, buildLogger, workspaceDir, "repository.git.messages.rsRecover.failedToFetchWorkingDir");
...
BambooPathUtils.deleteQuietly(directory.toPath());