-
Notifications
You must be signed in to change notification settings - Fork 84
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
Forward errors when performing View actions #4122
Conversation
be001b0
to
baefe09
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.
If you type I'm not sure how to add a unit test, as in normal situations |
Ah, I just realized that if I try to view the dataframe by clicking the table icon in the variables pane, it does show the error message. But it shows after about 5 seconds which doesn't feel great. It seems like the RPC error response is not being linked back as a reply to the request message? Otherwise it would be thrown here: positron/src/vs/workbench/services/languageRuntime/common/positronBaseComm.ts Lines 253 to 262 in baefe09
|
I see. Could we also show a more helpful error message in the console too?
Good point. We should come up with a neater way to mock scenarios where certain things aren't installed. But a rough way for now might be to patch |
Weird, I can't reproduce the RPC timeout on my local build: Screen.Recording.2024-07-26.at.13.37.49.mov
Thanks! Ok, I'll add something like that!
Makes sense, I guess I can improve the error message right away |
Ok, I think I fixed. I had the wrong assumption that view would call Also added a unit test. For the |
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.
LGTM. The error message now showed immediately when I tried to click the table icon.
This PR addresses #3653 by forwarding the error when opening the Viewer to the user (using a notification) and suggesting to restart the session. It will also forward possible errors when performing
view
on Connections objects.QA Notes
It's a little complicated to reproduce the problem:
%pip install pandas
You should now see a notification showing that something failed when opening the dataset.
If you are in a dev build, you can also add some code to raise an error anywhere in the registration method:
positron/extensions/positron-python/python_files/positron/positron_ipykernel/data_explorer.py
Line 2257 in 07060ac