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

REGRESSION: Github branch source does not consistently set up webhook

    • Pipeline - December

      Summary: 

      Creating a pipeline via Github, either org folder or a single MBP, does not correctly setup webhooks. 

      To reproduce: 

      • Create a github token with correct scope allowing for admin of webhooks
      • Create a MBP with the github project type, using this credential
      • Note that there is no webhook created on the github project. 
      • You will see a message in the log like: 
        INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])

       

      This also happens if you set it up via github org folders. rtyler swears on his grave that it used to work (he used it on jenkins.io) so this is possibly a bad regression. 

       

      ---------

       

      See the attached screenshot, I haven't yet been able to figure out why sometimes, but mostly not, a webhook is created at an Org level.

      *Most* of the time this doesn't work, but sometimes it does. MUCH CONFUSION.

      Failed logs:

      Aug 23, 2017 5:45:23 AM org.jenkinsci.plugins.github.webhook.WebhookManager$1 run              
      INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])   
      

      Successful logs:

      INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])                          
      Aug 23, 2017 5:41:04 AM org.jenkinsci.plugins.github_branch_source.GitHubOrgWebHook register              
      INFO: A webhook was registered for the organization https://github.com/CodeValet                                                                                                                  
      Aug 23, 2017 5:41:05 AM org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber onEvent                                                                                             
      INFO: PING webhook received from org <https://api.github.com/orgs/CodeValet>!   
      

      Related-ish to JENKINS-46365

          [JENKINS-46366] REGRESSION: Github branch source does not consistently set up webhook

          R. Tyler Croy created issue -
          Michael Neale made changes -
          Summary Original: GitHub Org Folder does not consistently set up an org-level webhook New: Github branch source does not consistently set up webhook
          Michael Neale made changes -
          Description Original: See the attached screenshot, I haven't yet been able to figure out why sometimes, but mostly not, a webhook is created at an Org level.

          **Most** of the time this doesn't work, but sometimes it does. MUCH CONFUSION.

          Failed logs:
          {code}
          Aug 23, 2017 5:45:23 AM org.jenkinsci.plugins.github.webhook.WebhookManager$1 run
          INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])
          {code}

          Successful logs:
          {code}
          INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])
          Aug 23, 2017 5:41:04 AM org.jenkinsci.plugins.github_branch_source.GitHubOrgWebHook register
          INFO: A webhook was registered for the organization https://github.com/CodeValet
          Aug 23, 2017 5:41:05 AM org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber onEvent
          INFO: PING webhook received from org <https://api.github.com/orgs/CodeValet&gt;!
          {code}

          Related-ish to JENKINS-46365

          !https://github.com/rtyler/codevalet/raw/master/assets/monkey-128.png!
          New: Summary: 

          Creating a pipeline via Github, either org folder or a single MBP, does not correctly setup webhooks. 

          To reproduce: 
           * Create a github token with correct scope allowing for admin of webhooks
           * Create a MBP with the github project type, using this credential
           * Note that there is no webhook created on the github project. 
           * You will see a message in the log like: 
          {code:java}
          INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY]){code}

           

          This also happens if you set it up via github org folders. [~rtyler] swears on his grave that it used to work (he used it on jenkins.io) so this is possibly a bad regression. 

           

          ---------

           

          See the attached screenshot, I haven't yet been able to figure out why sometimes, but mostly not, a webhook is created at an Org level.

          **Most** of the time this doesn't work, but sometimes it does. MUCH CONFUSION.

          Failed logs:
          {code:java}
          Aug 23, 2017 5:45:23 AM org.jenkinsci.plugins.github.webhook.WebhookManager$1 run
          INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])
          {code}
          Successful logs:
          {code:java}
          INFO: GitHub webhooks activated for job CodeValet with [] (events: [REPOSITORY])
          Aug 23, 2017 5:41:04 AM org.jenkinsci.plugins.github_branch_source.GitHubOrgWebHook register
          INFO: A webhook was registered for the organization https://github.com/CodeValet
          Aug 23, 2017 5:41:05 AM org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber onEvent
          INFO: PING webhook received from org <https://api.github.com/orgs/CodeValet&gt;!
          {code}
          Related-ish to JENKINS-46365

          !https://github.com/rtyler/codevalet/raw/master/assets/monkey-128.png!
          Michael Neale made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Michael Neale made changes -
          Summary Original: Github branch source does not consistently set up webhook New: REGRESSION: Github branch source does not consistently set up webhook
          Michael Neale made changes -
          Link New: This issue blocks JENKINS-46365 [ JENKINS-46365 ]

          R. Tyler Croy added a comment -

          michaelneale "swears it used to work", bah! In my screenshot I'm showing that it does actually work once in a blue moon, but for the life of me I cannot figure out what series of events led to that working

          R. Tyler Croy added a comment - michaelneale "swears it used to work", bah! In my screenshot I'm showing that it does actually work once in a blue moon, but for the life of me I cannot figure out what series of events led to that working
          Stephen Connolly made changes -
          Link New: This issue duplicates JENKINS-33228 [ JENKINS-33228 ]
          Stephen Connolly made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          I am willing to bet that this is a side-effect of the split "responsibility" for registering hooks resulting from the duplication of config between the github plugin and the github branch source plugin

          Stephen Connolly added a comment - I am willing to bet that this is a side-effect of the split "responsibility" for registering hooks resulting from the duplication of config between the github plugin and the github branch source plugin

            rsandell rsandell
            rtyler R. Tyler Croy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: