Safe-DS / Runner

Execute Safe-DS programs that were compiled to Python.
MIT License
2 stars 0 forks source link

Runner crash on first request on Linux (and maybe others) #42

Closed WinPlay02 closed 8 months ago

WinPlay02 commented 9 months ago

Describe the bug

The runner crashes on first request (usually program message)

To Reproduce

  1. Open VSCode with Safe-DS extension
  2. Click on Run button for any Safe-DS source file

Expected behavior

The runner executes the program

Screenshots (optional)

No response

Additional Context (optional)

I would propose to replace the (legacy) flask stack with a quart (successor in a way of flask) stack that does not require monkey patching python internals. This has the added benefit to allow async python functions and in turn being possibly more efficient.

Furthermore, a migration to the socket.io protocol is still possible although not as easy as changing the dependency in flask.

lars-reimann commented 9 months ago

Is this related to the issue reported by @SmiteDeluxe?

lars-reimann commented 9 months ago

Websockets seem to be supported out-of-the-box by quart. How could socket.io be integrated (just spto ensure we don't lose options by migrating)? I guess python-socketio could be used for this purpose?

lars-reimann commented 9 months ago

litestar might also be a lightweight ASGI framework to consider.

WinPlay02 commented 9 months ago

Is this related to the issue reported by @SmiteDeluxe?

This is the same issue

Websockets seem to be supported out-of-the-box by quart. How could socket.io be integrated (just see to ensure we don't lose options by migrating? I guess python-socketio could be used for this purpose?

The python-socketio library is the way to go, exactly. python-socketio received support for ASGI a long time ago.

litestar might also be a lightweight ASGI framework to consider.

I chose quart as it is the successor to flask and it seemed the most lightweight. I additionally also considered fastapi.

WinPlay02 commented 9 months ago

Also see the fix-linux-startup-error branch, for a preview.

Furthermore, a migration to the socket.io protocol is still possible although not as easy as changing the dependency in flask.

The potential future usage of was socket.io was considered in the choice of quart.

lars-reimann commented 8 months ago

:tada: This issue has been resolved in version 0.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: