Skip to content

4446 FTP#4465

Open
ivicac wants to merge 2 commits intomasterfrom
4446
Open

4446 FTP#4465
ivicac wants to merge 2 commits intomasterfrom
4446

Conversation

@ivicac
Copy link
Contributor

@ivicac ivicac commented Mar 9, 2026

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

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

Adds a new ftp component module to the server components set, providing FTP and SFTP file operations (upload, download, list, delete, rename) via a shared RemoteFileClient abstraction.

Changes:

  • Registers the new Gradle module server:libs:modules:components:ftp and adds its dependencies (commons-net + sshj).
  • Introduces the FTP component handler, connection definition, actions, and shared FTP/SFTP client implementations.
  • Adds a component definition snapshot test and generated definition JSON.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
settings.gradle.kts Adds the new ftp component module include.
server/libs/modules/components/ftp/build.gradle.kts Declares the FTP component module version and dependencies.
server/libs/modules/components/ftp/PLAN.md Documents the FTP/SFTP support implementation plan and changes.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/FtpComponentHandler.java Registers the FTP component, connection, actions, and tool cluster elements.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/connection/FtpConnection.java Defines connection properties including the new SFTP boolean option.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/constant/FtpConstants.java Adds constants used across actions/connection/client.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/RemoteFileClient.java Adds protocol-selecting factory and common remote file operations API.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/FtpRemoteFileClient.java Implements FTP operations using Apache Commons Net.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/util/SftpRemoteFileClient.java Implements SFTP operations using sshj.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpUploadFileAction.java Adds upload action with optional directory creation.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpDownloadFileAction.java Adds download action outputting a FileEntry.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpListAction.java Adds directory listing action with optional recursion.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpDeleteAction.java Adds delete action with optional recursive directory deletion.
server/libs/modules/components/ftp/src/main/java/com/bytechef/component/ftp/action/FtpRenameAction.java Adds rename/move action with optional destination directory creation.
server/libs/modules/components/ftp/src/test/java/com/bytechef/component/ftp/FtpComponentHandlerTest.java Adds snapshot test asserting the component definition JSON.
server/libs/modules/components/ftp/src/test/resources/definition/ftp_v1.json Adds generated v1 component definition snapshot.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ivicac ivicac removed the request for review from igorbeslic March 9, 2026 09:03
ivicac and others added 2 commits March 10, 2026 09:06
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Stream file downloads via PipedInputStream instead of buffering entire file in memory
- Fix isDirectory() to use changeWorkingDirectory for non-existent paths
- Check makeDirectory() return value and throw ProviderException on failure
- Return null for missing modifiedAt instead of empty string
- Load known_hosts for SFTP host key verification, fall back to PromiscuousVerifier
- Remove hardcoded port default; auto-select 21 (FTP) or 22 (SFTP) based on protocol

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

@ivicac ivicac requested a review from igorbeslic March 10, 2026 08:48
Copy link
Collaborator

@igorbeslic igorbeslic left a comment

Choose a reason for hiding this comment

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

Starting review

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