fix(s3): cap parallel uploads behind proxy (ECO-410)#308
Merged
ArzelaAscoIi merged 1 commit intoApr 21, 2026
Conversation
- 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
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes?
Bulk S3 uploads through a corporate HTTP proxy could exhaust Windows socket/semaphore handles because:
upload_from_memorydid not acquire the same bounded semaphore asupload_from_file, so many concurrent POSTs (including*.meta.jsonsidecars) could pile up against the proxy.This PR applies the semaphore to
upload_from_memoryand, 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 -qNotes for the reviewer
enable_parallel_processingon the API is unchanged; this addresses client-side S3 concurrency only.Checklist
Made with Cursor