Missing Pull Requests in Bitbucket Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

問題

 The  navigation panel  on the left shows there are three pull requests, however when you filter for all pull requests the UI says there are "No Pull Requests". The following error appears in the atlassian-bitbucket.log files.  

2018-03-06 11:40:22,168 ERROR [http-nio-7990-exec-446] user @1B21JCCx700x26273498x19 user 127.14..200,20.34.46.101 "GET /rest/api/latest/projects/POY/repos/dfr/pull-requests/242/merge HTTP/1.0" c.a.s.i.r.e.DefaultUnhandledExceptionMapperHelper Unhandled exception while processing REST request: "GET /rest/api/latest/projects/POY/repos/dfr/pull-requests/242/merge HTTP/1.0"
java.lang.IllegalArgumentException: No enum constant com.atlassian.stash.internal.scm.git.pull.PullRequestMergeType.CLEANICTED
	at java.lang.Enum.valueOf(Enum.java:238)
	at com.atlassian.stash.internal.scm.git.pull.PullRequestMergeType.valueOf(PullRequestMergeType.java:14)
	at com.atlassian.stash.internal.scm.git.pull.CachedEffectiveDiff.<init>(CachedEffectiveDiff.java:39)
	at com.atlassian.stash.internal.scm.git.pull.CachedEffectiveDiff.load(CachedEffectiveDiff.java:168)
	at com.atlassian.stash.internal.scm.git.pull.CachedEffectiveDiff.load(CachedEffectiveDiff.java:141)
	at com.atlassian.stash.internal.scm.git.pull.DefaultPullRequestRefHelper.resolveCachedEffectiveDiff(DefaultPullRequestRefHelper.java:371)
	at com.atlassian.stash.internal.scm.git.pull.DefaultPullRequestRefHelper.resolveEffectiveDiff(DefaultPullRequestRefHelper.java:117)
	at com.atlassian.stash.internal.scm.git.DefaultGitPullRequestCommandFactory$3.call(DefaultGitPullRequestCommandFactory.java:211)
	at com.atlassian.stash.internal.scm.git.DefaultGitPullRequestCommandFactory$3.call(DefaultGitPullRequestCommandFactory.java:207)
	at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.tryMerge(DefaultMergeRequestCheckService.java:95)
	at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.checkMergeability(DefaultMergeRequestCheckService.java:57)
	at com.atlassian.stash.internal.pull.DefaultPullRequestService.canMerge(DefaultPullRequestService.java:348)
	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.stash.internal.rest.pull.PullRequestResource.canMerge(PullRequestResource.java:427)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
	at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92)
	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:88)
	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112)
	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)
	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
	at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21)
	at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)
	at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
	at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38)
	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90)
	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73)
	at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:90)
	at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.lang.Thread.run(Thread.java:745)
	... 303 frames trimmed

If you go to the pull request in the error by manually typing the URL in the browser: https://mybitbucket/projects/POY/repos/drf/pull-requests/242/overview

It states "An error occurred while process the request. Check the server logs for more information." There is a spinning icon where normally the "Merge" button would appear.

原因

We allow these pull requests to be in one of three enum: BASE, CLEAN and CONFLICTED. The state of the pull request is an invalid one, "CLEANICTED".

java.lang.IllegalArgumentException: No enum constant com.atlassian.stash.internal.scm.git.pull.PullRequestMergeType.CLEANICTED

This error happens when bitbucket server tries to use the cached effective merge, and the cached version file has an invalid state. The invalid state could have occurred due to some sort of version collision when Bitbucket Server creates the cached effective merge. 

ソリューション

Typically we see these errors on versions of Bitbucket before 5.0. Please upgrade to a later version of Bitbucket as the code has been hardened to avoid these race conditions. 

Last modified on Mar 8, 2018

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.