-
Notifications
You must be signed in to change notification settings - Fork 1
Reimplementation using Provisioner architecture #6
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
base: main
Are you sure you want to change the base?
Conversation
This codes does not use these at all. Drop them for now. The LocalProvisioner does this but it is not clear if these are ever used for anything.
As a quick update I am working as well on a draft of the sshfs features that allows to mount local dirs on remote: https://github.com/caenrigen/sshpyk/tree/sshfs |
Hi @caenrigen In looking at the code changes, there was one piece of functionality that it seems may have been excluded. The current behavior of |
Hi, Thank you for coming back to this! You are right that there is some functionality that is missing indeed from the previous implementation. More to come :) |
Hi, in case you did not have a look yet, I just pushed some sanity checks for the remote and split the output into 2 tables one for local and one for remote. Another thing that might be missing in my PR is handling of remote env. But I think the best way to deal with that might be to give users the option to |
Printing tables does not work well since several parameters of interest are paths that can get very long. This is also handy for my sshfs branch which has some more configs in the |
Thanks very much for the updates. The reoriented listing seems good. I'll try it out in the morning. |
Btw, I ended up making more changes/improvements in my sshfs branch which I think is also ready now. Would you mind if I add the sshfs commits in this PR? |
Thanks for the update. Lets do the sshfs in a separate PR so that I can look at the changes separately. |
Sounds good. And in the meantime I run into some bugs that I need to fix on that branch |
I run into some issues while debugging sshfs, so ended up simplifying the handling of the stdout/stderr of subprocesses. |
So in your case, all kernels are considered to be Local hence no verification is being executed. I understand this is a bit of a bummer for someone who is using the previous version of As a side effect of the new implementation, detecting which kernels belong to The meaning of each verification/check Also worth noting that my implementation is intentionally agnostic to how the remote kernel is implemented and what command it runs to launch the corresponding kernel. It delegates that part to jupyter itself by running on remote |
Sorry for the slow reply. I have been on travel since Thursday evening. Thanks for the explanation. It is probably fine if listing old These are the errors I see when starting a newly configured kernel in nteract: ![]() ![]() |
Hi! I understand the problem and I run into it myself in VS Code. The issue is that many of the tools that launch Jupyter kernels make the assumption that only the argv is required to launch the kernel and that the connection file is one of the args. Imo that is a bad assumption because Jupyter might require extra data from the json for launching a kernel correctly. Nonetheless, I do agree that we want to be able to launch an ssh kernel independently of a full JupyterLab/Jupyter server. Which should make it backwards compatible with tools that rely on the argv. I did a quick test that did not work, but I want to come back to it. The idea is to assemble an argv that invokes some Jupyter (or sshpky) command that internally runs the provisioner AND uses the provided connection file, but there is some devil in the detail because the local connection file needs to be compatible with the remote ofc, and some details about which one is generated first, etc. |
I refactored the code to include the relevant changes from my sshfs branch. Pull the code of this branch and add an ssh kernel with Give it a try and let me know |
Small update, I realised I am not implementing a proper shutdown sequence, needs some improvements |
Thanks for the update and all of the work! I'll give it a try |
Hi @caenrigen unfortunately, I have had no luck using this new version. Using
![]() I'm not sure what the |
I find that the key file that is created on the remote host does not contain a key:
After the failed (from the local perspective) startup of the remote kernel, two processes are started on the remote system:
after shutdown one still remains:
|
Hi, thanks for trying it out, I think I came across this problem and fixed it on my sshfs branch, I need to do some more testing and porting it to this branch. The process remaining on the remote system will be solved too. |
Give a try again, made some substancial changes to the logic of shutdowns/restarts |
Hi!
My prototype is ready.
I think the easiest if for you to have a look at the new README on GitHub: https://github.com/caenrigen/sshpyk/blob/provisioner/README.rst and to let me know your thoughts.
The meat of the code is inside
provisioner.py
. Docs on the provisioner concept over here in the jupyter_client.Both the cli tool and the README was largely AI-written in interest of time, etc.. I did a few tests, its seemed to work as intended.
Hope you find some time to give it a try. I tested it with JupyterLab between macOS machines. Would be good to confirm things works well between other systems.
Fixes #2 in principle