Repository navigation
Conversation
|
This library is auto-generated by the Appwrite SDK Generator, and does not accept pull requests directly. To learn more about how you can help us improve this SDK, please check the contributing guide. |
🔵 Tier A · Mergeable after minor fixes
The SDK now uses 55 of 73 changed files were too large to include in full.
Note Not approving while a bug finding is open: Wait for sibling chunk uploads after a failure
Fix with agent prompt### Issue 1
appwrite/client.py:406
**Wait for sibling chunk uploads after a failure**
If one remaining chunk raises, `asyncio.gather` propagates it immediately without cancelling the other uploads. The caller can therefore see a failed upload while sibling requests are still writing, unlike the previous executor path, which waited for all submitted futures before returning.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 5
Reviewed |
| futures = [executor.submit(upload_remaining_chunk, chunk) for chunk in chunks[1:]] | ||
| for future in as_completed(futures): | ||
| future.result() | ||
| await asyncio.gather(*(upload_remaining_chunk(chunk) for chunk in chunks[1:])) |
There was a problem hiding this comment.
Wait for sibling chunk uploads after a failure
If one remaining chunk raises, asyncio.gather propagates it immediately without cancelling the other uploads. The caller can therefore see a failed upload while sibling requests are still writing, unlike the previous executor path, which waited for all submitted futures before returning.
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/client.py
Line: 406
Comment:
**Wait for sibling chunk uploads after a failure**
If one remaining chunk raises, `asyncio.gather` propagates it immediately without cancelling the other uploads. The caller can therefore see a failed upload while sibling requests are still writing, unlike the previous executor path, which waited for all submitted futures before returning.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · error-handling · Reply if this doesn't apply.
Make SDK operations async and migrate to httpx2
Rebuild the client on httpx2.AsyncClient and turn every service
method into an async def, so callers await instead of blocking.
Chunked uploads use asyncio.gather with a semaphore, and the
client doubles as an async context manager.
Swap the HTTP dependency from httpx to httpx2, the fork now
maintained by Pydantic, and raise the Python floor to 3.11 to
match its requirement.
Add end-to-end tests that drive the SDK against a real local
server over real sockets, covering concurrency, connection
pooling, multipart chunking and TLS.