Description
Issue
After upgrading from BitBucket 4.x to BitBucket 5.x, whenever a Pull Request is created, the following error related to Hipchat notifications gets written in the logs:
2017-11-20 15:06:18,893 ERROR [AtlassianEvent::thread-2] @1NFVY8Hx906x279279x0 521ps8 <IP_ADDRESS> SSH - git-receive-pack '/<dir>/<repo_name>.git' c.a.s.i.e.AsyncBatchingInvokersTransformer There was an exception thrown trying to dispatch event 'com.atlassian.stash.internal.event.AnalyticsRepositoryPushEvent[source=com.atlassian.stash.internal.hook.PushPostReceiveHook@28374819]' for the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.bitbucket.internal.hipchat.notification.NotificationEventListener.onEvent(com.atlassian.bitbucket.event.ApplicationEvent), listener=com.atlassian.bitbucket.internal.hipchat.notification.NotificationEventListener@606f82e4}' java.lang.RuntimeException: Commit '0000000000000000000000000000000000000000' does not exist in repository '<repo_name>'.. Listener: com.atlassian.bitbucket.internal.hipchat.notification.NotificationEventListener event: com.atlassian.stash.internal.event.AnalyticsRepositoryPushEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55) at com.atlassian.stash.internal.event.AsyncBatchingInvokersTransformer$AsyncInvokerBatch.invoke(AsyncBatchingInvokersTransformer.java:109) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38) at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.lang.Thread.run(Thread.java:748) ... 1 frame trimmed Caused by: com.atlassian.bitbucket.commit.NoSuchCommitException: Commit '0000000000000000000000000000000000000000' does not exist in repository '<repo_name>'. at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.newNoSuchCommitException(GitCommandExitHandler.java:167) at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateStdErr(GitCommandExitHandler.java:70) at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:197) at com.atlassian.stash.internal.scm.git.command.revlist.RevCoreExitHandler.onError(RevCoreExitHandler.java:52) at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31) at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:146) at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:280) at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:244) at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:83) at com.atlassian.stash.internal.commit.DefaultCommitService.getCommits(DefaultCommitService.java:410) at com.atlassian.stash.internal.commit.DefaultCommitService.getCommitsBetween(DefaultCommitService.java:181) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at com.atlassian.bitbucket.internal.hipchat.notification.HipChatNotificationRenderer.getCommits(HipChatNotificationRenderer.java:160) at com.atlassian.bitbucket.internal.hipchat.notification.HipChatNotificationRenderer.lambda$formatRefChanges$0(HipChatNotificationRenderer.java:146) at com.google.common.collect.Iterators$8.transform(Iterators.java:799) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.Iterators$9.next(Iterators.java:944) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:271) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:226) at com.atlassian.bitbucket.util.Chainable.toList(Chainable.java:162) at com.atlassian.bitbucket.internal.hipchat.notification.HipChatNotificationRenderer.formatRefChanges(HipChatNotificationRenderer.java:152) at com.atlassian.bitbucket.internal.hipchat.notification.HipChatNotificationRenderer.getCommitPushMessage(HipChatNotificationRenderer.java:87) at com.atlassian.bitbucket.internal.hipchat.notification.RepositoryPushNotification.getMessage(RepositoryPushNotification.java:46) at com.atlassian.bitbucket.internal.hipchat.notification.RepositoryPushNotification.getMessage(RepositoryPushNotification.java:20) at com.atlassian.bitbucket.internal.hipchat.notification.NotificationEventListener.lambda$onEvent$3(NotificationEventListener.java:56) at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at com.atlassian.bitbucket.internal.hipchat.notification.NotificationEventListener.onEvent(NotificationEventListener.java:69) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40) ... 6 common frames omitted
How to Replicate
- git checkout -b bugfix/hiptest2 (create new branch)
- vi file1 (make a change)
- git add .
- git commit -m "Test"
- git push origin bugfix/hiptest2
Expected behavior
In version pre-5.x, the new branch creation was noted in the Hipchat room and the notification for the event was also published in the room with no errors in the logs
Actual Behavior
The notification for the event makes it to Hipchat but the branch creation is not noted in the room and an error for a missing commit is seen in the logs
Attachments
Issue Links
- mentioned in
-
Page Loading...