Closed MartinMReed closed 4 years ago
Jenkins ver 2.32.1 (previously also seen on Jenkins 1.164.1) I am actually getting this same traceback, but I am getting it ONLY when running versions 1.6.0 and 1.7.0 If I back up to 1.5.3 then I do not get this traceback. Also, my pull requests are NOT even building If I have a PR change, either a commit or the test this please phrase, then I get the "Read timed out" stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger.run() failed for hudson.model.FreeStyleProject@79aa4ed3[MY_PullRequests] java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: Read timed out
Examining this issue further I can characterize the issue a little further: This occurs mostly on projects where we have a fair number of PR's with some fairly extensive review comments. For example, we currently have ~ 9 PR's outstanding Some are fairly new with few comments, but others are older It is taking > 30 Secs to parse through the information. Last time it only completed getting 7 of the 9 PR's information It crapped out while doing the 8th I see the following: PR-GET-REQUEST:https://\<stashhost>/rest/api/1.0/projects/\<ourProject>/repos/\<ourRepo>/pull-requests/435/merge But there IS no PR-GET-RESPONSE like there was for the previous 7 PR's And a tcpdump capture shows RST packets on the connection.
So another question might be: Is the timeout configurable?
is this issue fixed? my jenkins version is 2.7.5 ... can we increase timeout?
I've run into an issue where pull requests keep getting built over and over regardless of whether the previous run was a success or failure. It is happening in the scenario where a SocketTimeoutException is thrown while retrieving the pull request comments. In our setup we have Jenkins and BitBucket on two different networks, so sometimes there are connection issues.
In
StashApiClient.getPullRequestComments(String, String, String)
there is a try/catch block. If a SocketTimeoutException is thrown while reading any of the comment responses, this method will consume the exception and return an empty list. The empty list then triggers the build to run again because the plugin thinks no previous attempts were made.Pull Request #102 has been created to cascade the exception back to the top (
StashPullRequestsBuilder.run()
) where it will be caught and logged as a failed build attempt.Below is the Jenkins log where the SocketTimeoutException can be seen, followed by the build continuing to run anyway.
Plugin version 1.7.0 Jenkins version 2.7.4
cc: @nemccarthy