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

All branches being queried for each single build

      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.

       

          [JENKINS-49792] All branches being queried for each single build

          Luis Piedra-Márquez created issue -
          Luis Piedra-Márquez made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Luis Piedra-Márquez made changes -
          Description Original: In order to retrieve revrision from a Head, a query for all existinng branches is done
          {code:java}
          @Override
          protected SCMRevision retrieve(SCMHead head, TaskListener listener) throws IOException, InterruptedException {
                  final BitbucketApi bitbucket = buildBitbucketClient();
                  List<? extends BitbucketBranch> branches = bitbucket.getBranches();
          {code}
          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.

           
          New: In order to retrieve revrision from a Head, a query for all existinng branches is done
          {code:java}
          @Override
          protected SCMRevision retrieve(SCMHead head, TaskListener listener) throws IOException, InterruptedException {
                  final BitbucketApi bitbucket = buildBitbucketClient();
                  List<? extends BitbucketBranch> branches = bitbucket.getBranches();
          {code}
          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.

           
          Luis Piedra-Márquez made changes -
          Description Original: In order to retrieve revrision from a Head, a query for all existinng branches is done
          {code:java}
          @Override
          protected SCMRevision retrieve(SCMHead head, TaskListener listener) throws IOException, InterruptedException {
                  final BitbucketApi bitbucket = buildBitbucketClient();
                  List<? extends BitbucketBranch> branches = bitbucket.getBranches();
          {code}
          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.

           
          New: In order to retrieve revrision from a Head, a query for all existinng branches is done
          {code:java}
          @Override
          protected SCMRevision retrieve(SCMHead head, TaskListener listener) throws IOException, InterruptedException {
                  final BitbucketApi bitbucket = buildBitbucketClient();
                  List<? extends BitbucketBranch> branches = bitbucket.getBranches();
          {code}
          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.

           
          Nikolas Falco made changes -
          Assignee New: Nikolas Falco [ nfalco ]
          Nikolas Falco made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            nfalco Nikolas Falco
            luispiedra Luis Piedra-Márquez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: