-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix drive handling for sessions and terminals #14519
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
|
Thanks for making a pull request to jupyterlab! |
|
The console test failures appear relevant. |
| execute: async args => { | ||
| const name = args['name'] as string; | ||
| const cwd = args['cwd'] as string; | ||
| const localPath = serviceManager.contents.localPath(cwd); |
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.
The UI tests are also relevant.
The problem is that cwd can be undefined. For example, when creating a new terminal from the File -> New -> Terminal menu, the cwd is undefined.
|
The remaining test failures are not related. |
krassowski
left a comment
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.
Thank you!
|
Thanks! |
What does "file folder" means here? What should then be the expected behavior in the case when multiple drives with possibilly the same file names ( With 3.6.x it was possible to get some information about this since the drive name was kept as the session context prefix, and visible in the tooltip: But with JupyterLab 4 it's not the case anymore: Which makes it difficult to know about which kernels are being used, especially when there are files with the same name in two different drives: |
|
Raising this question because it looks like this change (released in JupyterLab 4.0) affected JupyterLite downstream: jupyterlab-contrib/jupyterlab-filesystem-access#55 (comment) The drive name used to be passed along as a prefix (for example Looking more into it, JupyterLab does not even seem to allow this anymore, since the information about the drive being used in never sent to the server, now that the session context path defaults to the local path (without the drive name). Potentially something to look into as part of #15143, to allow for such uses case like in JupyterLite. |
|
Looks like #13866 might also be related. |
I have similar questions as @jtpio. Overall, my question is what is the strategy/logic of the drives (registration, usage, naming convention, URI...) across JupyterLab and its extensions. This is a broader question than the issue fixed by this PR, and this may be already defined somewhere (?), just asking... |
Yes very likely a broader question that would involve more design work on the drive feature. I opened #15289 to discuss this more in an issue. |



References
Fixes #14443
Code changes
Set
sessionContexthaslocalPath(dropping the drive name)Pass
cwdwithout the drive name when starting terminalsUser-facing changes
For browser with non-default drive (like for RTC), the kernels should start in the file folder and the terminals and consoles should open in the current directory.
Backwards-incompatible changes
None