-
Bug
-
Resolution: Unresolved
-
Low (View bug fix roadmap)
-
None
-
8.20.9, 9.12.11
-
8.2
-
2
-
Severity 3 - Minor
-
1
-
Issue Summary
Using the Text Gadget on a dashboard to reach out to the Github API can cause exception that prevents the dashboard from loading if the Github API Rate Limit is exceeded. When the exception is thrown by the Github API is it unhandled within Jira causing the dashboard to stop loading.
This is reproducible on Data Center: (yes) / (no)
Steps to Reproduce
- Create a Dashboard that utilizes the Text as HTML gadget to reach out to Github
- Create the Github API request in such a way that the Github Rate limit will be exceeded.
- Attempt to open the dashboard and notice that it will not open
- Within the atlassian-jira.log file the unhandled exception noted below will be observable.
Expected Results
While the text gadget may fail, the rest of the dashboard should still continue to load and render.
Actual Results
The below exception is thrown in the atlassian-jira.log file:
2022-06-22 18:19:12,272+0000 http-nio-8080-exec-1244 url: /rest/bitbucket/1.0/repository/890/sync ERROR anonymous 1098x1791432x1 - 44.228.201.109,10.0.0.42 /rest/bitbucket/1.0/repository/890/sync [c.a.j.p.d.sync.impl.DefaultSynchronizer] org.eclipse.egit.github.core.client.RequestException: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. (403) java.lang.RuntimeException: org.eclipse.egit.github.core.client.RequestException: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. (403) at com.atlassian.jira.plugins.dvcs.spi.github.service.impl.IssueCommentPayloadEventProcessor.getPullRequestByHtmlUrl(IssueCommentPayloadEventProcessor.java:89) at com.atlassian.jira.plugins.dvcs.spi.github.service.impl.IssueCommentPayloadEventProcessor.process(IssueCommentPayloadEventProcessor.java:52) at com.atlassian.jira.plugins.dvcs.spi.github.service.impl.GitHubEventProcessorAggregatorImpl.process(GitHubEventProcessorAggregatorImpl.java:64) at com.atlassian.jira.plugins.dvcs.service.GitHubEventServiceImpl$SyncTransactionCallback.doInTransaction(GitHubEventServiceImpl.java:223) at com.atlassian.jira.plugins.dvcs.service.GitHubEventServiceImpl$SyncTransactionCallback.doInTransaction(GitHubEventServiceImpl.java:177) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:50) at jdk.internal.reflect.GeneratedMethodAccessor214.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy644.doInTransaction(Unknown Source) at jdk.internal.reflect.GeneratedMethodAccessor214.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:130) at com.sun.proxy.$Proxy644.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) at jdk.internal.reflect.GeneratedMethodAccessor282.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) 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.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 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.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) at com.sun.proxy.$Proxy1295.execute(Unknown Source) at com.atlassian.activeobjects.internal.SalTransactionManager.inTransaction(SalTransactionManager.java:42) at com.atlassian.activeobjects.internal.AbstractLoggingTransactionManager.doInTransaction(AbstractLoggingTransactionManager.java:16) at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.executeInTransaction(EntityManagedActiveObjects.java:214) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.executeInTransaction(TenantAwareActiveObjects.java:342) at jdk.internal.reflect.GeneratedMethodAccessor767.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) 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.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 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.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) at com.sun.proxy.$Proxy3424.executeInTransaction(Unknown Source) at com.atlassian.jira.plugins.dvcs.service.GitHubEventServiceImpl.synchronize(GitHubEventServiceImpl.java:133) at com.atlassian.jira.plugins.dvcs.spi.github.GithubCommunicator.startSynchronisation(GithubCommunicator.java:658) at com.atlassian.jira.plugins.dvcs.service.remote.CachingCommunicator.startSynchronisation(CachingCommunicator.java:109) at com.atlassian.jira.plugins.dvcs.sync.impl.DefaultSynchronizer.doSync(DefaultSynchronizer.java:180) at com.atlassian.jira.plugins.dvcs.service.RepositorySyncServiceImpl.doSync(RepositorySyncServiceImpl.java:473) at com.atlassian.jira.plugins.dvcs.service.RepositorySyncServiceImpl.sync(RepositorySyncServiceImpl.java:236) at com.atlassian.jira.plugins.dvcs.rest.external.v1.RepositoryResource.startRepositoryPRSync(RepositoryResource.java:402) at jdk.internal.reflect.GeneratedMethodAccessor4264.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) ... 19 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:160) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:70) ... 36 filtered at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59) ... 4 filtered at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54) ... 3 filtered at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 43 filtered at com.atlassian.ratelimiting.internal.filter.RateLimitFilter.doFilter(RateLimitFilter.java:73) ... 3 filtered at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46) ... 17 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64) ... 16 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:38) ... 3 filtered at com.atlassian.pats.web.filter.TokenBasedAuthenticationFilter.doFilter(TokenBasedAuthenticationFilter.java:82) ... 19 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.atlassian.plugins.authentication.impl.basicauth.filter.DisableBasicAuthFilter.doFilter(DisableBasicAuthFilter.java:70) ... 8 filtered at com.atlassian.ratelimiting.internal.filter.RateLimitPreAuthFilter.doFilter(RateLimitPreAuthFilter.java:71) ... 3 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46) ... 3 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 26 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 25 filtered at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Unknown Source) Caused by: org.eclipse.egit.github.core.client.RequestException: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. (403) at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:552) at org.eclipse.egit.github.core.client.GitHubClient.get(GitHubClient.java:740) at com.atlassian.jira.plugins.dvcs.spi.github.GithubClientWithTimeout.lambda$get$0(GithubClientWithTimeout.java:67) at com.atlassian.jira.plugins.dvcs.spi.github.GithubClientWithTimeout.executeRequest(GithubClientWithTimeout.java:103) at com.atlassian.jira.plugins.dvcs.spi.github.GithubClientWithTimeout.get(GithubClientWithTimeout.java:67) at org.eclipse.egit.github.core.service.GitHubService.getAll(GitHubService.java:151) at org.eclipse.egit.github.core.service.PullRequestService.getPullRequests(PullRequestService.java:152) at com.atlassian.jira.plugins.dvcs.spi.github.service.impl.IssueCommentPayloadEventProcessor.getPullRequestByHtmlUrl(IssueCommentPayloadEventProcessor.java:80) ... 341 more
Workaround
Recreating the dashboard without the Text as HTML gadget (thereby removing the calls to the Github API) will prevent the issue from occurring.
- is related to
-
JSWSERVER-26120 401 and 403 responses from GitHub do not engage corrective action
-
- Short Term Backlog
-
- links to