-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Allow the parent frame of a streamlit app to terminate/restart its websocket #8704
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
c657a18
to
96971e0
Compare
72a5d25
to
b43e734
Compare
Heads up @sfc-gh-pfinnigan @sfc-gh-shaar that these message types should be ready for e2e testing in SiS. Note the names of the messages are currently:
but I'm not very opinionated on these names and am happy to change them if any better one are suggested. Also, I haven't started looking into websocket close codes or backoffs on ws reconnect retries just yet, but I'll be doing some investigation of those over the next few days. |
b43e734
to
727dfc9
Compare
Temporarily adding the |
c5304bb
to
bb2fcbf
Compare
e7ecf74
to
aaeabe2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I have left some non-blocking comments. And it'd be sweet to migrate the e2e test soonish to playwright!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also really appreciate it if you could add these messages to our Host <-> Guest documentation here with some context!
aaeabe2
to
96d3e12
Compare
96d3e12
to
108093e
Compare
…bsocket (streamlit#8704) We want to be able to let the parent frame of a streamlit app manage its websocket connection lifecycle. This PR adds this functionality to our `HostCommunicationManager` class by adding four new message types for interacting with a Streamlit app's websocket connection: * `RESTART_WEBSOCKET_CONNECTION` * `TERMINATE_WEBSOCKET_CONNECTION` * `WEBSOCKET_DISCONNECTED` (along with an attemptingToReconnect flag in the message payload) * `WEBSOCKET_CONNECTED`
…bsocket (streamlit#8704) We want to be able to let the parent frame of a streamlit app manage its websocket connection lifecycle. This PR adds this functionality to our `HostCommunicationManager` class by adding four new message types for interacting with a Streamlit app's websocket connection: * `RESTART_WEBSOCKET_CONNECTION` * `TERMINATE_WEBSOCKET_CONNECTION` * `WEBSOCKET_DISCONNECTED` (along with an attemptingToReconnect flag in the message payload) * `WEBSOCKET_CONNECTED`
We want to be able to let the parent frame of a streamlit app manage its websocket connection
lifecycle. This PR adds this functionality to our
HostCommunicationManager
class by adding fournew message types for interacting with a Streamlit app's websocket connection:
RESTART_WEBSOCKET_CONNECTION
TERMINATE_WEBSOCKET_CONNECTION
WEBSOCKET_DISCONNECTED
(along with an attemptingToReconnect flag in the message payload)WEBSOCKET_CONNECTED