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

Excessive branch indexing

    XMLWordPrintable

Details

    Description

      I'm using Blue Ocean and the declarative pipeline to describe a job. In the triggers section, I'm only using cron trigger. Nevertheless, Jenkins periodically reruns the job with the message "Branch indexing." The job takes a long time to complete and cleans resources at the beginning, making it very difficult to work with. If there is no pollSCM trigger set, then I don't believe this branch indexing should be occurring.

      Attachments

        Activity

          jamesdumay James Dumay added a comment -

          abayer I am not sure what might be causing this behaviour. Any ideas?

          jamesdumay James Dumay added a comment - abayer I am not sure what might be causing this behaviour. Any ideas?
          abayer Andrew Bayer added a comment -

          That'd be standard multibranch indexing, I'd assume.

          abayer Andrew Bayer added a comment - That'd be standard multibranch indexing, I'd assume.

          So BlueOcean has some code vivek or kzantow added that triggers an index under certain circumstances when a pipeline is saved in BlueOcean... that may be the root cause if indexing is more often than expected by the periodic trigger.

          Alternatively, if there is something sending events to an event hook notifier and those events are missing critical information then the Branch API may have to fall back to triggering a full index... in those cases you should see the event source information in the causes for the branch indexing.

          First place to dig is the causes of the indexing / scan (first line of the the Organization Scan Log / Repository Index Log screen)... if that is saying "Started by timer" then cron is doing the starting... if it says "Started by user ___" then you know it is a user manually triggering... if it is an event (which is how Blue Ocean triggers) then you should see the details of the event source (additional source info should be available as a tooltip on the text after "Started by ..." in the case of events)

          stephenconnolly Stephen Connolly added a comment - So BlueOcean has some code vivek or kzantow added that triggers an index under certain circumstances when a pipeline is saved in BlueOcean... that may be the root cause if indexing is more often than expected by the periodic trigger. Alternatively, if there is something sending events to an event hook notifier and those events are missing critical information then the Branch API may have to fall back to triggering a full index... in those cases you should see the event source information in the causes for the branch indexing. First place to dig is the causes of the indexing / scan (first line of the the Organization Scan Log / Repository Index Log screen)... if that is saying "Started by timer" then cron is doing the starting... if it says "Started by user ___" then you know it is a user manually triggering... if it is an event (which is how Blue Ocean triggers) then you should see the details of the event source (additional source info should be available as a tooltip on the text after "Started by ..." in the case of events)
          annetheagile AnneTheAgile added a comment -

          A problem with this method of verifying logs is there is no history of either my main jenkins log nor of this scanning log, right stephenconnolly ? Also having only a tooltip for part of the message makes it quite opaque.

          I have the problem of extra triggers, but the current scan log is started by timer and it correctly notes my branch was unchanged.

          Today previously twice it reran my job needlessly. (The commit is as of a few days ago.)

          With another problem I just had, I wonder if it might be related to this branch having a period in its name.

          annetheagile AnneTheAgile added a comment - A problem with this method of verifying logs is there is no history of either my main jenkins log nor of this scanning log, right stephenconnolly ? Also having only a tooltip for part of the message makes it quite opaque. I have the problem of extra triggers, but the current scan log is started by timer and it correctly notes my branch was unchanged. Today previously twice it reran my job needlessly. (The commit is as of a few days ago.) With another problem I just had, I wonder if it might be related to this branch having a period in its name.
          erutan409 Michael Keyser added a comment - - edited

          I'm also seeing this issue.  I just installed this as a clean setup on Ubuntu 16.  My pipelines are using Git on Gitlab, with git URL's and SSH key pair configuration with an admin account in Gitlab.  Not sure what I'd even be looking for in said logs.

          erutan409 Michael Keyser added a comment - - edited I'm also seeing this issue.  I just installed this as a clean setup on Ubuntu 16.  My pipelines are using Git on Gitlab, with git URL's and SSH key pair configuration with an admin account in Gitlab.  Not sure what I'd even be looking for in said logs.

          People

            Unassigned Unassigned
            edahlseng Eric Dahlseng
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: