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

Log (instead of raise) exceptions when running as a server extension #295

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

Zsailer
Copy link
Member

@Zsailer Zsailer commented Apr 29, 2024

This supersedes some of #294, leveraging changes in pycrdt-websocket v0.13.1.

In #290, we see cases where the y-websocket server becomes unusable anytime an exception is raised within the y-websocket server's task groups. We made changes in pycrdt-websocket so that these exceptions could optionally be logged instead of raised, thereby keeping the server running.

This PR leverages those changes so we can ensure that there serve is never blocked.

We need to bump the pycrdt-websocket minimum version to get these changes.

@Zsailer Zsailer added the enhancement New feature or request label Apr 29, 2024
Copy link
Contributor

Binder 👈 Launch a Binder on branch Zsailer/jupyter-collaboration/handle-exceptions

@Zsailer Zsailer force-pushed the handle-exceptions branch 2 times, most recently from d171191 to fc8fd7d Compare April 29, 2024 22:05
Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

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

Thanks @Zsailer, some comments but this should not block from merging.

f"Document Room Exception, (room_id={self._room_id or 'unknown'}): ",
exc_info=exception,
)
return True
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is almost the same function as in websocketserver.py, except for the logging message. I think this should be factored out, with an extra-argument for the message.

Copy link
Member Author

Choose a reason for hiding this comment

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

For sure. Since this is an internal definition right now, let's factor this out in a later PR. I want to proceed with merging, releasing, and testing.

@Zsailer Zsailer merged commit 6753b2a into jupyterlab:main Apr 30, 2024
13 of 15 checks passed
Zsailer added a commit to Zsailer/jupyter-collaboration that referenced this pull request May 1, 2024
Zsailer added a commit to Zsailer/jupyter-collaboration that referenced this pull request May 1, 2024
Zsailer added a commit that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants