-
Notifications
You must be signed in to change notification settings - Fork 612
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
Retest PR cause Github API call failed with 404 #441
Comments
Richard
* What version of the plugin are you using?
* Did you check your Github access for the user/token you are using for the
plugin? (Check the global configuration and the job)
* How about the connectivity between your Jenkins instance and Github?
In a vacuum this looks like either a permissions issue or a network issue.
|
Thanks @richard1122 |
It's a private repo inside an organization. And I'm the owner of that organization. |
Hi, I am also suffering from this issue. In my opinion, this is more complex issue because it related to But, github's hook returns api url
|
+1 having same issue |
@richard1122 if you have a cycle, could you see if this was a problem in 1.33.1? We upgraded the github-api dependency with the last release. However, grepping the commit history on the api library, nothing is sticking out to me. So, I/m trying to determine the depth of this problem. Also, is it true that everyone on this list is using GH Enterprise? If someone is using GH public, please let me know? (I will verify on GH public when I have time, but I'm not seeing that happen for a few days at least, so thought I'd ask.) |
@benpatterson I am using github public on a private repo and I have this very issue. Tell me if I can do anything, I am very motivated on this one :-) |
@benpatterson |
Great news, Sang. We added label capability with this release so your
conclusion is certainly plausible.
I'll hold tight on a deeper dive, then.
|
I have no label on my side. Currently:
|
@nMustaki |
@sjstyle yes it's blank, not even a space, on both jenkins/configuration and myproject/configuration |
@nMustaki |
Issue comment is checked, I have the same issue as you (sadly) Pull request #807 was updated/initialized on ORG/REPO at 12/1/16 1:21 PM by Nathan Mustaki (comment)
Dec 01, 2016 1:21:31 PM SEVERE hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
A thread (Thread-72/1006) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
java.lang.Error: java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:433)
at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:400)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:365)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:214)
at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:346)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.handleComment(GhprbTrigger.java:618)
at org.jenkinsci.plugins.ghprb.GhprbRootAction$1.run(GhprbRootAction.java:233)
Caused by: java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:592)
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:429)
... 8 more
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/ORG/REPO/issues/807/commits
at sun.reflect.GeneratedConstructorAccessor153.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: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:524)
at org.kohsuke.github.Requester.access$200(Requester.java:68)
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:424)
... 8 more
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/ORG/REPO/issues/807/commits
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
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:514)
... 10 more |
Got the same behavior as @nMustaki, no labels anywhere but ended up with the same stack trace. A downgrade to 1.33.1 fixed it for me. |
Downgrade to 1.33.1 works fine for me too. |
Just chiming in to say I'm experiencing the same issue. In my case:
|
I will look at this once I'm free, though it might take a couple of days. We'll see if @sjstyle beats me to it, in that case. |
@richard1122 , et al. I believe #443 addresses this. Thanks for doing the initial analysis; I was able to reproduce the problem, and rolled back github-api versions. The problem appears to be introduced in 1.76 so this rolls us back to 1.75. I haven't isolated the precise change, but again this should solve the problem. Looks like I did have some cycles to look tonight. #UnderPromiseOverDeliver Pls let me know if you have any feedback & cheers. |
Ah and I should point out you may need to manually install the older github-api plugin when pulling in the fix. |
@benpatterson |
I see @sjstyle 's PR and will continue reviewing that. In the meantime, I've released 1.33.3 with the downgraded github-api dependency. I was able to resolve the error described in this ticket with the downgraded github-api plugin, and via reproducing the problem, narrowed down the failures to be in the 1.76 (and beyond) release of that dependency. That said, I wasn't able to narrow down to the exact offending commit on that other plugin, so I release ghprb 1.33.3 with only partial confidence that the problem is resolved. So, I'll look at the other PR that @sjstyle has referenced, when I have time in the coming days. Please take the following steps if you're still seeing this error:
I'll leave this ticket open for now; ping back if the new release has had effect. Cheers. |
So I've: Yet I am still getting:
Any workarounds? |
I'm assuming you also restarted Jenkins?
No other options at the moment. I've not had a chance to debug in depth.
I'm hoping to have time for that this week.
|
Yeah I have restarted jenkins and resaved all the jobs. |
OK. Thanks for pinging back.
|
@AudriusButkevicius
Go to jenkins plugin manager, 'Advanced' option and upload You can roll back to previous version by jenkin's plugin manager. |
That has a lot of things I'd rather not pull in, if there is a branch with just the fix, let me know. |
I've narrowed down the problem to In terms of implementation, as a way of obtaining labels through the Jenkins github-api plugin, the pr object is being rewritten with the fetchIssue call. The result is |
@benpatterson This checks whether So, after |
Thanks for pointing that out, Sang. I want to keep changes discrete in
order to reduce any noise and get a working plugin out.
I'm still planning on reverting the previous PR. That way, when looking at
your changes, we won't be under pressure and can focus on the
implementation details. Don't worry, your PR will come soon.
|
@richard1122 version 1.33.4 should solve this problem. Pls ping back in either case. Again I noticed that some data is cached (I found that the issues URL was among the items cached, and it wouldn't be cleared until a new commit arrived.) So if you still see the problem, I'd ask questions about the state of your instance, etc. But I'm optimistic this will solve the problem. |
Looks like |
In my case the issue is fixed. |
@AudriusButkevicius where is your test phrase set? In the main Jenkins settings or in the particular job's settings or both? |
I think its default whatever the plugin ships. I don't think it matters. |
Downgrading to 1.33.1 gets it working again for us. |
Hi ilovezfs... Do you have a stacktrace?
|
@benpatterson I'm not sure it's crashing as opposed to just deciding the comment doesn't warrant triggering the build after considering it. |
Ok thanks @ilovezfs . This sounds like a distinct issue from the one associated with this ticket. Could you open a new issue and share your configuration there? I'm particularly curious about the various phrases you've set globally and within the job configuration. Based on @AudriusButkevicius's response, I'm going to close this ticket. Everyone's feedback along the way was extremely helpful as I dove into the issue. |
Thanks for the prompt fix. |
@benpatterson voilà #450 |
After comments on a Github PR "retest this please". Jenkins could not rebuild, and the following exception is logged in Jenkins log page.
It might be
https://api.github.com/repos/<UserName>/<RepoName>/pulls/4/commits
.The text was updated successfully, but these errors were encountered: