Running branch merge builds throws Merge Command Error: Runtime Exception
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
When running a build that performs a branch merge, the following error appears in the UI:
The following appears in the
2016-06-22 10:11:02,891 WARN [6-DelayedChangeDetectionThread:pool-12-thread-48] [ChainExecutionManagerImpl] Merge command error: Runtime exception.
To confirm this issue you can enable more detailed logging in Bamboo's
- Go to Bamboo Admin >> Settings >> Log Settings
Add the following class and set the type to DEBUG:
ClassPath Type com.atlassian.bamboo.chains.ChainExecutionManagerImpl DEBUG
Reproduce the issue and check
$BAMBOO_HOME/logs/atlassian-bamboo.logfor a line similar to the following:
error: unable to resolve reference refs/heads/this-is-a-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-branch-name: Filename too long ! [new branch] this-is-a-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-branch-name -> this-is-a-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-branch-name (unable to update local ref)
When performing a merge, Bamboo will do a full checkout of the repository and will gather all the current branch names whilst updating the head. If one of the branch names is too long, it will cause the update head task to fail, and the merge of any branch will not be able to complete.
The maximum possible length of a branch name depends on a number of factors:
- Operating System
- On Windows systems, file path limits are much lower, and the unpacking of the branch head may exceed the file system path limit of 260 characters, so the length of the full path to the build working directory may be related
- Different versions of git may exhibit different limitations
- Bamboo's internal DB schema stores branch names in a 255 character field
Check the repository in question for extremely long branch names and remove them if found, and subsequent builds of any branch should not run into this issue
Was this helpful?Yes Provide feedback about this article