Skip to content

Reuse HTTP connections across Azure clients - #294

Merged
uhc7 merged 2 commits into
mainfrom
feature/276-reuse-http-connections
Sep 29, 2026
Merged

uhc7 merged 2 commits into
mainfrom
feature/276-reuse-http-connections

Conversation

@uhc7

@uhc7 uhc7 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #276

Summary

Reuse HTTP connection resources across the core Azure SDK clients created by CloudClient to reduce connection setup overhead and improve sustained throughput for long-running workflows.

Changes

  • Create a shared Azure Core RequestsTransport in CloudClient.
  • Reuse the shared HTTP session across:
    • Batch Management client
    • Compute Management client
    • Batch Service client
    • Blob Service client
  • Give each Azure SDK client a non-owning transport wrapper so closing an individual client transport does not close the shared session.
  • Add CloudClient.close() to explicitly clean up the shared HTTP transport.
  • Add tests covering HTTP session reuse and cleanup behavior.
  • Bump the package version from 1.1.0 to 1.2.0.
  • Update the changelog.

Validation

  • Focused CloudClient/client factory tests: 48 passed.
  • Targeted pre-commit checks passed, including Ruff, formatting, TOML validation, whitespace checks, and secret detection.
  • Full test suite: 274 passed, 1 failed.
  • The remaining failure is an existing Windows-specific test issue in test_download_job_stats, which uses the Unix /tmp/job-stats.json path and is unrelated to these changes.

@uhc7 uhc7 self-assigned this Sep 22, 2026
@uhc7
uhc7 requested a review from ryanraaschCDC September 22, 2026 22:29
@ryanraaschCDC
ryanraaschCDC requested a review from xop5 September 23, 2026 13:20

@ryanraaschCDC ryanraaschCDC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! I added @xop5 to review as well

@uhc7
uhc7 merged commit 095b8a6 into main Sep 29, 2026
3 checks passed
@uhc7
uhc7 deleted the feature/276-reuse-http-connections branch September 29, 2026 14:36
@uhc7
uhc7 restored the feature/276-reuse-http-connections branch September 29, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reuse HTTP Connections When Possible

3 participants