Skip to content
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

fix(runtime,serverless,cli): properly handle errors and timeouts while streaming #416

Merged
merged 2 commits into from Dec 26, 2022

Conversation

QuiiBz
Copy link
Member

@QuiiBz QuiiBz commented Dec 26, 2022

About

Closes #413

  • If we returned a stream without closing it, the runtime would hang indefinitely without shutting down after the execution timeout elapsed. Resolved by moving the termination_rx check before the streaming status checks inside the event loop
  • The runtime didn't catch promises rejection because we didn't have a promise_reject_callback handler. Resolved by adding this callback, adding a new promise_rejected_message to the Isolate state, and checking for its presence inside the event loop
  • Close the stream on CLI on Serverless when we receive a result that isn't part of the stream

@vercel
Copy link

vercel bot commented Dec 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated
dashboard ⬜️ Ignored (Inspect) Dec 26, 2022 at 10:34AM (UTC)
docs ⬜️ Ignored (Inspect) Dec 26, 2022 at 10:34AM (UTC)
storybook ⬜️ Ignored (Inspect) Dec 26, 2022 at 10:34AM (UTC)
www ⬜️ Ignored (Inspect) Dec 26, 2022 at 10:34AM (UTC)

@QuiiBz QuiiBz merged commit c3bbdb3 into main Dec 26, 2022
@QuiiBz QuiiBz deleted the fix/runtime-streaming-errors-timeout branch December 26, 2022 10:41
@QuiiBz QuiiBz mentioned this pull request Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors are not thrown inside async functions while streaming
1 participant