Skip to content

feat(services/sftp): support copy and read_seek#2267

Merged
Xuanwo merged 4 commits intoapache:mainfrom
silver-ymz:feat/sftp-copy-seek
May 17, 2023
Merged

feat(services/sftp): support copy and read_seek#2267
Xuanwo merged 4 commits intoapache:mainfrom
silver-ymz:feat/sftp-copy-seek

Conversation

@silver-ymz
Copy link
Copy Markdown
Member

Update:

  • add copyable setting in SftpBuilder to make user provide info about remote server extension
  • bump openssh-sftp-client version to 0.13.5 to fix the bug of AsyncSeek
  • add read_can_seek in Capability

Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
@silver-ymz silver-ymz changed the title Feat/sftp copy seek feat(services/sftp): support copy and read_seek May 17, 2023
@suyanhanx
Copy link
Copy Markdown
Member

Return an error when call copy if user did not enable copy?

Comment thread core/src/services/sftp/backend.rs Outdated
@Xuanwo
Copy link
Copy Markdown
Member

Xuanwo commented May 17, 2023

Return an error when call copy if user did not enable copy?

We will handle this in general in the future, for example, check capability before calling.

Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
@silver-ymz
Copy link
Copy Markdown
Member Author

silver-ymz commented May 17, 2023

Return an error when call copy if user did not enable copy?

https://github.com/apache/incubator-opendal/blob/9cce4d31418567ed2fc8e7178f11a48ac9cbdede/core/src/services/sftp/backend.rs#L391

https://github.com/apache/incubator-opendal/blob/9cce4d31418567ed2fc8e7178f11a48ac9cbdede/core/src/services/sftp/error.rs#L34

Current implementation is to return an error of Unsupported if the remote server doesn't support.

Copy link
Copy Markdown
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.

Thanks!

@Xuanwo Xuanwo merged commit 43df0cc into apache:main May 17, 2023
@silver-ymz silver-ymz deleted the feat/sftp-copy-seek branch May 17, 2023 15:53
@silver-ymz
Copy link
Copy Markdown
Member Author

And may I ask is there anything else need to do about sftp? I think all available features have done.

@Xuanwo
Copy link
Copy Markdown
Member

Xuanwo commented May 17, 2023

And may I ask is there anything else need to do about sftp?

I guess we don't need to do more until we have user's feature request.

@Xuanwo Xuanwo mentioned this pull request May 23, 2023
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.

3 participants