widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.6k stars 104 forks source link

fix: close playwright properly when building ssg #581

Closed iisakkirotko closed 1 month ago

iisakkirotko commented 1 month ago

Previously we attempted to close the playwrights after the threadpool has been closed. However, outside of the async context we only find pw.browser (as well as all other properties) to be None, which previously resulted in an error due to us asserting that pw.browser is not None. Closing the browser and context manager properly should ensure they don't drain any resources after ssg generation is done.

I'm not sure if there is a concern that close_playwrights executes before the ssg is done, resulting in the opening of a new context, and that one not being closed.

render[bot] commented 1 month ago

Your Render PR Server URL is https://solara-stable-pr-581.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-co6p6ken7f5s739tv1ag.

iisakkirotko commented 1 month ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @iisakkirotko and the rest of your teammates on Graphite Graphite

iisakkirotko commented 1 month ago

We can also see that currently ssg fails due to the assertion error, see the workflow run