Skip to content

fix(s3): cap parallel uploads behind proxy (ECO-410)#308

Merged
ArzelaAscoIi merged 1 commit into
mainfrom
feature/eco-410-file-upload-via-sdk-fials-for-client
Apr 21, 2026
Merged

fix(s3): cap parallel uploads behind proxy (ECO-410)#308
ArzelaAscoIi merged 1 commit into
mainfrom
feature/eco-410-file-upload-via-sdk-fials-for-client

Conversation

@ArzelaAscoIi
Copy link
Copy Markdown
Member

Related Issues

Proposed Changes?

Bulk S3 uploads through a corporate HTTP proxy could exhaust Windows socket/semaphore handles because:

  1. upload_from_memory did not acquire the same bounded semaphore as upload_from_file, so many concurrent POSTs (including *.meta.json sidecars) could pile up against the proxy.
  2. Default S3 concurrency (10) was still high for some proxy setups.

This PR applies the semaphore to upload_from_memory and, when common proxy env vars are set (HTTP_PROXY, HTTPS_PROXY, etc.), reduces client concurrency to 4 with an info log.

How did you test it?

  • uv run pytest tests/unit/s3/test_upload.py tests/unit/service/test_files_service.py::TestResolveS3Concurrency -q

Notes for the reviewer

  • enable_parallel_processing on the API is unchanged; this addresses client-side S3 concurrency only.

Checklist

  • I have updated the referenced issue with new insights and changes
  • If this is a code change, I have added unit tests
  • I've used the conventional commit specification for my PR title
  • I updated the docstrings
  • If this is a code change, I added meaningful logs and prepared Datadog visualizations and alerts

Made with Cursor

- Apply S3 semaphore to upload_from_memory (parity with path uploads)
- Use reduced concurrency when HTTP(S) proxy env vars are set
- Add unit tests for concurrency resolution

Made-with: Cursor
@github-actions
Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  deepset_cloud_sdk/_s3
  upload.py
  deepset_cloud_sdk/_service
  files_service.py 94
Project Total  

This report was generated by python-coverage-comment-action

@ArzelaAscoIi ArzelaAscoIi enabled auto-merge April 21, 2026 16:16
Copy link
Copy Markdown

@Amnah199 Amnah199 left a comment

Choose a reason for hiding this comment

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

👏

@ArzelaAscoIi ArzelaAscoIi added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit 6d9fedc Apr 21, 2026
5 checks passed
@ArzelaAscoIi ArzelaAscoIi deleted the feature/eco-410-file-upload-via-sdk-fials-for-client branch April 21, 2026 16:22
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.

2 participants