Fix connection failure for sftp with only username#1500
Fix connection failure for sftp with only username#1500niveathika merged 4 commits intoballerina-platform:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1500 +/- ##
============================================
- Coverage 84.86% 83.52% -1.34%
- Complexity 244 345 +101
============================================
Files 28 37 +9
Lines 1295 1651 +356
Branches 156 244 +88
============================================
+ Hits 1099 1379 +280
- Misses 133 166 +33
- Partials 63 106 +43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes SFTP connection failures when only a username is provided without a password, addressing authentication handling for key-based SFTP connections.
Key Changes
- Modified password field in
Credentialsrecord to be optional - Updated password handling logic to support null values for SFTP protocol
- Added protocol parameter to
getAuthMapmethod for protocol-specific authentication handling
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| native/src/main/java/io/ballerina/stdlib/ftp/util/FtpUtil.java | Enhanced password handling to support null values for SFTP and added protocol-aware authentication |
| native/src/main/java/io/ballerina/stdlib/ftp/client/FtpClient.java | Updated method call to pass protocol parameter for authentication mapping |
| ballerina/commons.bal | Changed password field to optional in Credentials record |
| gradle.properties | Bumped version to 2.15.0-SNAPSHOT |
| ballerina/Dependencies.toml | Updated package version to 2.15.0 |
| ballerina/CompilerPlugin.toml | Updated compiler plugin JAR path to 2.15.0-SNAPSHOT |
| ballerina/Ballerina.toml | Updated package and native library versions to 2.15.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|



Purpose
Fixes wso2/product-ballerina-integrator#674
Fixes wso2/product-ballerina-integrator#675
Fixes ballerina-platform/ballerina-library#8155
Examples
Checklist