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.

          [JENKINS-45958] Excessive branch indexing

          James Dumay added a comment -

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

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

          Andrew Bayer added a comment -

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

          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)

          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 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 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.

          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.

          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.

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

              Created:
              Updated: