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

Scan multibranch pipeline fail when a open PR refers to a deleted branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Bitbucket Branch Source Plugin 2.2.5
      Jenkins 2.73.2

      Sometimes happens that developer delete the feature branch without decline the associated PRs.
      The Scan Multibranch Pipeline action goes in FileNotFoundException exception and this error broke the analysis that means:

      • merged PR do not deleted job
      • new PR are not processed into new job (this depends on the order of the PR analyzed, if the exception is on the first it stop immediatly)

      There is no way to be advised that something is broken unless have a look to the "Scan Multibranch Pipeline Log".

      [Wed Nov 08 15:48:06 CET 2017] Starting branch indexing...
      Connecting to https://bitbucket.org using builder@acme.com/******
      Repository type: Git
      Looking up acme/repo1-java for branches
      Checking branch feature/30182 from acme/repo1-java
      Checking branch feature/RCSCS-166 from acme/repo1-java
      Checking branch feature/RCSCS-169 from acme/repo1-java
      Checking branch feature/RCSCS-173 from acme/repo1-java
      Checking branch feature/RMSCS-173 from acme/repo1-java
      Checking branch feature/RMSCS-222 from acme/repo1-java
      Checking branch feature/RMSCS-227 from acme/repo1-java
      Checking branch feature/RMSCS-228 from acme/repo1-java
      Checking branch feature/SOLU-7 from acme/repo1-java
      Checking branch master from acme/repo1-java
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: master (still at c3860adf276b49a7ced34a87fc08b0646d6ad11c)
      
        10 branches were processed
      Looking up acme/repo1-java for pull requests
      Checking PR-29 from acme/repo1-java and branch feature/RMSCS-227
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-29 (still at 46b7f40107d431144b0228b408720d24e2d90339)
      Checking PR-30 from acme/repo1-java and branch feature/RMSCS-173
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-30 (still at 43cb69c55ffdb53016923e983130441c26f8d847)
      Checking PR-28 from acme/repo1-java and branch feature/RMSCS-228
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-28 (still at 78e2e42095d338d5d28bd70f2e0e0c0d0e4132b8)
      Checking PR-7 from acme/repo1-java and branch feature/SOLU-7
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-7 (still at c82e55495318c0ad2891341f264052bb8229bfbd)
      Checking PR-27 from acme/repo1-java and branch feature/RMSCS-222
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-27 (still at d574a9e904685fb22723cba66b6a66e952bd815c)
      Checking PR-23 from acme/repo1-java and branch feature/RCSCS-169
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-23 (still at d244b74cff19cd9509db7df52fd4dd50b99fc92e)
      Checking PR-22 from acme/repo1-java and branch feature/RCSCS-166
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-22 (still at aa8960bb564a55f65ba803cf7d9c7039c8e21e91)
      Checking PR-20 from acme/repo1-java and branch feature/30182
            ‘Jenkinsfile’ found
          Met criteria
      No changes detected: PR-20 (still at 18797536105de89f348fab3ba39903f21050a3d3)
      Checking PR-19 from acme/repo1-java and branch feature/calla_test
      ERROR: [Wed Nov 08 15:48:18 CET 2017] Could not fetch branches from source b37eb1c3-57e8-4e21-bb8f-417cf8a2f77a
      java.io.FileNotFoundException: URL: https://api.bitbucket.org/2.0/repositories/acme/repo1-java/pullrequests/19/commits?fields=values.hash&pagelen=1
      	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:550)
      	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.resolveSourceFullHash(BitbucketCloudApiClient.java:355)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource$3.create(BitbucketSCMSource.java:668)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource$3.create(BitbucketSCMSource.java:663)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:339)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrievePullRequests(BitbucketSCMSource.java:661)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:577)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:421)
      [Wed Nov 08 15:48:18 CET 2017] Finished branch indexing. Indexing took 12 sec
      FATAL: Failed to recompute children of repo1-java
      java.io.FileNotFoundException: URL: https://api.bitbucket.org/2.0/repositories/acme/repo1-java/pullrequests/19/commits?fields=values.hash&pagelen=1
      	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:550)
      	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.resolveSourceFullHash(BitbucketCloudApiClient.java:355)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource$3.create(BitbucketSCMSource.java:668)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource$3.create(BitbucketSCMSource.java:663)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:339)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrievePullRequests(BitbucketSCMSource.java:661)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:577)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:421)
      Finished: FAILURE
      

            Unassigned Unassigned
            nfalco Nikolas Falco
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: