-
Notifications
You must be signed in to change notification settings - Fork 465
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
feat: implemented ftp backend #581
Conversation
So nice! |
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.
Bravo!
|
@ClSlaid Thanks for the review. I am moving house right now so I may not update too frequent, but I hope I can get all these thing fixed within a week. |
This PR is really great and almost done. I left some reviews on this PR. Please take a look when you are free.
And congrats on your new move. Hoping your new house is nice and comfortable. |
Resolve conflict
Added ftp service to behavior test. Resolve conflict
Corrected the .env.example file as it leaked my personal information... Resolve conflict.
e7ee4c1
to
2cb80fb
Compare
"Cargo.toml": Hide FTP support under new feature flag. "operator.rs", "scheme.rs, src/services/mod.rs": Added conditional compilation for ftp services. "src/services/ftp/backend.rs": Removed any unnecessary helper functions that only use once. Removed username and password store to avoid data breach. Combine port and endpoint into one. Built a FTP command stream inside Builder's build() function and persist this stream inside Backend. Changed tls to enable_secure. Developer can use enable_secure() function to enable tls connection. Modified read() function to avoid putting all stream content into memory. Fixed stat() function, when path argument is empty, stat() function will return the stat of root directory. "src/services/ftp/dir_stream.rs" Added more metadata in DirEntry. "src/services/ftp/err.rs": Removed any unnecessary error functions. "src/services/ftp/mod.rs": Remove empty line. "tests/behavior/behavior.rs": Added feature for ftp. Resolve conflict.
2cb80fb
to
ed99646
Compare
Remove duplicate pattern. "Cargo.toml": add services-ftp under example.
Added example section for ftp.
@Xuanwo I think I got everything fixed. If you find anything needed to be changed, Please point out.
However, according to this, the |
Please add an
It's a known issue that the HDFS test is flaky: #465 Please just ignore it. |
I have to admit that we (reviewers) made a mistake. Reusing the same connection makes everything complex:
I plan to merge this PR and leave this improvement as new issue.
|
Ignore unaffected vulnerability. "src/services/ftp/backend.rs": Added other options insde from_iter() function. Removed unused code. "src/services/ftp/backend.rs": Use resume_transfer() function for offset. "src/services/ftp/backend.rs": fixed minor reference bug. "examples/ftp.rs": fixed minor reference bug.
249bf54
to
d059532
Compare
Great work! |
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Summary about this PR
I've implemented ftp backend.
I tested it locally with vsftpd and it works fine. I didn't make too much tests on tls mode, but it should be working as
supftp
almost handle everything for us.It also pass all the behavior tests:
I created a example file in
examples/
if you want to try.The error handling looks kind cluttered tho, and Im trying to improve it.