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

First pull request pipeline in a organization folder project not being created by webhook

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Many Github pull requests created during the day are delivered to our Jenkins instance through an organizational webhook, buy they sometimes do not create a corresponding pipeline in the organization folder.

      This is an example of pull request:
      https://github.com/elifesciences/annotations/pull/20

      This is what I found in the logs immediately after:

      elife@prod--alfred:/var/lib/jenkins/logs$ grep -r annotations jenkins.branch.OrganizationFolder.log
      [Fri Nov 24 11:40:34 GMT 2017] Received Push event to branch fail_fast_on_generic_bad_response_on_post_users in repository elifesciences/annotations CREATED event from 192.30.252.34 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:29 GMT 2017
      [Fri Nov 24 11:40:34 GMT 2017] Finished processing Push event to branch fail_fast_on_generic_bad_response_on_post_users in repository elifesciences/annotations CREATED event from 192.30.252.34 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:29 GMT 2017. Matched 1.
      [Fri Nov 24 11:40:54 GMT 2017] Received Pull request #20 opened in repository elifesciences/annotations CREATED event from 192.30.252.42 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:49 GMT 2017
      [Fri Nov 24 11:40:54 GMT 2017] Finished processing Pull request #20 opened in repository elifesciences/annotations CREATED event from 192.30.252.42 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:49 GMT 2017. Matched 1.
      

      (the organization folder has matched the hook to the annotations project)

      elife@prod--alfred:/var/lib/jenkins/logs$ grep -r annotations jenkins.branch.MultiBranchProject.log
      [Fri Nov 24 11:40:34 GMT 2017] Received Push event to branch fail_fast_on_generic_bad_response_on_post_users in repository elifesciences/annotations CREATED event from 192.30.252.34 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:29 GMT 2017
      [Fri Nov 24 11:40:34 GMT 2017] Finished processing Push event to branch fail_fast_on_generic_bad_response_on_post_users in repository elifesciences/annotations CREATED event from 192.30.252.34 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:29 GMT 2017. Matched 0.
      [Fri Nov 24 11:40:54 GMT 2017] Received Pull request #20 opened in repository elifesciences/annotations CREATED event from 192.30.252.42 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:49 GMT 2017
      [Fri Nov 24 11:40:54 GMT 2017] Finished processing Pull request #20 opened in repository elifesciences/annotations CREATED event from 192.30.252.42 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Fri Nov 24 11:40:49 GMT 2017. Matched 0.
      

      (the hook has been ignored, I guess from the Matched 0?

      
      

      The project page itself looks like this:
      https://screenshots.firefox.com/FDd9RpeqbrHU967L/alfred.elifesciences.org
      It shows other pull requests that have now been closed and correctly "deleted" (they stay around for 2 days as configured before being garbage-collected). I have seen it in other states before when this problem happens, for example with 1 other existing pipeline.

      The workaround is to wait for the scanning to take place, but we have lots of repositories so we can't do that very often (a couple of hours) not to get rate limited by the Github API.

        Attachments

          Activity

          Hide
          stephenconnolly Stephen Connolly added a comment -

          to confirm, the events log for the organization folder should include the line Project %s already has a corresponding sub-project which is because it believes the disabled multibranch will process the event, but that cannot as it is not buildable

          Show
          stephenconnolly Stephen Connolly added a comment - to confirm, the events log for the organization folder should include the line Project %s already has a corresponding sub-project which is because it believes the disabled multibranch will process the event, but that cannot as it is not buildable
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/jenkins/branch/OrganizationFolder.java
          http://jenkins-ci.org/commit/branch-api-plugin/ac22398973d86085bf6cf55059bd2a6e57502f53
          Log:
          [FIXED JENKINS-48214] Organization folders should handle events for children that are non-buildable

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/branch/OrganizationFolder.java http://jenkins-ci.org/commit/branch-api-plugin/ac22398973d86085bf6cf55059bd2a6e57502f53 Log: [FIXED JENKINS-48214] Organization folders should handle events for children that are non-buildable
          Hide
          giorgiosironi Giorgio Sironi added a comment -

          Thank you for the fix. Will now install the newly released 2.0.16 and experiment.

          Show
          giorgiosironi Giorgio Sironi added a comment - Thank you for the fix. Will now install the newly released 2.0.16 and experiment.
          Hide
          giorgiosironi Giorgio Sironi added a comment -

          Organization folder logs:

          [Tue Dec 05 09:37:21 GMT 2017] Received Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017
          Found match against pull-requests-projects
          Project pull-requests-projects does not have a corresponding sub-project
          [Tue Dec 05 09:37:22 GMT 2017] Finished processing Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017. Matched 1.
          [Tue Dec 05 09:37:35 GMT 2017] Received Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017
          Found match against pull-requests-projects
          Project pull-requests-projects does not have a corresponding sub-project
          [Tue Dec 05 09:37:36 GMT 2017] Finished processing Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017. Matched 1.
          

          Multibranch project logs:

          [Tue Dec 05 09:37:21 GMT 2017] Received Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017
          [Tue Dec 05 09:37:21 GMT 2017] Finished processing Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017. Matched 0.
          [Tue Dec 05 09:37:35 GMT 2017] Received Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017
          [Tue Dec 05 09:37:35 GMT 2017] Finished processing Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http://alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017. Matched 0.
          

          The pull request has triggered a new scanning:

          Pull request #18 opened in repository crm-formula
          [Tue Dec 05 09:37:36 GMT 2017] Starting branch indexing...
          09:37:36 Connecting to https://api.github.com using elife-alfred-user/****** (Access to Github as elife-alfred-user. Used e.g. for listing branches in Organization folder)
          09:37:36 Connecting to https://api.github.com using elife-alfred-user/****** (Access to Github as elife-alfred-user. Used e.g. for listing branches in Organization folder)
          Examining elifesciences/crm-formula
          
            Checking pull-requests...
          
            Getting remote pull requests...
          
              Checking pull request #18
                ‘Jenkinsfile’ found
              Met criteria
          Scheduled build for branch: PR-18
          
              Checking pull request #18
                ‘Jenkinsfile’ found
              Met criteria
          No changes detected: PR-18 (still at 1f505e42700f8c1b93b1163621e15b473a9d98e4)
          
            2 pull requests were processed
          
          Finished examining elifesciences/crm-formula
          
          [Tue Dec 05 09:37:37 GMT 2017] Finished branch indexing. Indexing took 0.77 sec
          Evaluating orphaned items in Pull Requests (projects) » crm-formula
          Will not remove PR-17 because it is new
          Finished: SUCCESS
          

          PR-17 was the one merged yesterday, which has been retained still as orphan and the made the project "stricken-through" in the list. PR-18 has been notices, scanned and built succesfully. Close as solved?

          Show
          giorgiosironi Giorgio Sironi added a comment - Organization folder logs: [Tue Dec 05 09:37:21 GMT 2017] Received Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017 Found match against pull-requests-projects Project pull-requests-projects does not have a corresponding sub-project [Tue Dec 05 09:37:22 GMT 2017] Finished processing Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017. Matched 1. [Tue Dec 05 09:37:35 GMT 2017] Received Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017 Found match against pull-requests-projects Project pull-requests-projects does not have a corresponding sub-project [Tue Dec 05 09:37:36 GMT 2017] Finished processing Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017. Matched 1. Multibranch project logs: [Tue Dec 05 09:37:21 GMT 2017] Received Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017 [Tue Dec 05 09:37:21 GMT 2017] Finished processing Push event to branch test_new_pull_requests in repository elifesciences/crm-formula CREATED event from 192.30.252.45 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:16 GMT 2017. Matched 0. [Tue Dec 05 09:37:35 GMT 2017] Received Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017 [Tue Dec 05 09:37:35 GMT 2017] Finished processing Pull request #18 opened in repository elifesciences/crm-formula CREATED event from 192.30.252.41 ⇒ http: //alfred.elifesciences.org:8080/github-webhook/ with timestamp Tue Dec 05 09:37:30 GMT 2017. Matched 0. The pull request has triggered a new scanning: Pull request #18 opened in repository crm-formula [Tue Dec 05 09:37:36 GMT 2017] Starting branch indexing... 09:37:36 Connecting to https: //api.github.com using elife-alfred-user/****** (Access to Github as elife-alfred-user. Used e.g. for listing branches in Organization folder) 09:37:36 Connecting to https: //api.github.com using elife-alfred-user/****** (Access to Github as elife-alfred-user. Used e.g. for listing branches in Organization folder) Examining elifesciences/crm-formula Checking pull-requests... Getting remote pull requests... Checking pull request #18 ‘Jenkinsfile’ found Met criteria Scheduled build for branch: PR-18 Checking pull request #18 ‘Jenkinsfile’ found Met criteria No changes detected: PR-18 (still at 1f505e42700f8c1b93b1163621e15b473a9d98e4) 2 pull requests were processed Finished examining elifesciences/crm-formula [Tue Dec 05 09:37:37 GMT 2017] Finished branch indexing. Indexing took 0.77 sec Evaluating orphaned items in Pull Requests (projects) » crm-formula Will not remove PR-17 because it is new Finished: SUCCESS PR-17 was the one merged yesterday, which has been retained still as orphan and the made the project "stricken-through" in the list. PR-18 has been notices, scanned and built succesfully. Close as solved?
          Hide
          stephenconnolly Stephen Connolly added a comment -

          2.0.16

          Show
          stephenconnolly Stephen Connolly added a comment - 2.0.16

            People

            • Assignee:
              stephenconnolly Stephen Connolly
              Reporter:
              giorgiosironi Giorgio Sironi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: