-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add FTPS support (#33) #739
Conversation
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.
Looks good but can you look into not requiring & running that external Docker image for the testing?
If you could fix that we'll include this PR in the upcoming smart_open release (next week or so). Thanks.
ci_helpers/helpers.sh
Outdated
--env HOME_DIR=/home/user \ | ||
--env FTP_PORT=21 \ | ||
--env FTPS_PORT=90 \ | ||
rachitsharma2001/ftp_ftps |
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.
Running external docker images is scary, both from security and also maintenance perspective.
Any way to launch the FTP(S) server directly from Python here?
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 for letting me know. I have removed the docker dependency and instead directly set up the ftp and ftps servers on ci using the vsftpd linux tool. Let me know if this looks good or if there is anything else I should add or change.
5650e6f
to
2c7a009
Compare
2c7a009
to
bef3c0f
Compare
Thanks for the quick resolution @RachitSharma2001. @mpenkov can you please review? |
It's simpler if we just run the whole script under sudo. The docstring helps our users. Also, we don't need read-text and write-text in FTP, that gets handled in a different part of smart_open.
since helpers.sh runs under sudo, it doesn't have access to the environment set in the workflow
looks like it _does_ get used after all
Thank you for your work @RachitSharma2001 ! |
Title
Support for reading and writing files directly to/from ftps (ftp with tls)
Motivation
I have previously added support ftp servers (without tls encryption). Now, to add more complete ftp functionality, I have added support for ftp+tls servers.
Tests
I have edited the ftp integration tests to run an ftp and ftps server on different ports and then test reading, writing, and appending to each of them. (specific integration test here, pull up ftp and ftps servers here).