When a branch is deleted from the Git repository, and the branch gets triggered to run, Bamboo shows this error before disabling the Bamboo brnach:

      2013-01-28 13:48:28,629 INFO [2-DelayedChangeDetectionThread:pool-5-thread-1] [RetryingTaskExecutor] Task 'Collecting changes for PROJ1-PLAN11' was unsuccessful. Run 2 / 2. Exception thrown when running task 'Collecting changes for PROJ1-PLAN11', with message: Cannot determine head revision of 'file:///Users/akhachatryan/dev/Repositories/GitTest' on branch 'next'. Branch has probably been removed.
      2013-01-28 13:48:28,629 ERROR [2-DelayedChangeDetectionThread:pool-5-thread-1] [RetryingTaskExecutor] Failed to run task 'Collecting changes for PROJ1-PLAN11' after 2 attempts. Task was not executed.
      2013-01-28 13:48:28,629 ERROR [2-DelayedChangeDetectionThread:pool-5-thread-1] [RetryingTaskExecutor] Exception being rethrown
      2013-01-28 13:48:28,630 ERROR [2-DelayedChangeDetectionThread:pool-5-thread-1] [ChainExecutionManagerImpl] Errors getting changes for PROJ1-PLAN11-1
      java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'file:///Users/akhachatryan/dev/Repositories/GitTest' on branch 'next'. Branch has probably been removed.
      	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132)
      	at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
      	at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
      	at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectionChangesWithRetry(DefaultChangeDetectionManager.java:457)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:318)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:251)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:161)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectAllChangesSinceLastBuild(DefaultChangeDetectionManager.java:127)
      	at com.atlassian.bamboo.v2.trigger.ManualBuildDetectionAction.performDelayedChangeDetection(ManualBuildDetectionAction.java:113)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.getChainState(ChainExecutionManagerImpl.java:199)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:252)
      	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:189)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy78.delayedStart(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      	at $Proxy79.delayedStart(Unknown Source)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:300)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:296)
      	at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:324)
      	at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:77)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:467)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$200(PlanExecutionManagerImpl.java:48)
      	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1.run(PlanExecutionManagerImpl.java:295)
      	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'file:///Users/akhachatryan/dev/Repositories/GitTest' on branch 'next'. Branch has probably been removed.
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:508)
      	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:223)
      	at com.atlassian.bamboo.plugins.git.GitRepository.collectChangesSinceLastBuild(GitRepository.java:211)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:461)
      	at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager$1.call(DefaultChangeDetectionManager.java:458)
      	at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
      	... 39 more
      

      Please handle this exception more gracefully.

            [BAM-12684] Bamboo git branch automatic deletion

            This functionality is available since Bamboo 5.9

            Marcin Gardias added a comment - This functionality is available since Bamboo 5.9

            this is also discussed in https://jira.atlassian.com/browse/BAM-13129
            and after more than a year atlassian still didn't picked this up WHY??
            please pickup this issue

            Deleted Account (Inactive) added a comment - this is also discussed in https://jira.atlassian.com/browse/BAM-13129 and after more than a year atlassian still didn't picked this up WHY?? please pickup this issue

            Kyle Varga added a comment -

            Any update? My error log is all noise because of this issue.

            Kyle Varga added a comment - Any update? My error log is all noise because of this issue.

            Rob Kooper added a comment -

            We are doing sprints and have a screen with all the bamboo builds for our project. Once the specific branch has been merged in the master the branch gets deleted. It would be nice for the branch to be deleted from the wall as well.

            Rob Kooper added a comment - We are doing sprints and have a screen with all the bamboo builds for our project. Once the specific branch has been merged in the master the branch gets deleted. It would be nice for the branch to be deleted from the wall as well.

            We should suppress this error when the case where the branch is deleted.

            James Dumay added a comment - We should suppress this error when the case where the branch is deleted.

            Sorry, This hasn't been scheduled yet Andrew. I an unable to provide an ETA for this issue yet.

            James Dumay added a comment - Sorry, This hasn't been scheduled yet Andrew. I an unable to provide an ETA for this issue yet.

            Hi. Any update on when this issue will be fixed? It's a bit annoying clearing out a bunch of errors every day that shouldn't actually exist.

            Andrew Pitt added a comment - Hi. Any update on when this issue will be fixed? It's a bit annoying clearing out a bunch of errors every day that shouldn't actually exist.

            Yes, I agree we need to address this in the near term. Thanks for your feedback Andrew.

            James Dumay added a comment - Yes, I agree we need to address this in the near term. Thanks for your feedback Andrew.

            This shows up as big red error messages in the disabled branch plans, which makes it seem a lot more serious than it is.

            It also makes it feel like Bamboo doesn't want you to delete short-lived branches (even though that's not the case).

            Although this isn't a blocker, it would be nice if this was resolved fairly soon. Once Stash adds the ability to delete a branch upon a successful Pull Request, this issue will get even worse.

            Thanks.

            Andrew Pitt added a comment - This shows up as big red error messages in the disabled branch plans, which makes it seem a lot more serious than it is. It also makes it feel like Bamboo doesn't want you to delete short-lived branches (even though that's not the case). Although this isn't a blocker, it would be nice if this was resolved fairly soon. Once Stash adds the ability to delete a branch upon a successful Pull Request, this issue will get even worse. Thanks.

              Unassigned Unassigned
              akhachatryan ArmenA
              Affected customers:
              32 This affects my team
              Watchers:
              23 Start watching this issue

                Created:
                Updated:
                Resolved: