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

Diagnostics for GHFileNotFoundException from retrieve #351

Merged
merged 2 commits into from
Dec 2, 2020

Conversation

jglick
Copy link
Member

@jglick jglick commented Oct 15, 2020

jenkinsci/github-label-filter-plugin#4 got as far as printing

Reason: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/…/…/issues/… {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/reference/issues#get-an-issue"}

CC @jvz

@jglick
Copy link
Member Author

jglick commented Oct 15, 2020

Indeed improves diagnosis:

  Error while processing pull request …
java.io.FileNotFoundException: https://api.github.com/repos/…/…/issues/…
	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getInputStream(ObsoleteUrlFactory.java:488)
	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getInputStream(ObsoleteUrlFactory.java:1201)
	at org.kohsuke.github.GitHubHttpUrlConnectionClient$HttpURLConnectionResponseInfo.bodyStream(GitHubHttpUrlConnectionClient.java:197)
	at org.kohsuke.github.GitHubResponse$ResponseInfo.getBodyAsString(GitHubResponse.java:326)
	at org.kohsuke.github.GitHubResponse.parseBody(GitHubResponse.java:120)
	at org.kohsuke.github.Requester.lambda$fetchInto$2(Requester.java:89)
	at org.kohsuke.github.GitHubClient.createResponse(GitHubClient.java:461)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:412)
Caused: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/…/…/issues/… {"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/reference/issues#get-an-issue"}
	at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:492)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:420)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:363)
	at org.kohsuke.github.Requester.fetchInto(Requester.java:89)
	at org.kohsuke.github.GHPullRequest.fetchIssue(GHPullRequest.java:631)
	at org.kohsuke.github.GHPullRequest.getLabels(GHPullRequest.java:182)
	at org.jenkinsci.plugins.github.label.filter.BaseGithubExtendedFilterTrait.getPullRequestLabels(BaseGithubExtendedFilterTrait.java:117)
	at org.jenkinsci.plugins.github.label.filter.PullRequestLabelsMatchAllFilterTrait$1.isExcluded(PullRequestLabelsMatchAllFilterTrait.java:60)
	at jenkins.scm.api.trait.SCMSourceRequest.isExcluded(SCMSourceRequest.java:196)
	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:333)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrievePullRequest(GitHubSCMSource.java:1179)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1038)
	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327)
	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:261)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1468)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1483)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:1024)
	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:542)
	at …

@jglick jglick requested a review from bitwiseman November 30, 2020 19:50
@bitwiseman bitwiseman merged commit d202761 into jenkinsci:master Dec 2, 2020
@jglick jglick deleted the diag branch December 2, 2020 19:10
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

Successfully merging this pull request may close these issues.

3 participants