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

feat(services/ftp): List dir shows last modified timestamp #5213

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

erickguan
Copy link
Contributor

Which issue does this PR close?

Part of #4746.

What changes are included in this PR?

ftp service will also return last modified timestamp.

Are there any user-facing changes?

Nope.

Questions

I found other problems that I want to change but they are not part of the issue.

  1. I also found the underlying crate suppaftp supports async. I want to support it. This might be a breaking change for FTP service. Do you consider support async for ftp?

  2. I also see sftp implementation uses another crate openssh_sftp_client. I have skimmed through these crates documentation and code. I don't want to expand this comparasion too much. In short, suppaftp depends tls implementation in Rust while openssh_sftp_client depends on OpenSSH. suppaftp has slightly less code. I am considering using suppaftp if that fulfill the current implementation. Happy to discuss more.

  3. I tested this locally by using a FTP server in Docker. Roughly put, how much tests do you consider to have and where to start?

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you @erickguan for working on this!

@Xuanwo
Copy link
Member

Xuanwo commented Oct 20, 2024

  1. I also found the underlying crate suppaftp supports async. I want to support it. This might be a breaking change for FTP service. Do you consider support async for ftp?

Hi, ftp already supported async:

async fn read(&self, path: &str, args: OpRead) -> Result<(RpRead, Self::Reader)> {
let ftp_stream = self.ftp_connect(Operation::Read).await?;
let reader = FtpReader::new(ftp_stream, path.to_string(), args).await?;
Ok((RpRead::new(), reader))
}

Is this what you mean?

  1. I also see sftp implementation uses another crate openssh_sftp_client.

I'm not sure what this means. Are you attempting to use suppaftp to connect to an SFTP server?


Welcome to the start of our discussion. I'm willing to delve deeply into this topic with you. I believe PR comments are not the appropriate place for this.

@Xuanwo Xuanwo merged commit fa08fbe into apache:main Oct 20, 2024
229 checks passed
@erickguan
Copy link
Contributor Author

erickguan commented Oct 20, 2024

@Xuanwo 1. Yes, I had not being accurate. I mean to add the corresponding blocking APIs. For example, blocking_read in your example.

  1. Yes, I am proposing to use one crate to support these two services. If you consider worthwhile continuing the thread, I will open a new issue. My bad that suppaftp doesn't support SFTP.

Welcome to the start of our discussion. I'm willing to delve deeply into this topic with you. I believe PR comments are not the appropriate place for this.

Totally! Thanks for opening the venue for discussions. Created #5214

@erickguan erickguan deleted the modified-timestamp-ftp branch October 20, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants