jenkinsci / jenkinsci/java-client-api

http unrelease when request return unsuccessful

Open
#334 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
913
Forks
466
PR merge metrics
No merged PRs in 30d

Description

when i try to create a project using function createJob() , if there already have a job has the same name with the new job,the http response code would be 400 bad request,then the httpResponseValidator.validateResponse() would thrown exception .
at this time ,the http connection will not be release because the try-catch statement don't include the validateResponse function.
after 2times failed (the initial pool size ),the connection pool don't have any new connection to use, the leaseConnection() in the PoolingHttpClientConnectionManager would hang

Contributor guide

Open the contributing guide

Research direction

Start at createJob() and trace the path through httpResponseValidator.validateResponse(), focusing on where the try-catch handles unsuccessful responses and where the HTTP connection is released. Reproduce the duplicate-name failure and confirm that repeated failed requests no longer exhaust the connection pool or cause leaseConnection() to hang.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.