Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57025

Unable to pull hooks in github organization folder type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • github-plugin
    • None

      The github plugin is correctly detecting PR branches, but failing to build new changes on those PRs.  The log shows:

      Apr 16, 2019 11:52:19 AM INFO org.jenkinsci.plugins.github.webhook.WebhookManager$1 runGitHub webhooks activated for job ATA/docker-bluesteel-postgres with [GitHubRepositoryName[host=<redacted>,username=ATA,repository=docker-bluesteel-postgres]] (events: [PULL_REQUEST, PUSH])
      Apr 16, 2019 11:52:19 AM WARNING org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafeFailed to add GitHub webhook for GitHubRepositoryName[host=<redacted>,username=ATA,repository=docker-bluesteel-postgres]
      java.io.FileNotFoundException: https://<redacted>/api/v3/repos/ATA/docker-bluesteel-postgres/hooks
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
      	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
      	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
      	at org.kohsuke.github.Requester.parse(Requester.java:625)
      	at org.kohsuke.github.Requester.parse(Requester.java:607)
      	at org.kohsuke.github.Requester._to(Requester.java:285)
      Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Server Error","documentation_url":"https://developer.github.com/enterprise/2.14/v3/repos/hooks/#list-hooks"}
      	at org.kohsuke.github.Requester.handleApiError(Requester.java:699)
      	at org.kohsuke.github.Requester._to(Requester.java:306)
      	at org.kohsuke.github.Requester.to(Requester.java:247)
      	at org.kohsuke.github.GHHooks$Context.getHooks(GHHooks.java:24)
      	at org.kohsuke.github.GHRepository.getHooks(GHRepository.java:771)
      	at org.jenkinsci.plugins.github.webhook.WebhookManager$8.applyNullSafe(WebhookManager.java:301)
      Caused: org.kohsuke.github.GHException: Failed to fetch post-commit hooks
      	at org.jenkinsci.plugins.github.webhook.WebhookManager$8.applyNullSafe(WebhookManager.java:303)
      	at org.jenkinsci.plugins.github.webhook.WebhookManager$8.applyNullSafe(WebhookManager.java:297)
      	at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)
      	at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:186)
      	at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:175)
      	at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)
      	at com.google.common.collect.Iterators$8.next(Iterators.java:812)
      	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:648)
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
      	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
      	at com.google.common.collect.Lists.newArrayList(Lists.java:138)
      	at com.google.common.collect.Lists.newArrayList(Lists.java:119)
      	at org.jenkinsci.plugins.github.util.FluentIterableWrapper.toList(FluentIterableWrapper.java:147)
      	at org.jenkinsci.plugins.github.webhook.WebhookManager$1.run(WebhookManager.java:127)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      	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)
      
      

      In the traceback, it would appear that the "ATA" organization is incorrectly being used as the "User" parm, causing an inability to pull the hooks.  Since I have no means of providing an "ATA" user to work around the problem, the team is stuck.  PR's are not being built when they should be.

       

       

       

            lanwen Kirill Merkushev
            alt_jmellor John Mellor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: