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(rendering): allow framework renders to be cancelled #10448

Merged
merged 8 commits into from
Mar 18, 2024

Conversation

lilnasy
Copy link
Contributor

@lilnasy lilnasy commented Mar 14, 2024

Changes

Testing

  • Adapter the repro case into node --test test/streaming.test.js.

Docs

  • Does not affect usage.

Copy link

changeset-bot bot commented Mar 14, 2024

🦋 Changeset detected

Latest commit: dd66cdf

The changes in this PR will be included in the next version bump.

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Mar 14, 2024
@lilnasy lilnasy marked this pull request as ready for review March 14, 2024 21:22

describe('Streaming', () => {
if (isWindows) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test suite passes on windows. Was there another reason these were skipped?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, to be honest. But if it passes, happy days!

Comment on lines +487 to +490
function handleCancellation(e: unknown) {
if (result.cancelled) return { render() {} };
throw e;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we can wrap this entire function body with a try..catch, but this also works for me.

@lilnasy lilnasy merged commit fcece36 into withastro:main Mar 18, 2024
14 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Mar 18, 2024
@lilnasy lilnasy deleted the fix/10367 branch March 18, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server crashes due to multiple runtime errors in Astro component (Astro + React)
3 participants