From c8722d26514cb6d1a53ce69663c961aa235700be Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 6 Jan 2025 02:42:17 +0200 Subject: [PATCH] [JENKINS-64418] Add exponential backoff to BitBucket rate limit retry loop (#959) Fix duplicate base URL in request to Bitbucket Server. The problem is that getSingleBranch prepends this.baseURL to the URI template and calls getResource, which expands the template and prepends this.baseURL to the resulting URL again. Method getResource is called only by getSingleTag and getSingleBranch, and both of them include the base URL in the template. Thus, getResource should not prepend it again. --- .../bitbucket/server/client/BitbucketServerAPIClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java index 598f0287b..06addc5fb 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java @@ -903,7 +903,7 @@ private V getResource(UriTemplate template, Class