You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/06/07 06:01:40 UTC
[bookkeeper] branch master updated: Improve merge script on
checking the statuses of github checks (missing commit)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new acec56f Improve merge script on checking the statuses of github checks (missing commit)
acec56f is described below
commit acec56f4928acbefbe3670ee0fdbf2c5d65f15d4
Author: Sijie Guo <si...@apache.org>
AuthorDate: Wed Jun 6 22:40:33 2018 -0700
Improve merge script on checking the statuses of github checks (missing commit)
Descriptions of the changes in this PR:
*Motivation*
Sometimes Jenkins CI job might already succeed, however they failed on publishing the build status
to Github due to timeout (one example is attached below). In this case, we don't need to rerun the jenkins check again.
```
Setting status of 55c1d54f3293e5166c59f238afd3fb3d98c7eb67 to SUCCESS with url https://builds.apache.org/job/bookkeeper_precommit_client_tests/21/ and message: 'SUCCESS
'
Using context: Jenkins: Client Tests
Could not update commit status of the Pull Request on GitHub.
org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/repos/apache/bookkeeper/statuses/55c1d54f3293e5166c59f238afd3fb3d98c7eb67
at org.kohsuke.github.Requester.parse(Requester.java:633)
at org.kohsuke.github.Requester.parse(Requester.java:631)
at org.kohsuke.github.Requester.parse(Requester.java:631)
at org.kohsuke.github.Requester.parse(Requester.java:594)
at org.kohsuke.github.Requester._to(Requester.java:272)
at org.kohsuke.github.Requester.to(Requester.java:234)
at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:1075)
at org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus.createCommitStatus(GhprbSimpleStatus.java:281)
at org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus.onBuildComplete(GhprbSimpleStatus.java:239)
at org.jenkinsci.plugins.ghprb.GhprbBuilds.onCompleted(GhprbBuilds.java:205)
at org.jenkinsci.plugins.ghprb.GhprbBuildListener.onCompleted(GhprbBuildListener.java:28)
at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
at hudson.model.Run.execute(Run.java:1769)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.net.SocketTimeoutException: Read timed out
at sun.reflect.GeneratedConstructorAccessor10056.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
at org.kohsuke.github.Requester.parse(Requester.java:602)
... 15 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
at org.kohsuke.github.Requester.parse(Requester.java:602)
... 13 more
Finished: SUCCESS
```
*Changes*
Improve the merge script to check jenkins status before treating the checks as failed.
Author: Sijie Guo <si...@apache.org>
Reviewers: Enrico Olivelli <eo...@gmail.com>
This closes #1497 from sijie/improve_merge_script
---
dev/bk-merge-pr.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dev/bk-merge-pr.py b/dev/bk-merge-pr.py
index a75ea4b..f2ad7a3 100755
--- a/dev/bk-merge-pr.py
+++ b/dev/bk-merge-pr.py
@@ -528,7 +528,7 @@ def check_individual_ci_status(ci_status, comments):
+ "Proceed at your own peril!\n\n"
else:
fail("The PR has not passed integration tests CI")
- elif len(ci_failures) == 0 or len(ci_integration_test_failures) == 0:
+ elif len(ci_failures) != 0 or len(ci_integration_test_failures) != 0:
fail_msg = "The PR has not passed CI:\n"
print ""
for status in ci_failures:
--
To stop receiving notification emails like this one, please contact
sijie@apache.org.