-
Notifications
You must be signed in to change notification settings - Fork 12
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
transfer files using a separate paramiko
channel
#171
Conversation
thank you for this addition, @keewis! The CI has been failing for a while. I plan to look into this today. If you don't mind waiting, we can merge this once the CI is fixed. Are you able to test this feature on your local HPC machine? |
no worries, I'm not in a hurry to get this merged so you can take your time (though afterwards it would be great to get a release). Re testing: of course I did a manual "integration test" on my local HPC (run |
for more information, see https://pre-commit.ci
it would probably help very much with the debugging if we could figure out how to have My guess is that the reason for broken redirect is that the I can try sending in a PR tomorrow, if that sounds good to you. |
Yes, please. That would be very useful... |
okay, so after some investigation, it seems that this is caused by the I'm guessing we would have to monkeypatch Another option would be to take the authentication handlers as parameters (one for I'd probably prefer the latter because it results in a cleaner architecture (monkeypatching is usually a code smell). Edit: as it turns out, Edit2: setting |
since we don't actually use the shell
well, turns out the issue was not the write but verifying the contents of the file. That means that we can also ignore all the different shells (we don't actually use them) and just take the default shell. |
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.
This looks great, @keewis! Thanks again for this addition 🎉
i'm going to merge this shortly unless you have additional changes ... |
I've been trying to follow this conversation, but I'm a little lost. I saw that you introduced a new test ( |
no worries, I'm happy to answer any questions you might have (I might not be able to answer some of them, though, I'm no expert on shell startup, and in particular I don't know Slight correction: the test was passing on every shell except As far as I can tell, the reason it failed was the line of the test where we get the contents of the newly created file to check that it actually contains what we wanted to put there: jupyter-forward/tests/test_core.py Line 143 in 5e4230a
Changing the test to call jupyter-forward/tests/test_core.py Line 143 in 28da4f4
run_command , or, more likely, that a common shell startup file (like ~/.profile ) contains code incompatible with tcsh , which decided to complain about that to stdout (and all commands executed by _set_log_directory would print the same warning, so...).
Now that the test does not use In any case, TL;DR: the issue was in the test code and not |
Thanks for clarifying!
Given your response, I don't think we need to run this test on every shell so I vote for leaving it bash-only. |
great! @andersy005, I think this should be ready for merging then. Thanks a lot for the reviews and help! Edit: and just after posting this I found a few things to improve... |
The lower-level
paramiko
library allows using a separate channel to execute something similar to:where
script
is never evaluated by the shell.I'm not sure if there's something like this in
fabric
; I couldn't find anything that would avoid using SFTP (which the admins on my HPC disabled). There were references to SCP in the documentation offabric
, but I don't think we should depend on that: as far as I remember, that protocol is deprecated.I tried to include a test, but I can't seem to understand the test setup so I can't verify if it passes (I guess I will need to wait on CI for that).