-
-
Notifications
You must be signed in to change notification settings - Fork 721
Auto-resolve payload/output presigned urls when retrieving a run #1317
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
Conversation
🦋 Changeset detectedLatest commit: c78fa88 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce a feature that automatically resolves presigned URLs for payload and output when retrieving a run via the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
commit: |
8910b91
to
c78fa88
Compare
When a task run has a large payload or output, we store it in an object store like s3 or r2, to prevent very large JSON objects getting in our database (and causing event loop lags on serialize/deserialize).
Currently, when you retrieve a run using
runs.retrieve()
, if that run has stored the payload/output in the object store, we return apayloadPresignedUrl
and/or aoutputPresignedUrl
, which can then be fetched separately. This has a couple problems:This PR makes it so
runs.retrieve()
will automatically "resolve" the payload and output presigned urls, and pass them through superjson if needed. This also makes it so the type-safety ofruns.retrieve()
when passing a run handle or providing the typeof the task as a generic param works correctly.Note that
payloadPresignedUrl
andoutputPresignedUrl
are still left on the result, for backwards compat reasons.Summary by CodeRabbit
New Features
Improvements