Skip to content

Commit

Permalink
[JENKINS-64418] Add exponential backoff to BitBucket rate limit retry…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
KalleOlaviNiemitalo authored Jan 6, 2025
1 parent 441929e commit c8722d2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ private <V> V getResource(UriTemplate template, Class<? extends PagedApiResponse
.set("start", pageNumber) //
.set("limit", limit) //
.expand();
String response = getRequest(this.baseURL + url);
String response = getRequest(url);
try {
page = JsonParser.toJava(response, clazz);
} catch (IOException e) {
Expand Down

0 comments on commit c8722d2

Please sign in to comment.