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

Indexing After Restart Triggers Many Builds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None

      We have our builds configured using the Bitbucket Branch Source plugin to index once per day. This configuration typically works fine, until we do a restart of the controller. When the controller is restarted, when jobs have indexing run, it will detect changes for every branch, even when there have been no changes since the last build ran. The result is that we typically see essentially every branch for every job we have configured getting unnecessarily built after the restart, which backs up the job queue for quite some time. 

      I have a sample indexing log from a job that ran after a restart that triggered builds:

      Started by timer
      [Sat Aug 16 05:41:06 GMT 2025] Starting branch indexing...
      Connecting to https://*** using BUILDS-BOT/****** (Bitbucket Read-Only Credentials)
      Looking up CSIF/siul for branches
      Checking branch develop from CSIF/siul
            '.jenkins/Jenkinsfile' found
          Met criteria
      Takeover for Claims » CSIF » siul » develop by source #1 from source that no longer exists
      Branch reopened: develop (7eb989a88fe98726eb4a21b9349c5592da590805)
      Scheduled build for branch: develop
      Checking branch release/2025.07.25.D from CSIF/siul
            '.jenkins/Jenkinsfile' found
          Met criteria
      Takeover for Claims » CSIF » siul » release/2025.07.25.D by source #1 from source that no longer exists
      Branch reopened: release/2025.07.25.D (596b1c7244b3c686b9ef652fea2c27cc28f3b66c)
      Scheduled build for branch: release/2025.07.25.D
      Checking branch master from CSIF/siul
            '.jenkins/Jenkinsfile' found
          Met criteria
      Takeover for Claims » CSIF » siul » master by source #1 from source that no longer exists
      Branch reopened: master (e56d80d9fa9c4160ee648b38334c7528ddf42d28)
      Scheduled build for branch: master
      Checking branch release/2025.07.20.M from CSIF/siul
            '.jenkins/Jenkinsfile' found
          Met criteria
      Takeover for Claims » CSIF » siul » release/2025.07.20.M by source #1 from source that no longer exists
      Branch reopened: release/2025.07.20.M (545c573fc62b3bb6b9d32c9452ee7e56f3eede5d)
      Scheduled build for branch: release/2025.07.20.M  4 branches were processed
      Looking up CSIF/siul for pull requests  0 pull requests were processed
      [Sat Aug 16 05:41:08 GMT 2025] Finished branch indexing. Indexing took 1.7 sec
      Finished: SUCCESS

            nfalco Nikolas Falco
            butter1484 Brady Shober
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: