Hi,
We are using GIT Integration for JIRA plugin with our OnPremise GitLab CE server.
On each JIRA issu, we have in the "GIT Commits" tab all commits that contains the ticket number in comment => OK.
On the right side on the issue, just under the Agile section, there is the "Git Source Code Section". In that section, we can see all branches referenced to this ticket and also the number of commits.
My issue is that even if we have an open MergeRequest for this issue : the MR is not referenced in that section.
We only see the button to create a new MR.
Does anyone has the same issue ?
Thanks,
Thomas
Hi Thomas,
Is this Jira Server or Jira Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On your "Manage Repos" screen, is everything green?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, everything is Green.
Indexing seems to be fine as I can see latests commits on the "Git Commit" tab in JIRA issues. All branches are also corretly displayed on the "GIT Source Code" section.
Only MR are not displayed ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another question... what version of GitLab CE are you using?
You can enable logging for com.bigbrassband.jira. package.
We have INFO log messages such as:
Skipping merge request check for Repo: [repoId] =
Can not get list of merge requests for repo: [repoId] =
etc..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks a lot. Indeed there are HTTP 500 errors in logs.
It seems like GitLab does not like the per_page=100 parameter.
https://our_git_url/api/v4/projects/91/merge_requests?per_page=100
=> KO: HTTP 500
https://our_git_url/api/v4/projects/91/merge_requests?per_page=70
=> OK
Maybe we have now reached a number of MR that cause error in GitLab API.
Is there a way to limit the page size on JIRA plugin ?
Our GitLab instance version is : 11.0.2
Regards,
Thomas
2018-10-18 10:59:17,964 bigbrassband-gitplugin-RevisionIndexerImpl:thread - 0 WARN ServiceRunner [c.b.j.g.s.indexer.pullrequests.PullRequestIndexManagerImpl] Can not get list of merge requests for repo: https://our_git_url/
patch/app.git
com.bigbrassband.jira.git.exceptions.external.WrappedIntegrationAPIException: External service error
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl$SingleGitManagerWithPullReqIndex.getPullRequests(PullRequestIndexManagerImpl.java:108)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl$SingleGitManagerWithPullReqIndex.getPullRequests(PullRequestIndexManagerImpl.java:66)
at com.bigbrassband.common.indexer.sources.RepoSourceWithPullRequestIndex$1.onUuidFolder(RepoSourceWithPullRequestIndex.java:49)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PlainSmartFolder.visitUuidDirectories(PlainSmartFolder.java:26)
at com.bigbrassband.common.indexer.sources.RepoSourceWithPullRequestIndex.updatePullRequests(RepoSourceWithPullRequestIndex.java:37)
at com.bigbrassband.common.indexer.PullreqIndexer.updatePullRequests(PullreqIndexer.java:158)
at com.bigbrassband.common.indexer.PullreqIndexer.indexPullRequests(PullreqIndexer.java:93)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl.updatePullReqIndex(PullRequestIndexManagerImpl.java:181)
at com.bigbrassband.jira.git.services.indexer.revisions.GitPluginIndexManagerImpl.updateIndexImpl(GitPluginIndexManagerImpl.java:446)
at com.bigbrassband.jira.git.services.indexer.revisions.GitPluginIndexManagerImpl.updateIndex(GitPluginIndexManagerImpl.java:486)
at com.bigbrassband.jira.git.services.indexer.revisions.RevisionIndexerImpl$1.doRun(RevisionIndexerImpl.java:358)
at com.bigbrassband.jira.git.services.indexer.revisions.RevisionIndexerImpl$QueueEntry.run(RevisionIndexerImpl.java:163)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Error: org.gitlab.api.GitlabAPIException: {"message":"500 Internal Server Error"}
at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:298)
at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:252)
at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:199)
at org.gitlab.api.GitlabAPI.getMergeRequests(GitlabAPI.java:1303)
at com.bigbrassband.common.integration.GitLabApiPool$GitLabApiWrapper$3.call(GitLabApiPool.java:473)
at com.bigbrassband.common.integration.GitLabApiPool$GitLabApiWrapper.doSafely(GitLabApiPool.java:245)
at com.bigbrassband.common.integration.GitLabApiPool$GitLabApiWrapper.getMergeRequests(GitLabApiPool.java:470)
at com.bigbrassband.jira.git.services.integration.gitlab.CachedGitLabApi.getMergeRequests(CachedGitLabApi.java:131)
at com.bigbrassband.jira.git.services.integration.gitlab.GitLabApiService$GitLabRepoApi.getMergeRequests(GitLabApiService.java:97)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl$SingleGitManagerWithPullReqIndex.getPullRequests(PullRequestIndexManagerImpl.java:84)
... 16 more
Caused by: org.gitlab.api.GitlabAPIException: {"message":"500 Internal Server Error"}
at org.gitlab.api.http.GitlabHTTPRequestor.handleAPIError(GitlabHTTPRequestor.java:485)
at org.gitlab.api.http.GitlabHTTPRequestor.access$3(GitlabHTTPRequestor.java:471)
at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:295)
... 26 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://our_git_url/api/v4/projects/91/merge_requests?per_page=100
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:443)
at org.gitlab.api.http.GitlabHTTPRequestor.access$2(GitlabHTTPRequestor.java:437)
at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:291)
... 26 more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks a lot. Indeed there are HTTP 500 errors in logs.
It seems like GitLab does not like the per_page=100 parameter.
https://our_git_url/api/v4/projects/91/merge_requests?per_page=100
=> KO: HTTP 500
https://our_git_url/api/v4/projects/91/merge_requests?per_page=70
=> OK
Maybe we have now reached a number of MR that cause error in GitLab API.
Is there a way to limit the page size on JIRA plugin ?
Our GitLab instance version is : 11.0.2
Regards,
Thomas
2018-10-18 10:59:17,964 bigbrassband-gitplugin-RevisionIndexerImpl:thread - 0 WARN ServiceRunner [c.b.j.g.s.indexer.pullrequests.PullRequestIndexManagerImpl] Can not get list of merge requests for repo: https://our_git_url/
patch/app.git
com.bigbrassband.jira.git.exceptions.external.WrappedIntegrationAPIException: External service error
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl$SingleGitManagerWithPullReqIndex.getPullRequests(PullRequestIndexManagerImpl.java:108)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl$SingleGitManagerWithPullReqIndex.getPullRequests(PullRequestIndexManagerImpl.java:66)
at com.bigbrassband.common.indexer.sources.RepoSourceWithPullRequestIndex$1.onUuidFolder(RepoSourceWithPullRequestIndex.java:49)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PlainSmartFolder.visitUuidDirectories(PlainSmartFolder.java:26)
at com.bigbrassband.common.indexer.sources.RepoSourceWithPullRequestIndex.updatePullRequests(RepoSourceWithPullRequestIndex.java:37)
at com.bigbrassband.common.indexer.PullreqIndexer.updatePullRequests(PullreqIndexer.java:158)
at com.bigbrassband.common.indexer.PullreqIndexer.indexPullRequests(PullreqIndexer.java:93)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl.updatePullReqIndex(PullRequestIndexManagerImpl.java:181)
at com.bigbrassband.jira.git.services.indexer.revisions.GitPluginIndexManagerImpl.updateIndexImpl(GitPluginIndexManagerImpl.java:446)
at com.bigbrassband.jira.git.services.indexer.revisions.GitPluginIndexManagerImpl.updateIndex(GitPluginIndexManagerImpl.java:486)
at com.bigbrassband.jira.git.services.indexer.revisions.RevisionIndexerImpl$1.doRun(RevisionIndexerImpl.java:358)
at com.bigbrassband.jira.git.services.indexer.revisions.RevisionIndexerImpl$QueueEntry.run(RevisionIndexerImpl.java:163)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Error: org.gitlab.api.GitlabAPIException: {"message":"500 Internal Server Error"}
at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:298)
at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:252)
at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:199)
at org.gitlab.api.GitlabAPI.getMergeRequests(GitlabAPI.java:1303)
at com.bigbrassband.common.integration.GitLabApiPool$GitLabApiWrapper$3.call(GitLabApiPool.java:473)
at com.bigbrassband.common.integration.GitLabApiPool$GitLabApiWrapper.doSafely(GitLabApiPool.java:245)
at com.bigbrassband.common.integration.GitLabApiPool$GitLabApiWrapper.getMergeRequests(GitLabApiPool.java:470)
at com.bigbrassband.jira.git.services.integration.gitlab.CachedGitLabApi.getMergeRequests(CachedGitLabApi.java:131)
at com.bigbrassband.jira.git.services.integration.gitlab.GitLabApiService$GitLabRepoApi.getMergeRequests(GitLabApiService.java:97)
at com.bigbrassband.jira.git.services.indexer.pullrequests.PullRequestIndexManagerImpl$SingleGitManagerWithPullReqIndex.getPullRequests(PullRequestIndexManagerImpl.java:84)
... 16 more
Caused by: org.gitlab.api.GitlabAPIException: {"message":"500 Internal Server Error"}
at org.gitlab.api.http.GitlabHTTPRequestor.handleAPIError(GitlabHTTPRequestor.java:485)
at org.gitlab.api.http.GitlabHTTPRequestor.access$3(GitlabHTTPRequestor.java:471)
at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:295)
... 26 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://our_git_url/api/v4/projects/91/merge_requests?per_page=100
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:443)
at org.gitlab.api.http.GitlabHTTPRequestor.access$2(GitlabHTTPRequestor.java:437)
at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:291)
... 26 more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
500 means "internal server error"...
In your example case, what happens when you go to the next page:
https://our_git_url/api/v4/projects/91/merge_requests?per_page=70&page=2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
I have just found our problem.
The issue is that some of our MR are KO (also HTTP 500 even with GitLab WebUI) because they are still open while target branch does not exist anymore.
I will clean those MR (by creating again the target branch in order to be able to close the MR) and then API will work again.
I then assume that the indexing on Git Integration side will be OK again.
Thanks for your help !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.