• Blue Ocean 1.3, Blue Ocean 1.4 - beta 1, Blue Ocean 1.4 - beta 2

      According to Atlassian's Bitbucket team we are using some inefficient API methods that cause undue load on their API endpoints.

      BitbucketCloudApiClient uses a mixture of v1 and v2 APIs. We should switch solely over to Bitbucket v2 API to avoid load issues for Bitbucket and prevent a nasty surprise when they finally deprecate v1.

      We need to ensure that pagination is also handled.

          [JENKINS-45497] Move BitbucketCloudApiClient to Bitbucket v2

          Hi All!

          I can't init multibranch pipeline with bitbucket source plugin.

          Started
          [Wed Aug 02 13:27:17 UTC 2017] Starting branch indexing...
          Connecting to https://bitbucket.org using RepoOwner/****** (onetwotrip_bitbucket_app)
          Repository type: Git
          Looking up RepoOwner/repo for branches
          ERROR: [Wed Aug 02 13:28:18 UTC 2017] Could not fetch branches from source 61ea5900-2bb7-4889-b635-6ccbe5028f16
          java.net.SocketTimeoutException: Read timed out
          

          Me have many branches in repo, and this problem reproduced locally using curl and APIv1

          https://bitbucket.org/api/1.0/repositories/RepoOwner/repo/branches

          Atlassian support team reports

          Our development team has looked into the issue and the call is failing for this specific repository because there is a very large number of open branches. Version 1 of our API does not support pagination (as opposed to version 2) and this can cause issues when the responses are very large.
          

           

          Dmitry Shmelev added a comment - Hi All! I can't init multibranch pipeline with bitbucket source plugin. Started [Wed Aug 02 13:27:17 UTC 2017] Starting branch indexing... Connecting to https: //bitbucket.org using RepoOwner/****** (onetwotrip_bitbucket_app) Repository type: Git Looking up RepoOwner/repo for branches ERROR: [Wed Aug 02 13:28:18 UTC 2017] Could not fetch branches from source 61ea5900-2bb7-4889-b635-6ccbe5028f16 java.net.SocketTimeoutException: Read timed out Me have many branches in repo, and this problem reproduced locally using curl and APIv1 https://bitbucket.org/api/1.0/repositories/RepoOwner/repo/branches Atlassian support team reports Our development team has looked into the issue and the call is failing for this specific repository because there is a very large number of open branches. Version 1 of our API does not support pagination (as opposed to version 2) and this can cause issues when the responses are very large.  

          James Dumay added a comment -

          vivek would you mind taking care of this one at some point?

          James Dumay added a comment - vivek would you mind taking care of this one at some point?

          Vivek Pandey added a comment -

          Vivek Pandey added a comment - Fixed in PR https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/73 .

            vivek Vivek Pandey
            jamesdumay James Dumay
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: