Description
Problem Definition
Currently when a VCS command is timed out due to reaching the configured 'Command Timeout' under Advanced options on the repository, there's no clear message in either the build or application / UI error log (when change detection fails before it gets to build) that this is what happened.
This is an example of what appears:
2017-05-03 22:50:28,337 ERROR [5-DelayedChangeDetectionThread:pool-11-thread-1] [ChainExecutionManagerImpl] Plan 'PROJ-PLAN' could not be started. Exception: com.atlassian.bamboo.executor.CancelException: Command was canceled: command /usr/bin/git fetch .. --update-head-ok failed with code -1. Working directory was [..].
com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.executor.CancelException: Command was canceled: command /usr/bin/git fetch s.. --update-head-ok failed with code -1. Working directory was [..].
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:396)
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:313)
at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:203)
..........
Caused by: com.atlassian.bamboo.executor.CancelException: Command was canceled: command .. --update-head-ok failed with code -1. Working directory was [..].
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:771)
at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runFetchCommand(GitCommandProcessor.java:342)
at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.fetch(NativeGitOperationHelper.java:516)
We also get a similar error code when the git executable can't be found:
Suggested Solution
Log a clear message to both the build and application log that the command timeout limit of x minutes was reached and the VCS command was aborted.