Visitar URL original
fix: close HTTP responses when conversion fails · Issue #2802 · microsoft/SynapseML · GitHub
Skip to content

fix: close HTTP responses when conversion fails #2802

Closed

Description

SynapseML version

Source baseline: master d3f3af6bd3e4b7d191f51c9eb29f9aeffe788193.

System information

  • Language: Scala 2.12.
  • Spark: 3.5 build profile.
  • Platform: local transport fixture; no external service is needed.

Describe the problem

HandlingUtils.convertAndClose closes an HTTP response only after conversion succeeds. If body or metadata conversion throws, the response is left unclosed, potentially retaining connection resources across failed requests.

Expected behavior: close the response when conversion succeeds or fails, while propagating the conversion error.

Code to reproduce issue

Pass a close-counting CloseableHttpResponse whose entity or metadata accessor throws an IOException into the existing conversion path. Assert that the original failure propagates and the response is closed exactly once.

The fix should be a narrow try/finally; it should not change retry accounting, introduce response-size limits, or depend on a new buffered-response engine. Independently executed regression results will be attached to the fix PR.

Other info / logs

Relevant files: HTTPClients.scala, HTTPSchema.scala and VerifyResponseBodyInspection.scala. Separate from the opt-in native transport support in #2759.

What component(s) does this bug affect?

  • area/core

What language(s) does this bug affect?

  • language/scala

What integration(s) does this bug affect?

No integration-specific dependency.

Activity

  1. github-actions commented on Nov 5, 2026

    @github-actions

    Hey Rana Singh (@ranadeepsingh) 👋!
    Thank you so much for reporting the issue/feature request 🚨.
    Someone from SynapseML Team will be looking to triage this issue soon.
    We appreciate your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions