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

Branch indexing occurring for every multibranch job execution

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When a job runs in the console log for that job 'p4 changes -m1' is run for every branch that matches the multibranch project source. For example the following job is running for '//streams/main':

       

      p4 client -i 
      Client  jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b saved.(p4):stop:8
      (p4):cmd:
      ...   View:
            //depot/multibranch/dev1/Jenkinsfile //jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b/Jenkinsfile
      
      p4 client -i 
      Client jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b saved.(p4):stop:17
      (p4):cmd:
      ...   View:
            //depot/multibranch/dev2/Jenkinsfile //jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b/Jenkinsfile
      
      p4 client -i 
      Client jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b saved.(p4):stop:26
      (p4):cmd:
      ...   View:
            //depot/multibranch/main/Jenkinsfile //jenkinsTemp-c31cbc7b-5563-4c2e-96e4-60fc95703f4b/Jenkinsfile

      Note that clients are created for 'dev1', 'dev2' and 'main' even though we only need to probe for changes to 'main' in this job execution. (Full console log attached)

       

      I would expect this in the Multibranch Scan Log but not every job execution.

       

      Reproduction steps:

      (1) Create following folders in Perforce and submit a Jenkinsfile to each:

      //depot/multibranch/dev1/...

      //depot/multibranch/dev2/...

      //depot/multibranch/main/...

      (2) Create a multibranch project with Helix Branches as the source and 'include branches' set to:

      //depot/multibranch/...

      and Scan Multibranch triggers set to '5 minutes'.

      (3) Manually build each job.

      (4) Submit a new file to '//depot/multibranch/main/...'.

      (5) Manually build the job. See that all branches are scanned in the console log for the main build job.

      (6) Submit another new file to '//depot/multibranch/main/...'.

      (7) Wait 5 minutes. See that all branches are scanned in the console.log and the Multibranch scan log.

       

       

       

        Attachments

          Activity

          Hide
          vlasta Vlasta Platonov added a comment -

          It will be helpful to avoid the Jenkins p4 plugin prebuilt scanning of every branch because the job is already running on a known path.

          In our case, the plug-in scans up to 400 paths (not related to our Jenkins job) and it takes up to 17 minutes on our larger paths. This extra scanning is time-consuming and generates thousands of unnecessary output lines.

          Show
          vlasta Vlasta Platonov added a comment - It will be helpful to avoid the Jenkins p4 plugin prebuilt scanning of every branch because the job is already running on a known path. In our case, the plug-in scans up to 400 paths (not related to our Jenkins job) and it takes up to 17 minutes on our larger paths. This extra scanning is time-consuming and generates thousands of unnecessary output lines.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            p4karl Karl Wirth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: