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

All branches being queried for each single build

XMLWordPrintable

      In order to retrieve revrision from a Head, a query for all existinng branches is done

      @Override
      protected SCMRevision retrieve(SCMHead head, TaskListener listener) throws IOException, InterruptedException {
              final BitbucketApi bitbucket = buildBitbucketClient();
              List<? extends BitbucketBranch> branches = bitbucket.getBranches();
      

      I think it is possible to obtain the revision from the API with a query for the specific Head.

      This is causing heavy delays when starting builds, specially in Mercurial where branches cannot be deleted, they are just closed. Branches in API v2 is a paginated response, and in our case it is also hitting Bitbucket API rate limit.

      With Bitbucket Cloud API v1 this was not a problem becasue closed branches where not included in the response for all branches.

       

            Unassigned Unassigned
            luispiedra Luis Piedra-Márquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: