Skip to content

Comments

Fix connection failure for sftp with only username#1500

Merged
niveathika merged 4 commits intoballerina-platform:masterfrom
niveathika:sftp
Oct 30, 2025
Merged

Fix connection failure for sftp with only username#1500
niveathika merged 4 commits intoballerina-platform:masterfrom
niveathika:sftp

Conversation

@niveathika
Copy link
Contributor

@niveathika niveathika commented Oct 23, 2025

Purpose

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

Examples

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.52%. Comparing base (80d7de6) to head (ec002b7).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...ain/java/io/ballerina/stdlib/ftp/util/FtpUtil.java 84.21% 1 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Credentials record to be optional
  • Updated password handling logic to support null values for SFTP protocol
  • Added protocol parameter to getAuthMap method 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.

This comment was marked as outdated.

This comment was marked as outdated.

@niveathika niveathika added the Skip GraalVM Check This will skip the GraalVM compatibility check label Oct 23, 2025
@sonarqubecloud
Copy link

Copy link
Member

@SachinAkash01 SachinAkash01 left a comment

Choose a reason for hiding this comment

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

LGTM

@niveathika niveathika merged commit bf0199c into ballerina-platform:master Oct 30, 2025
8 checks passed
@niveathika niveathika deleted the sftp branch February 16, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip GraalVM Check This will skip the GraalVM compatibility check

Projects

None yet

4 participants