1.9.x to main#140
Conversation
support for parquet
📝 WalkthroughWalkthroughVersion bumped to 1.9.6 and explicit MIME type registration for ChangesVersion and MIME Type Registration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing [Slack Agent](https://www.coderabbit.ai/agent): Turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
willisapi_client/services/metadata/upload.py (1)
58-75:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
requests.putcalled without atimeout— process can hang indefinitely.Both the
upload(line 65) andprocessed_upload(line 182) paths issue an unboundedrequests.putto the S3 presigned URL. If S3 is slow or unresponsive, the calling process blocks forever with no way to recover or report an error.Add an explicit
timeout(connect + read) to both call sites:⏱️ Proposed fix — add timeout to both S3 PUT calls
# upload() — lines ~65-75 response = requests.put( presigned, data=f, headers={ "x-amz-checksum-sha256": payload.get("checksum"), "x-amz-sdk-checksum-algorithm": "SHA256", "Content-Type": content_type, }, + timeout=(10, 300), # (connect_timeout, read_timeout) in seconds )# processed_upload() — lines ~182-190 response = requests.put( presigned, data=f, headers={ "x-amz-checksum-sha256": checksum, "x-amz-sdk-checksum-algorithm": "SHA256", "Content-Type": content_type, }, + timeout=(10, 300), )Tune the read timeout (
300sabove) to reflect your expected maximum upload size. The connect timeout (10s) should be conservative.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@willisapi_client/services/metadata/upload.py` around lines 58 - 75, The requests.put calls that upload files to the presigned S3 URL currently have no timeout and can hang; update both call sites (the PUT in the upload flow around the block that computes content_type and opens row.file_path, and the PUT in the processed_upload path) to pass an explicit timeout tuple (e.g. timeout=(10, 300)) to requests.put so you get a connect+read timeout and can handle/report failures via the existing response/error handling; ensure the same timeout strategy is used for both presigned upload calls (referencing the presigned variable and the response variable in each location).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@willisapi_client/services/metadata/upload.py`:
- Around line 58-75: The requests.put calls that upload files to the presigned
S3 URL currently have no timeout and can hang; update both call sites (the PUT
in the upload flow around the block that computes content_type and opens
row.file_path, and the PUT in the processed_upload path) to pass an explicit
timeout tuple (e.g. timeout=(10, 300)) to requests.put so you get a connect+read
timeout and can handle/report failures via the existing response/error handling;
ensure the same timeout strategy is used for both presigned upload calls
(referencing the presigned variable and the response variable in each location).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ea2d9d1b-c667-4999-8a22-283b685e29d0
📒 Files selected for processing (2)
willisapi_client/__version__.pywillisapi_client/services/metadata/upload.py
Description
[Describe the purpose and scope of this pull request.]
Changes Made
[List the changes made in this pull request.]
Checklist
Summary by CodeRabbit
Bug Fixes
Chores