-
Improvement
-
Resolution: Unresolved
-
Critical
-
Jenkins ver. 2.121.3
GitHub Branch Source 2.4.0
GitHub Branch Source had already been working but now We can't indexing repo:
[Wed Dec 12 13:23:19 UTC 2018] Starting branch indexing... 13:23:19 Connecting to https://api.github.com using twcsysadmins/****** (twcsysadmins github api token)
ERROR: [Wed Dec 12 13:23:19 UTC 2018] Could not update folder level actions from source 12ca09af-4dfe-4959-8266-0b82428ee176 java.lang.ArrayIndexOutOfBoundsException: 1 at org.kohsuke.github.GitHub.getRepository(GitHub.java:474) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieveActions(GitHubSCMSource.java:1667) at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:765) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:590) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
[Wed Dec 12 13:23:19 UTC 2018] Finished branch indexing. Indexing took 0 ms FATAL: Failed to recompute children of wxu-armada-cluster-secret java.lang.ArrayIndexOutOfBoundsException: 1 at org.kohsuke.github.GitHub.getRepository(GitHub.java:474) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieveActions(GitHubSCMSource.java:1667) at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:765) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:590) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
GitHub Branch Source have any limits ?
Because we have quite big organization.
A customer encountered this issue yesterday. After examining the code (https://github.com/github-api/github-api/blob/github-api-1.95/src/main/java/org/kohsuke/github/GitHub.java#L475) it seems that we are trying to do some string parsing on a response from the GitHub API, and the response is not in the expected format, so the parsing fails ungracefully. In the case of my customer, it turned out that the credentials they were using did not have the appropriate access in GitHub to perform the required operation. They had to enable/authorize this credential/user for SSO in GitHub in order to resolve the issue.
Perhaps the plugin could be improved with some exception handling here.