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

Handle when default branch is not found

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Problem
      When a Bitbucket server's repository is scanned and the repository has no browsers, the endpoint describing the branch will fail (404) causing the scan to fail.

      Scope

      • Do not set the default branch and silently continue

      Error

      ERROR: [Tue Jul 18 11:04:30 EDT 2017] Could not update folder level actions from source 24e70d6e-8882-498f-88ed-638cfc5cbf20
      java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:345)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:967)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.io.FileNotFoundException: URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:508)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:342)
      	... 8 more
      [Tue Jul 18 11:04:30 EDT 2017] Finished branch indexing. Indexing took 67 ms
      FATAL: Failed to recompute children of repo-2
      java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:345)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:967)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.io.FileNotFoundException: URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:508)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:342)
      	... 8 more
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            jamesdumay James Dumay created issue -
            jamesdumay James Dumay made changes -
            Field Original Value New Value
            Rank Ranked higher
            jamesdumay James Dumay made changes -
            Summary Log spam when default branch is not found Handle when default branch is not found
            jamesdumay James Dumay made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jamesdumay James Dumay made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jamesdumay James Dumay made changes -
            Assignee Antonio Muñiz [ amuniz ] James Dumay [ jamesdumay ]
            jamesdumay James Dumay made changes -
            Description *Problem*
            When a Bitbucket server's repository is scanned and the repository has no browsers, the endpoint describing the 404 will fail causing the scan to fail.

            *Scope*
            * Do not set the default branch and silently continue

            *Error*
            {noformat}
            ERROR: [Tue Jul 18 11:04:30 EDT 2017] Could not update folder level actions from source 24e70d6e-8882-498f-88ed-638cfc5cbf20
            java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:345)
            at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:967)
            at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
            at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
            at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
            at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
            at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:410)
            Caused by: java.io.FileNotFoundException: URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:508)
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:342)
            ... 8 more
            [Tue Jul 18 11:04:30 EDT 2017] Finished branch indexing. Indexing took 67 ms
            FATAL: Failed to recompute children of repo-2
            java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:345)
            at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:967)
            at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
            at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
            at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
            at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
            at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:410)
            Caused by: java.io.FileNotFoundException: URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:508)
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:342)
            ... 8 more
            Finished: FAILURE
            {noformat}
            *Problem*
            When a Bitbucket server's repository is scanned and the repository has no browsers, the endpoint describing the branch will fail (404) causing the scan to fail.

            *Scope*
            * Do not set the default branch and silently continue

            *Error*
            {noformat}
            ERROR: [Tue Jul 18 11:04:30 EDT 2017] Could not update folder level actions from source 24e70d6e-8882-498f-88ed-638cfc5cbf20
            java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:345)
            at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:967)
            at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
            at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
            at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
            at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
            at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:410)
            Caused by: java.io.FileNotFoundException: URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:508)
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:342)
            ... 8 more
            [Tue Jul 18 11:04:30 EDT 2017] Finished branch indexing. Indexing took 67 ms
            FATAL: Failed to recompute children of repo-2
            java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:345)
            at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:967)
            at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
            at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
            at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
            at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
            at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:410)
            Caused by: java.io.FileNotFoundException: URL: /rest/api/1.0/projects/PROJECT_1/repos/repo-2/branches/default
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:508)
            at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getDefaultBranch(BitbucketServerAPIClient.java:342)
            ... 8 more
            Finished: FAILURE
            {noformat}
            Hide
            stephenconnolly Stephen Connolly added a comment -

            2.2.2

            Show
            stephenconnolly Stephen Connolly added a comment - 2.2.2
            stephenconnolly Stephen Connolly made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 17307 ]

              People

              • Assignee:
                jamesdumay James Dumay
                Reporter:
                jamesdumay James Dumay
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: