Skip to content

Comments

Remove skipping preprocessed files based on the filename#1486

Merged
daneshk merged 9 commits intoballerina-platform:masterfrom
daneshk:deduplicate_issue
Jun 19, 2025
Merged

Remove skipping preprocessed files based on the filename#1486
daneshk merged 9 commits intoballerina-platform:masterfrom
daneshk:deduplicate_issue

Conversation

@daneshk
Copy link
Member

@daneshk daneshk commented Jun 16, 2025

Purpose

Fixes: ballerina-platform/ballerina-library#8035
Addresses the issue of FTP listener not processing files with the same name.

Examples

Checklist

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

ThisaruGuruge
ThisaruGuruge previously approved these changes Jun 16, 2025
@codecov
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.48%. Comparing base (12854d6) to head (c73611c).
Report is 11 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1486      +/-   ##
============================================
+ Coverage     83.38%   83.48%   +0.10%     
+ Complexity      341      338       -3     
============================================
  Files            37       37              
  Lines          1631     1629       -2     
  Branches        239      238       -1     
============================================
  Hits           1360     1360              
+ Misses          170      165       -5     
- Partials        101      104       +3     

☔ 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.

@daneshk daneshk requested a review from Copilot June 18, 2025 04:23
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 removes the logic that skips files with the same name so that the FTP listener will reprocess them, updates test setup to use separate “in”/“out” directories, and bumps the module version to 2.13.2.

  • Initialize in and out folders in the mock SFTP server
  • Drop the processed.contains(path) check to allow reprocessing same-named files
  • Update tests and configuration to use /in and /out paths and bump version

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test-utils/src/main/java/.../MockFtpServer.java Create in/out directories on startup
native/src/main/java/.../RemoteFileSystemConsumer.java Remove processed-path skip logic
changelog.md Add unreleased entry for same-name fix
ballerina/tests/secure_listener_endpoint_with_caller_test.bal Adjust tests to new /in/out directory flow
ballerina/Dependencies.toml Bump package version to 2.13.2
ballerina/CompilerPlugin.toml Update compiler plugin path to 2.13.2-SNAPSHOT
ballerina/Ballerina.toml Align module version and native jar snapshot
Comments suppressed due to low confidence (2)

changelog.md:6

  • [nitpick] Align the "unreleased" header with Keep a Changelog conventions, for example use "## [Unreleased]".
## unreleased

native/src/main/java/io/ballerina/stdlib/ftp/transport/server/RemoteFileSystemConsumer.java:225

  • Since the skip logic is removed, consider deleting the processed collection and any related unused fields or imports to clean up dead code.
        String path = file.getName().getURI();

daneshk and others added 2 commits June 18, 2025 23:27
Co-authored-by: Nuvindu Nirmana <63797478+Nuvindu@users.noreply.github.com>
@sonarqubecloud
Copy link

@daneshk daneshk merged commit 56a0cd9 into ballerina-platform:master Jun 19, 2025
8 checks passed
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.

[Bug]: FTP listener stops working if file name is same?

3 participants