-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
5.6.0
-
None
I was hoping this was going to be fixed with the new Stash integration in 5.6 but it doesn't look like it has.
Stash 3.1.3 with 2L-OAuth both ways between Stash and Bamboo. All plans are set using the "Stash" repository type and the "Stash" build trigger.
Expected Result:
Upon push to Stash, it triggers a new branch build in Bamboo. Upon successful Pull Request merge in Stash the git branch is deleted. This triggers Bamboo to disable the branch until the expiry date on the Plan. When that expiry date is hit, the Bamboo Branch Plan is deleted from the list.
Actual Result:
The branch in Bamboo gets disabled but not deleted. When the branch cleanup plan gets run at 3am it spams the logs with hundreds of errors representing each branch it can no longer find. The branch plan remains in Bamboo.
2014-08-05 03:00:06,745 ERROR [QuartzScheduler_Worker-2] [BranchExpiryJob] Error in chain branch expiry com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'ssh://git@<domain>:7999/<project>/<repo>.git' on branch 'bugfix/<branchname>'. Branch has probably been removed. at com.atlassian.bamboo.plugins.stash.StashRepository.getLastCommit(StashRepository.java:693) at com.atlassian.bamboo.plan.branch.BranchExpiryJob.execute(BranchExpiryJob.java:94) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'ssh://git@<domain>:7999/<project>/<repo>.git' on branch 'bugfix/<branchname>'. Branch has probably been removed. at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:543) at com.atlassian.bamboo.plugins.git.GitRepository.getLastCommit(GitRepository.java:590) at com.atlassian.bamboo.plugins.stash.StashRepository.getLastCommit(StashRepository.java:689) ... 7 more