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

Implement assynchronous SFTP file transfer #641

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

Conversation

Jakuje
Copy link
Contributor

@Jakuje Jakuje commented Sep 11, 2024

SUMMARY

The SFTP transfers done the way they work now are very slow especially on connections with large latency because each chunk (now 1024B) needs to travel all the way to remote as well as the confirmation (or request + data for the other transfer), before another chunk is sent. This can be improved by two things:

  • sending larger chunks (up to the size reported by SFTP limits extension)
  • sending more requests while waiting for the confirmation/data

This depends on #636 (libssh 0.11), but also on other platforms having the updated libssh. It will likely need some conditional compilation based on the libssh version, but I did not find a good solution for cython after it was deprecated (cython/cython#4310) so any help/suggestions welcomed.

This PR also reproduces an issue with the new API that it currently hangs waiting for the second message, while it already happily sits in the queue, which is being worked on upstream.

Therefore marking as a draft to collect initial inputs.

ISSUE TYPE
  • Feature Pull Request

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 11, 2024
@webknjaz
Copy link
Member

I applied some CI fixes and now this PR needs to be rebased to pick them up. I'm clicking the rebase button now.

@webknjaz webknjaz marked this pull request as ready for review September 12, 2024 13:10
@webknjaz webknjaz marked this pull request as draft September 12, 2024 13:10
@webknjaz webknjaz marked this pull request as draft September 12, 2024 13:10
@webknjaz webknjaz force-pushed the async-sftp branch 2 times, most recently from 3c22bba to fd42bb2 Compare September 12, 2024 13:35
Copy link

sonarcloud bot commented Sep 12, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

Signed-off-by: Jakub Jelen <[email protected]>
src/pylibsshext/sftp.pyx Outdated Show resolved Hide resolved
src/pylibsshext/sftp.pyx Outdated Show resolved Hide resolved
src/pylibsshext/sftp.pyx Outdated Show resolved Hide resolved
src/pylibsshext/sftp.pyx Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Oct 24, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/ansible-pylibssh-641
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@Jakuje
Copy link
Contributor Author

Jakuje commented Oct 24, 2024

The testing farm build are failing because the libssh 0.11 did not make it to the stable fedora versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants