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

Added initial SFTP implementation using SSH.NET #15477

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

itsWindows11
Copy link
Contributor

@itsWindows11 itsWindows11 commented May 26, 2024

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

Currently waiting for #8974 to be implemented (since the current way of hooking filesystems to the UI is a total mess I cannot figure out) along with #15473, this PR is to lay the groundwork for resolving #2407 and will be marked as ready when everything is finished.

@0x5bfa
Copy link
Member

0x5bfa commented May 26, 2024

This is around Storage Abstraction and it'll take a huge amount of time to get this abstraction ready for actual use.
@yaira2 we might as well merge like we have done as leave until finish.
If you agree, I'll take a look and leave a review.

@0x5bfa 0x5bfa self-requested a review May 26, 2024 16:04
@yaira2
Copy link
Member

yaira2 commented May 26, 2024

Sounds good

Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

LGTM otherwise!

You seem to have implemented for BaseStorageItem.
Is that working well?
If so, how did you validate/use SFTP storage?

@itsWindows11
Copy link
Contributor Author

It's a draft for a reason 🙃 I'll do the testing outside of Files in a separate project, until I can figure out the UI part.

I've seen what's implemented for FTP support and tried to go for a similar implementation since it's pretty much the only non-shell-based storage implementation here with different protocols (AFAIK)

@yaira2
Copy link
Member

yaira2 commented Sep 8, 2024

@itsWindows11 what the status of this PR?

@0x5bfa
Copy link
Member

0x5bfa commented Sep 8, 2024

Storage abstraction won't be implemented until the next year unless someone take over in Files and given OwlCore's progress. I think we should wrap up in order to merge.

@tmds
Copy link

tmds commented Oct 4, 2024

Hi all, I wonder if you may be open to use Tmds.Ssh to implement this feature?

The SftpClient is fully async and it has methods that match well with what you need. Additionally, the upload/download methods are optimized to parallelize the transfer while keeping the overall .NET memory allocations low.

I'd be interested in any feedback you have while using the library.

@itsWindows11
Copy link
Contributor Author

Sounds like a better option, but my SSH.NET issue regarding async IO support seems to be addressed so I don't think there's a need to switch.

The main blocker is the storage abstraction though, we either need to get this merged with switching the methods to be async and someone completes the integration, or wait until we can use OwlCore.Storage w/ extensions on the Files end.

@tmds
Copy link

tmds commented Oct 6, 2024

@itsWindows11 the reason to consider switching could be performance. From the limited comparisons I did, Tmds.Ssh was considerably faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants