-
Notifications
You must be signed in to change notification settings - Fork 939
Stream volume file uploads and downloads instead of buffering in memory #1453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
cbf465a
feat(sdk): stream file uploads and downloads instead of buffering in …
mishushakov 9d72b2e
fix(js-sdk): return proper empty values from read() for empty files
mishushakov 6cda03f
fix: address review comments on streaming reads
mishushakov 58c5f86
Merge remote-tracking branch 'origin/main' into mishushakov/stream-wr…
mishushakov 1ae9a34
fix(python-sdk): prevent connection leaks from abandoned stream reads
mishushakov 22d98a3
fix(js-sdk): release stream-read connections on error and GC
mishushakov 9b34ecf
refactor(python-sdk): drop fragile async GC net from AsyncFileStreamR…
mishushakov a869488
Merge remote-tracking branch 'origin/main' into mishushakov/stream-wr…
mishushakov a0d564f
fix(sdks): align streaming connection lifecycle across files and volumes
mishushakov e828699
feat(sdks): default file writes to octet-stream when data is streamable
mishushakov b0b1018
fix(python-sdk): give streamed file uploads the file-transfer timeout
mishushakov d2b7329
refactor(sdks): split volume streaming changes into a follow-up PR
mishushakov 30ca0d0
feat(sdks): stream volume file uploads and downloads
mishushakov 6a3ad1b
Merge remote-tracking branch 'origin/main' into mishushakov/stream-wr…
mishushakov 7a52f73
Merge remote-tracking branch 'origin/main' into mishushakov/stream-wr…
mishushakov 21045a2
test(python-sdk): make stream connection-leak assertions race-free
mishushakov eb12c66
fix(js-sdk): cancel underlying body reader when abandoned stream is GC'd
mishushakov ed277d0
refactor(sdks): replace stream GC nets with an idle-read timeout
mishushakov 40a3103
feat(sdks): add per-chunk idle timeout to streamed reads and writes
mishushakov 2022d3a
fix(python-sdk): run streamed-upload reads and gzip off the event loop
mishushakov cc2cd57
refactor(sdks): make the JS read idle timeout bound only the wire
mishushakov d2939b0
docs(python-sdk): scope the FILE_TIMEOUT comment to volume transfers
mishushakov 8c5b640
docs(python-sdk): note envd backstops the streamed-upload per-write t…
mishushakov 24f99d2
Merge file-upload: adopt idle-read-timeout streaming infra in volumes
mishushakov 11254d8
refactor(js-sdk): use *Opts naming for volume option types
mishushakov b9039a2
Merge branch 'main' into mishushakov/stream-write-volumes
mishushakov 90ae65f
fix(python-sdk): drop unused FILE_TIMEOUT from e2b.connection_config
mishushakov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| "e2b": patch | ||
| "@e2b/python-sdk": patch | ||
| --- | ||
|
|
||
| Stream volume file uploads and downloads instead of buffering in memory: | ||
|
|
||
| - `Volume.writeFile()` / `Volume.write_file()`: `ReadableStream` data (JS, outside the browser) and file-like objects (Python) are now streamed to the API in chunks. | ||
| - `Volume.readFile(format="stream")` / `read_file(format="stream")`: the request timeout now bounds only the initial handshake instead of killing the stream while it's being consumed (Python disables the read timeout; JS bounds the handshake and supports `signal` to cancel an in-flight stream). A dropped connection during the stream handshake now surfaces the same typed, health-checked error as non-stream reads. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.