Fix FD exhaustion during retry requests
What does this MR do?
Fix FD exhaustion during retry requests
Retrying requests (5xx/429) didn't close prior response bodies, leaking FDs even after TCP close. This exhausted file descriptors during sustained retries.
Fixes by closing all response bodies except the final one (caller-owned, per net/http contract).
Resolves: #39047 (closed)
Changelog: fixed
Why was this MR needed?
This MR was needed to avoid FD exhaustion, for more details read the issue
What's the best way to test this MR?
Patch GDK as mentioned in the issue and run a job using local runner. Observe the growing file descriptors held by runner as mentioned in this comment.