jenkins-infra / ircbot

Jenkins IRCbot
https://jenkins.io/projects/infrastructure/ircbot/
MIT License
23 stars 27 forks source link

[INFRA-786,INFRA-515] - Use new JIRA Rest Client and Support processing HOSTING requests via IRC bot #30

Closed oleg-nenashev closed 8 years ago

oleg-nenashev commented 8 years ago

This PR integrates changes from #28 and #29, which changes the client

CC @slide

oleg-nenashev commented 8 years ago

@slide FYI finished the migration and added some developer docs

oleg-nenashev commented 8 years ago

@slide

Current status:

java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.of(500), errorCollections=[ErrorCollection{status=500, errors={}, errorMessages=[Internal server error]}, ErrorCollection{status=null, errors={}, errorMessages=[Request failed. POST https://issues.jenkins-ci.org/rest/api/latest/issue/172036/transitions?expand=transitions.fields: Internal Server Error]}]}
    at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:328)
    at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:301)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:93)
    at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:69)
    at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.get(DelegatingPromise.java:107)
    at org.jenkinsci.backend.ircbot.JiraHelper.wait(JiraHelper.java:76)
    at org.jenkinsci.backend.ircbot.IrcBotImpl.setupHosting(IrcBotImpl.java:378)
    at org.jenkinsci.backend.ircbot.IrcBotImpl.handleDirectCommand(IrcBotImpl.java:219)
    at org.jenkinsci.backend.ircbot.IrcBotImpl.onMessage(IrcBotImpl.java:92)
    at org.jibble.pircbot.PircBot.handleLine(PircBot.java:927)
    at org.jibble.pircbot.InputThread.run(InputThread.java:95)
Caused by: RestClientException{statusCode=Optional.of(500), errorCollections=[ErrorCollection{status=500, errors={}, errorMessages=[Internal server error]}, ErrorCollection{status=null, errors={}, errorMessages=[Request failed. POST https://issues.jenkins-ci.org/rest/api/latest/issue/172036/transitions?expand=transitions.fields: Internal Server Error]}]}
    at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:200)
    at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:189)
    at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:67)
    at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:11)
    at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268)
    at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158)
    at com.google.common.util.concurrent.Futures$7.run(Futures.java:1072)
    at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
    at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
    at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
    at com.google.common.util.concurrent.AbstractFuture.done(AbstractFuture.java:235)
    at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:172)
    at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
    at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268)
    at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158)
    at com.google.common.util.concurrent.Futures$7.run(Futures.java:1072)
    at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
    at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
    at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
    at com.google.common.util.concurrent.AbstractFuture.done(AbstractFuture.java:235)
    at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:172)
    at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:46)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192)
    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)
oleg-nenashev commented 8 years ago

@slide did you have a chance to test the stuff? I'm about merging the current PR, because the error is likely caused by another workflow in TEST project

slide commented 8 years ago

@oleg-nenashev I will try it as soon as I can.

slide commented 8 years ago

This looks good. :+1:

oleg-nenashev commented 8 years ago

Going forward then