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

Multibranch pipeline scan is triggered in case of remote pull request merge

    • 935.0.0

      There is such logic in the bitbucket-branch-source plugin:

       
      if (push.getChanges().isEmpty()) {
          LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on {0}/{1}",
          newObject[]{owner, repository});
          scmSourceReIndex(owner, repository);
      }
       
      And this works in case of remote pull request merges. (https://community.atlassian.com/t5/Questions/Pull-requests-Squashed-commits-Remote-Merges/qaq-p/171569)
       
      This leads to reindexing of a multibranch pipeline project which can take a lot of time.

       

      In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our Bitbucket multibranch pipeline only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotely this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
       

          [JENKINS-55927] Multibranch pipeline scan is triggered in case of remote pull request merge

          Alaiksei Savanchuk created issue -
          Alaiksei Savanchuk made changes -
          Summary Original: Jenkins scan is triggered in case of remote pull request merge New: Jenkins multibranch pipeline scan is triggered in case of remote pull request merge

          Not sure what your issue is, can you please provide a more detailed description  

          Joseph Petersen (old) added a comment - Not sure what your issue is, can you please provide a more detailed description  
          Alaiksei Savanchuk made changes -
          Description Original: There is such logic in the bitbucket-branch-source plugin:

           
          {{if (push.getChanges().isEmpty()) {}}
          {{    LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on \{0}/\{1}",}}
          {{    newObject[]\{owner, repository});}}
          {{    scmSourceReIndex(owner, repository);}}
          }
           
          And this works in case of remote pull request merges.
           
          This leads to reindexing of a multibranch pipeline project which can take a lot of time.
           
           
          New: There is such logic in the bitbucket-branch-source plugin:

           
           {{if (push.getChanges().isEmpty()) {}}
           {{    LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on \{0}/\{1}",}}
           {{    newObject[]\{owner, repository});}}
           {{    scmSourceReIndex(owner, repository);}}
           }
            
           And this works in case of remote pull request merges.
            
           This leads to reindexing of a multibranch pipeline project which can take a lot of time.

           

          In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our repository only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotly this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
            
          Alaiksei Savanchuk made changes -
          Description Original: There is such logic in the bitbucket-branch-source plugin:

           
           {{if (push.getChanges().isEmpty()) {}}
           {{    LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on \{0}/\{1}",}}
           {{    newObject[]\{owner, repository});}}
           {{    scmSourceReIndex(owner, repository);}}
           }
            
           And this works in case of remote pull request merges.
            
           This leads to reindexing of a multibranch pipeline project which can take a lot of time.

           

          In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our repository only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotly this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
            
          New: There is such logic in the bitbucket-branch-source plugin:

           
           {{if (push.getChanges().isEmpty()) {}}
           {{    LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on \{0}/\{1}",}}
           {{    newObject[]\{owner, repository});}}
           {{    scmSourceReIndex(owner, repository);}}
           }
            
           And this works in case of remote pull request merges.
            
           This leads to reindexing of a multibranch pipeline project which can take a lot of time.

           

          In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our Bitbucket multibranch pipeline only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotly this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
            
          Alaiksei Savanchuk made changes -
          Description Original: There is such logic in the bitbucket-branch-source plugin:

           
           {{if (push.getChanges().isEmpty()) {}}
           {{    LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on \{0}/\{1}",}}
           {{    newObject[]\{owner, repository});}}
           {{    scmSourceReIndex(owner, repository);}}
           }
            
           And this works in case of remote pull request merges.
            
           This leads to reindexing of a multibranch pipeline project which can take a lot of time.

           

          In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our Bitbucket multibranch pipeline only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotly this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
            
          New: There is such logic in the bitbucket-branch-source plugin:

           
           {{if (push.getChanges().isEmpty()) {}}
           {{    LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on \{0}/\{1}",}}
           {{    newObject[]\{owner, repository});}}
           {{    scmSourceReIndex(owner, repository);}}
           }
            
           And this works in case of *remote pull request merges.* (https://community.atlassian.com/t5/Questions/Pull-requests-Squashed-commits-Remote-Merges/qaq-p/171569)
            
           This leads to reindexing of a multibranch pipeline project which can take a lot of time.

           

          In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our Bitbucket multibranch pipeline only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotely this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
            

          casz, can you, please, take a look at the issue one more time. Should I provide some other additional details?

          Alaiksei Savanchuk added a comment - casz , can you, please, take a look at the issue one more time. Should I provide some other additional details?

          amuniz or stephenconnolly perhaps either of you can speak to the reason for reindexing?

          Doing a quick look at gitea and github plugins none of them forces the reindex  Should we perhaps remove it?

          Joseph Petersen (old) added a comment - amuniz or stephenconnolly perhaps either of you can speak to the reason for reindexing? Doing a quick look at gitea and github plugins none of them forces the reindex  Should we perhaps remove it?

          amuniz stephenconnolly  can you, please, take a look at casz's comment?

          Thank you.

          Alaiksei Savanchuk added a comment - amuniz stephenconnolly   can you, please, take a look at casz 's comment? Thank you.

          Allan BURDAJEWICZ added a comment - I have proposed https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/908 .

            allan_burdajewicz Allan BURDAJEWICZ
            asavanchuk Alaiksei Savanchuk
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: