Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update commit status error 422 #475

Open
Chrislevi opened this issue Oct 26, 2017 · 0 comments
Open

update commit status error 422 #475

Chrislevi opened this issue Oct 26, 2017 · 0 comments

Comments

@Chrislevi
Copy link

Chrislevi commented Oct 26, 2017

Until few days ago, the plugin managed to update commit status just fine
there were no changes made to Jenkins before the error rose up. the Error indicates that the target_url is invalid, it didnt change and the URL seems like a valid one. Any leads on this issue or similar behavior?

Setting status of XXXX to SUCCESS with url nulljob/GitHub-XXX/7/ and message: 'SUCCESS
 '
Could not update commit status of the Pull Request on GitHub.
org.kohsuke.github.HttpException: {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","field":"target_url","message":"target_url must use http(s) scheme"}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"}
	at org.kohsuke.github.Requester.handleApiError(Requester.java:664)
	at org.kohsuke.github.Requester._to(Requester.java:285)
	at org.kohsuke.github.Requester.to(Requester.java:226)
	at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:1000)
	at org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus.createCommitStatus(GhprbSimpleStatus.java:272)
	at org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus.onBuildComplete(GhprbSimpleStatus.java:231)
	at org.jenkinsci.plugins.ghprb.GhprbBuilds.onCompleted(GhprbBuilds.java:192)
	at org.jenkinsci.plugins.ghprb.GhprbBuildListener.onCompleted(GhprbBuildListener.java:26)
	at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:664)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1400(WorkflowRun.java:135)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:967)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1212)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:407)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	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:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.kohsuke.github.HttpException: Server returned HTTP response code: 422, message: 'Unprocessable Entity' for URL: https://api.github.com/repos/XXX/XXX/statuses/COMMITHASH
	at org.kohsuke.github.Requester.parse(Requester.java:622)
	at org.kohsuke.github.Requester.parse(Requester.java:584)
	at org.kohsuke.github.Requester._to(Requester.java:264)
	... 20 more
Caused by: java.io.IOException: Server returned HTTP response code: 422 for URL: https://api.github.com/repos/XXX/XXX/statuses/COMMITHASH
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	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:1926)
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at org.kohsuke.github.Requester.parse(Requester.java:602)
	... 22 more
Caused by: java.io.IOException: Server returned HTTP response code: 422 for URL: https://api.github.com/repos/XXX/XXX/statuses/COMMITHASH
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
	at org.kohsuke.github.Requester.parse(Requester.java:592)
	... 22 more
Finished: SUCCESS

Jenkins 2.75
ghprb 1.39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant