Repository navigation
feat(services/sftp): allow setting control_directory - #8626
Merged
Merged
Conversation
Xuanwo
reviewed
Nov 22, 2026
Xuanwo
left a comment
Member
There was a problem hiding this comment.
AI-generated review.
The Rust SftpConfig.control_directory wiring and SFTP behavior tests look good. The only remaining blocker is check_generated failing on 794075d8 because adding a field to SftpConfig updates four generated files:
bindings/dotnet/OpenDAL/ServiceConfig/SftpServiceConfig.csbindings/java/src/main/java/org/apache/opendal/ServiceConfig.javabindings/python/python/opendal/config.pywebsite/data/services.json
Could you run the config generators and commit those regenerated files so check_generated passes? (Failing job: https://github.com/apache/opendal/actions/runs/44979486979/job/137076631244)
Mola-maker
requested review from
Zheaoli,
messense and
tisonkun
as code owners
November 22, 2026 04:05
Xuanwo
approved these changes
Nov 22, 2026
Xuanwo
left a comment
Member
There was a problem hiding this comment.
AI-generated review.
Thanks for adding control_directory and updating the generated configs. LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #3963
Rationale for this change
The SFTP backend offers no way to set the SSH control directory.
The old code defaulted it to the runtime directory, which is not always suitable.
What changes are included in this PR?
control_directoryoption toSftpConfigandSftpBuilder.$XDG_STATE_HOMEor$HOME/.local/state, falling back to the current directory.Note: #7977 ports sftp from openssh to russh and touches the same files.
This may need a rebase if that lands first.
Are there any user-facing changes?
Yes. Users can now set the directory holding the SSH control socket.
Test
cargo test -p opendal-service-sftp --lib: 11 passed, 0 failed.cargo clippy -p opendal-service-sftp --all-targets --all-features: clean.cargo fmt --all -- --check: clean.AI Usage Statement
Screenshots
Before the fix
After the fix
Test suites