Bug 39190 - Rework new (S)FTP classes to be polymorphic classes
Summary: Rework new (S)FTP classes to be polymorphic classes
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 35761 39488
Blocks: 38115
  Show dependency treegraph
 
Reported: 2025-02-24 13:06 UTC by Martin Renvoize (ashimema)
Modified: 2025-09-15 14:40 UTC (History)
7 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 39190: Add $result to Koha::Objects `object_class` calls (2.31 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.20 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.61 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.70 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.09 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (1.99 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.19 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.69 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.47 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.60 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (24.75 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (2.94 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.69 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (764 bytes, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.89 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.10 KB, patch)
2025-02-24 13:14 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Skip polymorphic classes in TestBuilder tests (1.33 KB, patch)
2025-02-24 13:15 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add $result to Koha::Objects `object_class` calls (2.31 KB, patch)
2025-03-13 14:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.20 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.61 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.70 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.09 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (1.99 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.19 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.69 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.47 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.60 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (24.75 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (2.94 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.69 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (764 bytes, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.89 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.10 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Skip polymorphic classes in TestBuilder tests (1.33 KB, patch)
2025-03-13 14:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add $result to Koha::Objects `object_class` calls (2.31 KB, patch)
2025-03-17 15:20 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.20 KB, patch)
2025-03-17 15:20 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.61 KB, patch)
2025-03-17 15:20 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.70 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.09 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (1.99 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.19 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.69 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.47 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.60 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (24.75 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (2.94 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.69 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (764 bytes, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.89 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.10 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Use introspection in TestBuilder tests (4.93 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.76 KB, patch)
2025-03-17 15:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add $result to Koha::Objects `object_class` calls (2.38 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.27 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.68 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.77 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.16 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.06 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.26 KB, patch)
2025-03-21 13:36 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.76 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.54 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.67 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (24.82 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.01 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.75 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (835 bytes, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.96 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.17 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Use introspection in TestBuilder tests (5.00 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.83 KB, patch)
2025-03-21 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 39190: Add $result to Koha::Objects `object_class` calls (2.37 KB, patch)
2025-03-24 15:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.25 KB, patch)
2025-03-24 15:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.66 KB, patch)
2025-03-24 15:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.76 KB, patch)
2025-03-24 15:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.14 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.04 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.24 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.18 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.52 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.65 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (24.81 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.00 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.74 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (819 bytes, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.94 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.16 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Use introspection in TestBuilder tests (4.99 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.81 KB, patch)
2025-03-24 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.67 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.66 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.76 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.14 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.04 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.24 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.18 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.52 KB, patch)
2025-03-31 12:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.65 KB, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (24.81 KB, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.00 KB, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.74 KB, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (819 bytes, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.94 KB, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.16 KB, patch)
2025-03-31 12:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.66 KB, patch)
2025-03-31 12:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.67 KB, patch)
2025-03-31 12:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.66 KB, patch)
2025-03-31 12:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.76 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.14 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.04 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.24 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.18 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.52 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.65 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (25.49 KB, patch)
2025-03-31 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.00 KB, patch)
2025-03-31 12:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.74 KB, patch)
2025-03-31 12:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (819 bytes, patch)
2025-03-31 12:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.94 KB, patch)
2025-03-31 12:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.16 KB, patch)
2025-03-31 12:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.66 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.67 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.66 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.76 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.14 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.04 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: DBIC Update (4.24 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.25 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.52 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.65 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (25.49 KB, patch)
2025-08-01 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.00 KB, patch)
2025-08-01 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.49 KB, patch)
2025-08-01 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (819 bytes, patch)
2025-08-01 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (1.94 KB, patch)
2025-08-01 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.16 KB, patch)
2025-08-01 14:00 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.71 KB, patch)
2025-08-29 21:22 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.79 KB, patch)
2025-08-29 21:22 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.74 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.81 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.20 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.10 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.31 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.58 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.71 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (25.54 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.05 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.54 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (1008 bytes, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (2.00 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.21 KB, patch)
2025-08-29 21:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename 'sftp_servers' to 'file_transports' (4.51 KB, patch)
2025-08-29 21:24 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Adjust schema to new structure (2.98 KB, patch)
2025-08-29 21:24 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Adjust permission across the board (9.20 KB, patch)
2025-08-29 21:24 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Fix circular dependency causing C3 MRO failures (1.39 KB, patch)
2025-08-29 21:24 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Regression tests for polymorphic object creation (5.51 KB, patch)
2025-08-30 15:35 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Fix polymorphic object creation in Koha::Objects (2.27 KB, patch)
2025-08-30 15:35 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename admin interface from sftp_servers to file_transports (13.18 KB, patch)
2025-08-30 15:35 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename API from sftp_servers to file_transports (34.08 KB, patch)
2025-08-30 15:35 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename id => file_transport_id and remove mapping (2.72 KB, patch)
2025-08-30 15:36 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.71 KB, patch)
2025-09-15 14:38 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update polymorhpic base class to identify itself (1.71 KB, patch)
2025-09-15 14:38 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rework (S)FTP into File::Transport classes (28.79 KB, patch)
2025-09-15 14:38 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Add key handling to SFTP Transports (7.74 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update API to use new Transport classes (2.81 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update sftp_servers page to use new objects (4.20 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update status to longtext (2.10 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Re-implement the connection testing (109.31 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update api tests for status format change (2.58 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Start of recording status updates from abort (1.71 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Remove old objects (25.54 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Remove test routine from API (3.05 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Remove replaced test_connection (4.54 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Redirect Schema to new classes (1008 bytes, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Update API's to reference new classes (2.00 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Add transport to test (4.21 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename 'sftp_servers' to 'file_transports' (4.51 KB, patch)
2025-09-15 14:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Adjust schema to new structure (2.98 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Adjust permission across the board (9.20 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Fix circular dependency causing C3 MRO failures (1.44 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Regression tests for polymorphic object creation (5.51 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename admin interface from sftp_servers to file_transports (13.18 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename API from sftp_servers to file_transports (34.08 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39190: Rename id => file_transport_id and remove mapping (4.66 KB, patch)
2025-09-15 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2025-02-24 13:06:17 UTC
We add a new UI for managing (S)FTP servers with bug 35761.

We want to use these new configurations in other bugs, but the classes currently are just storage and don't offer the transport code.

This patchset updates the classes to implement transport methods utilising polymorphism.

We also clean up the API's a little to follow more RESTful best practices.
Comment 1 Martin Renvoize (ashimema) 2025-02-24 13:14:22 UTC
Created attachment 178555 [details] [review]
Bug 39190: Add $result to Koha::Objects `object_class` calls

This allows us to do dynamic polymorphic classing on calls to 'find',
'find_or_create', 'single', 'next', 'last' and 'as_list' etc.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 2 Martin Renvoize (ashimema) 2025-02-24 13:14:25 UTC
Created attachment 178556 [details] [review]
Bug 39190: Rework (S)FTP into File::Transport classes

This patch adds polymorphic transport classes to Koha for FTP and SFTP
file transport configurations.

We introduce a base class for interacting with the base configuration
storage and subclasses to impliment the protocol specific transport
handling.
Comment 3 Martin Renvoize (ashimema) 2025-02-24 13:14:27 UTC
Created attachment 178557 [details] [review]
Bug 39190: Add key handling to SFTP Transports

We add triggers to store in the base class and then use them in the SFTP
transport class to write out the key file to the filesystem for later
use in connect.
Comment 4 Martin Renvoize (ashimema) 2025-02-24 13:14:29 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize (ashimema) 2025-02-24 13:14:32 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize (ashimema) 2025-02-24 13:14:34 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize (ashimema) 2025-02-24 13:14:36 UTC Comment hidden (obsolete)
Comment 8 Martin Renvoize (ashimema) 2025-02-24 13:14:39 UTC Comment hidden (obsolete)
Comment 9 Martin Renvoize (ashimema) 2025-02-24 13:14:42 UTC Comment hidden (obsolete)
Comment 10 Martin Renvoize (ashimema) 2025-02-24 13:14:44 UTC Comment hidden (obsolete)
Comment 11 Martin Renvoize (ashimema) 2025-02-24 13:14:47 UTC Comment hidden (obsolete)
Comment 12 Martin Renvoize (ashimema) 2025-02-24 13:14:49 UTC Comment hidden (obsolete)
Comment 13 Martin Renvoize (ashimema) 2025-02-24 13:14:51 UTC Comment hidden (obsolete)
Comment 14 Martin Renvoize (ashimema) 2025-02-24 13:14:54 UTC Comment hidden (obsolete)
Comment 15 Martin Renvoize (ashimema) 2025-02-24 13:14:56 UTC Comment hidden (obsolete)
Comment 16 Martin Renvoize (ashimema) 2025-02-24 13:14:58 UTC Comment hidden (obsolete)
Comment 17 Martin Renvoize (ashimema) 2025-02-24 13:15:01 UTC Comment hidden (obsolete)
Comment 18 Martin Renvoize (ashimema) 2025-03-13 14:35:58 UTC Comment hidden (obsolete)
Comment 19 Martin Renvoize (ashimema) 2025-03-13 14:36:02 UTC Comment hidden (obsolete)
Comment 20 Martin Renvoize (ashimema) 2025-03-13 14:36:04 UTC Comment hidden (obsolete)
Comment 21 Martin Renvoize (ashimema) 2025-03-13 14:36:06 UTC Comment hidden (obsolete)
Comment 22 Martin Renvoize (ashimema) 2025-03-13 14:36:09 UTC Comment hidden (obsolete)
Comment 23 Martin Renvoize (ashimema) 2025-03-13 14:36:11 UTC Comment hidden (obsolete)
Comment 24 Martin Renvoize (ashimema) 2025-03-13 14:36:14 UTC Comment hidden (obsolete)
Comment 25 Martin Renvoize (ashimema) 2025-03-13 14:36:17 UTC Comment hidden (obsolete)
Comment 26 Martin Renvoize (ashimema) 2025-03-13 14:36:20 UTC Comment hidden (obsolete)
Comment 27 Martin Renvoize (ashimema) 2025-03-13 14:36:22 UTC Comment hidden (obsolete)
Comment 28 Martin Renvoize (ashimema) 2025-03-13 14:36:25 UTC Comment hidden (obsolete)
Comment 29 Martin Renvoize (ashimema) 2025-03-13 14:36:28 UTC Comment hidden (obsolete)
Comment 30 Martin Renvoize (ashimema) 2025-03-13 14:36:31 UTC Comment hidden (obsolete)
Comment 31 Martin Renvoize (ashimema) 2025-03-13 14:36:33 UTC Comment hidden (obsolete)
Comment 32 Martin Renvoize (ashimema) 2025-03-13 14:36:36 UTC Comment hidden (obsolete)
Comment 33 Martin Renvoize (ashimema) 2025-03-13 14:36:38 UTC Comment hidden (obsolete)
Comment 34 Martin Renvoize (ashimema) 2025-03-13 14:36:41 UTC Comment hidden (obsolete)
Comment 35 Kyle M Hall (khall) 2025-03-17 11:40:25 UTC
Getting at least one unit test failure:

kohadev-koha@kohadevbox:koha((63831c2dd5e...))$ prove t/db_dependent/TestBuilder.t
t/db_dependent/TestBuilder.t .. 3/16
        #   Failed test 'Testing Koha::File::Transports'
        #   at t/db_dependent/TestBuilder.t line 495.
        #          got: 'Koha::File::Transport::FTP'
        #     expected: 'Koha::File::Transport'
        # Looks like you failed 1 test of 1032.

    #   Failed test 'Test all classes'
    #   at t/db_dependent/TestBuilder.t line 515.
    # Looks like you failed 1 test of 5.
t/db_dependent/TestBuilder.t .. 12/16
#   Failed test 'build_object() tests'
#   at t/db_dependent/TestBuilder.t line 535.
# Looks like you failed 1 test of 16.
t/db_dependent/TestBuilder.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/16 subtests

Test Summary Report
-------------------
t/db_dependent/TestBuilder.t (Wstat: 256 (exited 1) Tests: 16 Failed: 1)
  Failed test:  12
  Non-zero exit status: 1
Files=1, Tests=16, 26 wallclock secs ( 0.03 usr  0.01 sys + 20.08 cusr  4.58 csys = 24.70 CPU)
Result: FAIL
Comment 36 Martin Renvoize (ashimema) 2025-03-17 15:20:50 UTC Comment hidden (obsolete)
Comment 37 Martin Renvoize (ashimema) 2025-03-17 15:20:53 UTC Comment hidden (obsolete)
Comment 38 Martin Renvoize (ashimema) 2025-03-17 15:20:56 UTC Comment hidden (obsolete)
Comment 39 Martin Renvoize (ashimema) 2025-03-17 15:21:00 UTC Comment hidden (obsolete)
Comment 40 Martin Renvoize (ashimema) 2025-03-17 15:21:03 UTC Comment hidden (obsolete)
Comment 41 Martin Renvoize (ashimema) 2025-03-17 15:21:06 UTC Comment hidden (obsolete)
Comment 42 Martin Renvoize (ashimema) 2025-03-17 15:21:09 UTC Comment hidden (obsolete)
Comment 43 Martin Renvoize (ashimema) 2025-03-17 15:21:13 UTC Comment hidden (obsolete)
Comment 44 Martin Renvoize (ashimema) 2025-03-17 15:21:16 UTC Comment hidden (obsolete)
Comment 45 Martin Renvoize (ashimema) 2025-03-17 15:21:19 UTC Comment hidden (obsolete)
Comment 46 Martin Renvoize (ashimema) 2025-03-17 15:21:22 UTC Comment hidden (obsolete)
Comment 47 Martin Renvoize (ashimema) 2025-03-17 15:21:25 UTC Comment hidden (obsolete)
Comment 48 Martin Renvoize (ashimema) 2025-03-17 15:21:29 UTC Comment hidden (obsolete)
Comment 49 Martin Renvoize (ashimema) 2025-03-17 15:21:33 UTC Comment hidden (obsolete)
Comment 50 Martin Renvoize (ashimema) 2025-03-17 15:21:36 UTC Comment hidden (obsolete)
Comment 51 Martin Renvoize (ashimema) 2025-03-17 15:21:39 UTC Comment hidden (obsolete)
Comment 52 Martin Renvoize (ashimema) 2025-03-17 15:21:42 UTC
Created attachment 179412 [details] [review]
Bug 39190: Use introspection in TestBuilder tests

We update the testbuilder tests here to look for signs of a polymorphic
class map and use it to test the different class options for this base
class
Comment 53 Martin Renvoize (ashimema) 2025-03-17 15:21:45 UTC
Created attachment 179413 [details] [review]
Bug 39190: Update polymorhpic base class to identify itself

This patch adds _polymorphic_field and _polymorphic_map private methods
to the Koha::File::Transports class to more clearly identify this as a
polymorphic class base for TestBuilder.
Comment 54 Kyle M Hall (khall) 2025-03-21 13:36:37 UTC Comment hidden (obsolete)
Comment 55 Kyle M Hall (khall) 2025-03-21 13:36:45 UTC Comment hidden (obsolete)
Comment 56 Kyle M Hall (khall) 2025-03-21 13:36:47 UTC Comment hidden (obsolete)
Comment 57 Kyle M Hall (khall) 2025-03-21 13:36:50 UTC Comment hidden (obsolete)
Comment 58 Kyle M Hall (khall) 2025-03-21 13:36:52 UTC Comment hidden (obsolete)
Comment 59 Kyle M Hall (khall) 2025-03-21 13:36:55 UTC Comment hidden (obsolete)
Comment 60 Kyle M Hall (khall) 2025-03-21 13:36:58 UTC Comment hidden (obsolete)
Comment 61 Kyle M Hall (khall) 2025-03-21 13:37:01 UTC Comment hidden (obsolete)
Comment 62 Kyle M Hall (khall) 2025-03-21 13:37:03 UTC Comment hidden (obsolete)
Comment 63 Kyle M Hall (khall) 2025-03-21 13:37:06 UTC Comment hidden (obsolete)
Comment 64 Kyle M Hall (khall) 2025-03-21 13:37:09 UTC Comment hidden (obsolete)
Comment 65 Kyle M Hall (khall) 2025-03-21 13:37:11 UTC Comment hidden (obsolete)
Comment 66 Kyle M Hall (khall) 2025-03-21 13:37:14 UTC Comment hidden (obsolete)
Comment 67 Kyle M Hall (khall) 2025-03-21 13:37:18 UTC Comment hidden (obsolete)
Comment 68 Kyle M Hall (khall) 2025-03-21 13:37:21 UTC Comment hidden (obsolete)
Comment 69 Kyle M Hall (khall) 2025-03-21 13:37:23 UTC Comment hidden (obsolete)
Comment 70 Kyle M Hall (khall) 2025-03-21 13:37:26 UTC Comment hidden (obsolete)
Comment 71 Kyle M Hall (khall) 2025-03-21 13:37:29 UTC Comment hidden (obsolete)
Comment 72 Kyle M Hall (khall) 2025-03-21 13:54:02 UTC
Transport is listed twice in the form for sftp_servers.pl
Comment 73 Martin Renvoize (ashimema) 2025-03-24 15:57:46 UTC Comment hidden (obsolete)
Comment 74 Martin Renvoize (ashimema) 2025-03-24 15:57:49 UTC Comment hidden (obsolete)
Comment 75 Martin Renvoize (ashimema) 2025-03-24 15:57:53 UTC Comment hidden (obsolete)
Comment 76 Martin Renvoize (ashimema) 2025-03-24 15:57:56 UTC Comment hidden (obsolete)
Comment 77 Martin Renvoize (ashimema) 2025-03-24 15:58:00 UTC Comment hidden (obsolete)
Comment 78 Martin Renvoize (ashimema) 2025-03-24 15:58:03 UTC Comment hidden (obsolete)
Comment 79 Martin Renvoize (ashimema) 2025-03-24 15:58:06 UTC Comment hidden (obsolete)
Comment 80 Martin Renvoize (ashimema) 2025-03-24 15:58:10 UTC Comment hidden (obsolete)
Comment 81 Martin Renvoize (ashimema) 2025-03-24 15:58:13 UTC Comment hidden (obsolete)
Comment 82 Martin Renvoize (ashimema) 2025-03-24 15:58:16 UTC Comment hidden (obsolete)
Comment 83 Martin Renvoize (ashimema) 2025-03-24 15:58:19 UTC Comment hidden (obsolete)
Comment 84 Martin Renvoize (ashimema) 2025-03-24 15:58:22 UTC Comment hidden (obsolete)
Comment 85 Martin Renvoize (ashimema) 2025-03-24 15:58:25 UTC Comment hidden (obsolete)
Comment 86 Martin Renvoize (ashimema) 2025-03-24 15:58:28 UTC Comment hidden (obsolete)
Comment 87 Martin Renvoize (ashimema) 2025-03-24 15:58:31 UTC Comment hidden (obsolete)
Comment 88 Martin Renvoize (ashimema) 2025-03-24 15:58:35 UTC Comment hidden (obsolete)
Comment 89 Martin Renvoize (ashimema) 2025-03-24 15:58:39 UTC Comment hidden (obsolete)
Comment 90 Martin Renvoize (ashimema) 2025-03-24 15:58:42 UTC Comment hidden (obsolete)
Comment 91 Martin Renvoize (ashimema) 2025-03-24 16:00:00 UTC
(In reply to Kyle M Hall (khall) from comment #72)
> Transport is listed twice in the form for sftp_servers.pl

Well spotted, fixed inline now :)

Thanks for reviewing
Comment 92 Martin Renvoize (ashimema) 2025-03-31 12:21:19 UTC
Created attachment 179992 [details] [review]
Bug 39190: Rework (S)FTP into File::Transport classes

This patch adds polymorphic transport classes to Koha for FTP and SFTP
file transport configurations.

We introduce a base class for interacting with the base configuration
storage and subclasses to impliment the protocol specific transport
handling.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 93 Martin Renvoize (ashimema) 2025-03-31 12:21:23 UTC
Created attachment 179993 [details] [review]
Bug 39190: Add key handling to SFTP Transports

We add triggers to store in the base class and then use them in the SFTP
transport class to write out the key file to the filesystem for later
use in connect.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 94 Martin Renvoize (ashimema) 2025-03-31 12:21:26 UTC
Created attachment 179994 [details] [review]
Bug 39190: Update API to use new Transport classes

As the title says, use the new polymorphic classes in the API
controllers

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 95 Martin Renvoize (ashimema) 2025-03-31 12:21:32 UTC
Created attachment 179995 [details] [review]
Bug 39190: Update sftp_servers page to use new objects

Similar to the previous commit, this time we're updating the page
controller to use the new polymorphic classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 96 Martin Renvoize (ashimema) 2025-03-31 12:21:36 UTC
Created attachment 179996 [details] [review]
Bug 39190: Update status to longtext

Update status field to store longtext so we can sore more details
information about connection statuses from test connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 97 Martin Renvoize (ashimema) 2025-03-31 12:21:40 UTC
Created attachment 179997 [details] [review]
Bug 39190: DBIC Update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 98 Martin Renvoize (ashimema) 2025-03-31 12:21:46 UTC
Created attachment 179998 [details] [review]
Bug 39190: Re-implement the connection testing

We now use background jobs triggered by Transport->store to update the
connection status.

Status is now a json blob with more details, so we update the api
definition to reflect that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 99 Martin Renvoize (ashimema) 2025-03-31 12:21:52 UTC
Created attachment 179999 [details] [review]
Bug 39190: Update api tests for status format change

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 100 Martin Renvoize (ashimema) 2025-03-31 12:22:00 UTC
Created attachment 180000 [details] [review]
Bug 39190: Start of recording status updates from abort

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 101 Martin Renvoize (ashimema) 2025-03-31 12:22:09 UTC
Created attachment 180001 [details] [review]
Bug 39190: Remove old objects

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 102 Martin Renvoize (ashimema) 2025-03-31 12:22:19 UTC
Created attachment 180002 [details] [review]
Bug 39190: Remove test routine from API

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 103 Martin Renvoize (ashimema) 2025-03-31 12:22:28 UTC
Created attachment 180003 [details] [review]
Bug 39190: Remove replaced test_connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 104 Martin Renvoize (ashimema) 2025-03-31 12:22:36 UTC
Created attachment 180004 [details] [review]
Bug 39190: Redirect Schema to new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 105 Martin Renvoize (ashimema) 2025-03-31 12:22:46 UTC
Created attachment 180005 [details] [review]
Bug 39190: Update API's to reference new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 106 Martin Renvoize (ashimema) 2025-03-31 12:22:49 UTC
Created attachment 180006 [details] [review]
Bug 39190: Add transport to test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 107 Martin Renvoize (ashimema) 2025-03-31 12:26:49 UTC
Created attachment 180010 [details] [review]
Bug 39190: Update polymorhpic base class to identify itself

This patch adds _polymorphic_field and _polymorphic_map private methods
to the Koha::File::Transports class to more clearly identify this as a
polymorphic class base for TestBuilder.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 108 Martin Renvoize (ashimema) 2025-03-31 12:26:54 UTC
Created attachment 180011 [details] [review]
Bug 39190: Rework (S)FTP into File::Transport classes

This patch adds polymorphic transport classes to Koha for FTP and SFTP
file transport configurations.

We introduce a base class for interacting with the base configuration
storage and subclasses to impliment the protocol specific transport
handling.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 109 Martin Renvoize (ashimema) 2025-03-31 12:26:59 UTC
Created attachment 180012 [details] [review]
Bug 39190: Add key handling to SFTP Transports

We add triggers to store in the base class and then use them in the SFTP
transport class to write out the key file to the filesystem for later
use in connect.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 110 Martin Renvoize (ashimema) 2025-03-31 12:27:03 UTC
Created attachment 180013 [details] [review]
Bug 39190: Update API to use new Transport classes

As the title says, use the new polymorphic classes in the API
controllers

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 111 Martin Renvoize (ashimema) 2025-03-31 12:27:07 UTC
Created attachment 180014 [details] [review]
Bug 39190: Update sftp_servers page to use new objects

Similar to the previous commit, this time we're updating the page
controller to use the new polymorphic classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 112 Martin Renvoize (ashimema) 2025-03-31 12:27:15 UTC
Created attachment 180015 [details] [review]
Bug 39190: Update status to longtext

Update status field to store longtext so we can sore more details
information about connection statuses from test connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 113 Martin Renvoize (ashimema) 2025-03-31 12:27:23 UTC
Created attachment 180016 [details] [review]
Bug 39190: DBIC Update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 114 Martin Renvoize (ashimema) 2025-03-31 12:27:32 UTC
Created attachment 180017 [details] [review]
Bug 39190: Re-implement the connection testing

We now use background jobs triggered by Transport->store to update the
connection status.

Status is now a json blob with more details, so we update the api
definition to reflect that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 115 Martin Renvoize (ashimema) 2025-03-31 12:27:41 UTC
Created attachment 180018 [details] [review]
Bug 39190: Update api tests for status format change

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 116 Martin Renvoize (ashimema) 2025-03-31 12:27:44 UTC
Created attachment 180019 [details] [review]
Bug 39190: Start of recording status updates from abort

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 117 Martin Renvoize (ashimema) 2025-03-31 12:27:54 UTC
Created attachment 180020 [details] [review]
Bug 39190: Remove old objects

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 118 Martin Renvoize (ashimema) 2025-03-31 12:28:02 UTC
Created attachment 180021 [details] [review]
Bug 39190: Remove test routine from API

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 119 Martin Renvoize (ashimema) 2025-03-31 12:28:09 UTC
Created attachment 180022 [details] [review]
Bug 39190: Remove replaced test_connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 120 Martin Renvoize (ashimema) 2025-03-31 12:28:16 UTC
Created attachment 180023 [details] [review]
Bug 39190: Redirect Schema to new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 121 Martin Renvoize (ashimema) 2025-03-31 12:28:24 UTC
Created attachment 180024 [details] [review]
Bug 39190: Update API's to reference new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 122 Martin Renvoize (ashimema) 2025-03-31 12:28:33 UTC
Created attachment 180025 [details] [review]
Bug 39190: Add transport to test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 123 Julian Maurice 2025-04-18 11:47:42 UTC
I think that polymorphism (at the Koha::Object level) is not the best solution here. I think the problem is that Koha::File::Transport tries to be many things at once: it is a database entity and a file transporter. Those are two very different things.

We could have Koha::File::Transport::FTP and Koha::File::Transport::SFTP as non-Koha::Object and have (for instance) a Koha::File::Transport::transporter method that returns the correct object depending on the value of transport column.
Would that work ?
Comment 124 Martin Renvoize (ashimema) 2025-08-01 13:59:27 UTC
Created attachment 185014 [details] [review]
Bug 39190: Update polymorhpic base class to identify itself

This patch adds _polymorphic_field and _polymorphic_map private methods
to the Koha::File::Transports class to more clearly identify this as a
polymorphic class base for TestBuilder.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 125 Martin Renvoize (ashimema) 2025-08-01 13:59:30 UTC
Created attachment 185015 [details] [review]
Bug 39190: Rework (S)FTP into File::Transport classes

This patch adds polymorphic transport classes to Koha for FTP and SFTP
file transport configurations.

We introduce a base class for interacting with the base configuration
storage and subclasses to impliment the protocol specific transport
handling.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 126 Martin Renvoize (ashimema) 2025-08-01 13:59:33 UTC
Created attachment 185016 [details] [review]
Bug 39190: Add key handling to SFTP Transports

We add triggers to store in the base class and then use them in the SFTP
transport class to write out the key file to the filesystem for later
use in connect.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 127 Martin Renvoize (ashimema) 2025-08-01 13:59:36 UTC
Created attachment 185017 [details] [review]
Bug 39190: Update API to use new Transport classes

As the title says, use the new polymorphic classes in the API
controllers

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 128 Martin Renvoize (ashimema) 2025-08-01 13:59:39 UTC
Created attachment 185018 [details] [review]
Bug 39190: Update sftp_servers page to use new objects

Similar to the previous commit, this time we're updating the page
controller to use the new polymorphic classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 129 Martin Renvoize (ashimema) 2025-08-01 13:59:43 UTC
Created attachment 185019 [details] [review]
Bug 39190: Update status to longtext

Update status field to store longtext so we can sore more details
information about connection statuses from test connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 130 Martin Renvoize (ashimema) 2025-08-01 13:59:46 UTC
Created attachment 185020 [details] [review]
Bug 39190: DBIC Update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 131 Martin Renvoize (ashimema) 2025-08-01 13:59:49 UTC
Created attachment 185021 [details] [review]
Bug 39190: Re-implement the connection testing

We now use background jobs triggered by Transport->store to update the
connection status.

Status is now a json blob with more details, so we update the api
definition to reflect that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 132 Martin Renvoize (ashimema) 2025-08-01 13:59:52 UTC
Created attachment 185022 [details] [review]
Bug 39190: Update api tests for status format change

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 133 Martin Renvoize (ashimema) 2025-08-01 13:59:55 UTC
Created attachment 185023 [details] [review]
Bug 39190: Start of recording status updates from abort

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 134 Martin Renvoize (ashimema) 2025-08-01 13:59:58 UTC
Created attachment 185024 [details] [review]
Bug 39190: Remove old objects

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 135 Martin Renvoize (ashimema) 2025-08-01 14:00:01 UTC
Created attachment 185025 [details] [review]
Bug 39190: Remove test routine from API

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 136 Martin Renvoize (ashimema) 2025-08-01 14:00:05 UTC
Created attachment 185026 [details] [review]
Bug 39190: Remove replaced test_connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 137 Martin Renvoize (ashimema) 2025-08-01 14:00:08 UTC
Created attachment 185027 [details] [review]
Bug 39190: Redirect Schema to new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 138 Martin Renvoize (ashimema) 2025-08-01 14:00:11 UTC
Created attachment 185028 [details] [review]
Bug 39190: Update API's to reference new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 139 Martin Renvoize (ashimema) 2025-08-01 14:00:14 UTC
Created attachment 185029 [details] [review]
Bug 39190: Add transport to test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 140 Tomás Cohen Arazi (tcohen) 2025-08-08 21:07:56 UTC
(In reply to Julian Maurice from comment #123)
> I think that polymorphism (at the Koha::Object level) is not the best
> solution here. I think the problem is that Koha::File::Transport tries to be
> many things at once: it is a database entity and a file transporter. Those
> are two very different things.

We already have (to some extent) some other classes that could be considered polymorphic:

* Background jobs: implement the `_derived_class` method i.e. we search for Koha::BackgroundJob objects then call `->derived_class()` in the caller. This happens in the 'workers'
* IdP classes: implement the `upgrade_class` method. Only used for OAuth at the moment but other cases coming (I submitted CAS and Shibboleth classes)
* Koha::Account::Line: doesn't implement an upgrade method, Koha::Account can be used with `credits()` and `debits()` to retrieve certain type with the appropriate object type.

We might need to revisit them.

Will keep thinking about it over the weekend.
Comment 141 Tomás Cohen Arazi (tcohen) 2025-08-29 21:22:51 UTC
Created attachment 185972 [details] [review]
Bug 39190: Update polymorhpic base class to identify itself

This patch adds _polymorphic_field and _polymorphic_map private methods
to the Koha::File::Transports class to more clearly identify this as a
polymorphic class base for TestBuilder.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 142 Tomás Cohen Arazi (tcohen) 2025-08-29 21:22:56 UTC
Created attachment 185973 [details] [review]
Bug 39190: Rework (S)FTP into File::Transport classes

This patch adds polymorphic transport classes to Koha for FTP and SFTP
file transport configurations.

We introduce a base class for interacting with the base configuration
storage and subclasses to impliment the protocol specific transport
handling.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 143 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:01 UTC
Created attachment 185974 [details] [review]
Bug 39190: Add key handling to SFTP Transports

We add triggers to store in the base class and then use them in the SFTP
transport class to write out the key file to the filesystem for later
use in connect.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 144 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:06 UTC
Created attachment 185975 [details] [review]
Bug 39190: Update API to use new Transport classes

As the title says, use the new polymorphic classes in the API
controllers

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 145 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:11 UTC
Created attachment 185976 [details] [review]
Bug 39190: Update sftp_servers page to use new objects

Similar to the previous commit, this time we're updating the page
controller to use the new polymorphic classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 146 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:16 UTC
Created attachment 185977 [details] [review]
Bug 39190: Update status to longtext

Update status field to store longtext so we can sore more details
information about connection statuses from test connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 147 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:21 UTC
Created attachment 185978 [details] [review]
Bug 39190: Re-implement the connection testing

We now use background jobs triggered by Transport->store to update the
connection status.

Status is now a json blob with more details, so we update the api
definition to reflect that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 148 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:25 UTC
Created attachment 185979 [details] [review]
Bug 39190: Update api tests for status format change

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 149 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:30 UTC
Created attachment 185980 [details] [review]
Bug 39190: Start of recording status updates from abort

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 150 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:35 UTC
Created attachment 185981 [details] [review]
Bug 39190: Remove old objects

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 151 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:39 UTC
Created attachment 185982 [details] [review]
Bug 39190: Remove test routine from API

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 152 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:44 UTC
Created attachment 185983 [details] [review]
Bug 39190: Remove replaced test_connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 153 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:49 UTC
Created attachment 185984 [details] [review]
Bug 39190: Redirect Schema to new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 154 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:54 UTC
Created attachment 185985 [details] [review]
Bug 39190: Update API's to reference new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 155 Tomás Cohen Arazi (tcohen) 2025-08-29 21:23:58 UTC
Created attachment 185986 [details] [review]
Bug 39190: Add transport to test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 156 Tomás Cohen Arazi (tcohen) 2025-08-29 21:24:03 UTC
Created attachment 185987 [details] [review]
Bug 39190: Rename 'sftp_servers' to 'file_transports'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 157 Tomás Cohen Arazi (tcohen) 2025-08-29 21:24:08 UTC
Created attachment 185988 [details] [review]
Bug 39190: Adjust schema to new structure

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 158 Tomás Cohen Arazi (tcohen) 2025-08-29 21:24:13 UTC
Created attachment 185989 [details] [review]
Bug 39190: Adjust permission across the board

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 159 Tomás Cohen Arazi (tcohen) 2025-08-29 21:24:18 UTC
Created attachment 185990 [details] [review]
Bug 39190: Fix circular dependency causing C3 MRO failures

Resolved circular dependency chain:
Transport.pm → TestTransport.pm → Transports.pm → SFTP.pm → Transport.pm

Changed 'use Koha::BackgroundJob::TestTransport' to runtime 'require'
in the _post_store_trigger method to break the dependency cycle.

This fixes the C3 method resolution order failures in
Koha::File::Transport::FTP and Koha::File::Transport::SFTP.
Comment 160 Tomás Cohen Arazi (tcohen) 2025-08-29 21:25:54 UTC
I haven't finished here. The SFTP.t failure hints the class resolution mechanism is flawed. And I think we should rename all 'sftp*' scripts and templates right away too.
Comment 161 Tomás Cohen Arazi (tcohen) 2025-08-30 15:35:44 UTC
Created attachment 185994 [details] [review]
Bug 39190: Regression tests for polymorphic object creation

This patch adds comprehensive tests to verify that Koha::File::Transports
correctly returns polymorphic objects based on the transport field value.

The tests cover:
- build_object() polymorphic creation
- search() with polymorphic resultset iteration
- find() with polymorphic object return

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/File/Transports.t
=> FAIL: Tests fail - objects return base Koha::File::Transport
   instead of polymorphic Koha::File::Transport::SFTP/FTP classes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 162 Tomás Cohen Arazi (tcohen) 2025-08-30 15:35:49 UTC
Created attachment 185995 [details] [review]
Bug 39190: Fix polymorphic object creation in Koha::Objects

This patch fixes polymorphic object creation by ensuring all methods
in Koha::Objects that instantiate objects pass the DBIC result to
the object_class() method for proper polymorphic resolution.

Fixed methods:
- find(): Now passes $result to object_class($result)
- next(): Now passes $result to object_class($result)
- _wrap(): Now passes $_ to object_class($_) in map

This enables polymorphic classes like Koha::File::Transports to return
the correct subclass (Koha::File::Transport::SFTP, Koha::File::Transport::FTP)
based on the transport field value, instead of always returning the
base Koha::File::Transport class.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/File/Transports.t \
           t/db_dependent/Koha/File/Transport/SFTP.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 163 Tomás Cohen Arazi (tcohen) 2025-08-30 15:35:54 UTC
Created attachment 185996 [details] [review]
Bug 39190: Rename admin interface from sftp_servers to file_transports

Renamed admin interface files and URLs to reflect the evolution from
'SFTP servers' to 'File transports' functionality:

- admin/sftp_servers.pl -> admin/file_transports.pl
- sftp_servers.tt -> file_transports.tt
- Updated all URL references in templates and admin menu
- Updated body id from admin_sftp_servers to admin_file_transports

The functionality is now future-proof for the addition of new file
transports, so the naming should reflect his broader scope.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 164 Tomás Cohen Arazi (tcohen) 2025-08-30 15:35:58 UTC
Created attachment 185997 [details] [review]
Bug 39190: Rename API from sftp_servers to file_transports

This patch renames the entire API structure from SFTP-specific to generic
file transport terminology to reflect the polymorphic nature of the system.

API Changes:
- Endpoints: /config/sftp_servers -> /config/file_transports
- Parameters: sftp_server_id -> file_transport_id
- Definitions: sftp_server -> file_transport
- Controller: Config::SFTP::Servers -> Config::File::Transports

File Changes:
- api/v1/swagger/definitions/sftp_server.yaml -> file_transport.yaml
- api/v1/swagger/paths/config_sftp_servers.yaml -> config_file_transports.yaml
- Koha/REST/V1/Config/SFTP/Servers.pm -> Koha/REST/V1/Config/File/Transports.pm
- t/db_dependent/api/v1/sftp_servers.t -> file_transports.t

Updated References:
- swagger.yaml: paths, definitions, parameters, tags
- Template JavaScript: API URLs and variable names
- Controller: package name, variable names, error messages
- Tests: endpoints, parameters, descriptions
- API mapping: to_api_mapping field name correction

To test:
1. Apply this patch
2. Run: yarn api:bundle (to regenerate swagger bundle)
3. Run: prove t/db_dependent/api/v1/file_transports.t
4. All API tests should pass
5. Verify admin interface uses new API endpoints
6. Test CRUD operations work correctly

The API now consistently uses 'file_transports' terminology matching
the polymorphic file transport system that supports FTP, SFTP, and
future transport types.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 165 Tomás Cohen Arazi (tcohen) 2025-08-30 15:36:02 UTC
Created attachment 185998 [details] [review]
Bug 39190: Rename id => file_transport_id and remove mapping

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 166 Tomás Cohen Arazi (tcohen) 2025-08-30 15:38:16 UTC
(In reply to Tomás Cohen Arazi (tcohen) from comment #160)
> I haven't finished here. The SFTP.t failure hints the class resolution
> mechanism is flawed. And I think we should rename all 'sftp*' scripts and
> templates right away too.

I now finished what I believe this patchset should be like. It is all designed to be pushed in one shot along with bug 35761.

RM: please don't push until Martin has given his blessing to the followups. I'm happy to roll back and start over if there's no agreement on some of it.

Happy weekend!
Comment 167 Lucas Gass (lukeg) 2025-09-03 17:26:36 UTC
Setting to BLOCKED until Bug 35761 is out of FQA
Comment 168 Martin Renvoize (ashimema) 2025-09-05 14:26:21 UTC
Looking good.. It has my blessing.
Comment 169 Tomás Cohen Arazi (tcohen) 2025-09-15 14:38:08 UTC
Created attachment 186408 [details] [review]
Bug 39190: Update polymorhpic base class to identify itself

This patch adds _polymorphic_field and _polymorphic_map private methods
to the Koha::File::Transports class to more clearly identify this as a
polymorphic class base for TestBuilder.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 170 Tomás Cohen Arazi (tcohen) 2025-09-15 14:38:51 UTC
Created attachment 186409 [details] [review]
Bug 39190: Update polymorhpic base class to identify itself

This patch adds _polymorphic_field and _polymorphic_map private methods
to the Koha::File::Transports class to more clearly identify this as a
polymorphic class base for TestBuilder.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 171 Tomás Cohen Arazi (tcohen) 2025-09-15 14:38:55 UTC
Created attachment 186410 [details] [review]
Bug 39190: Rework (S)FTP into File::Transport classes

This patch adds polymorphic transport classes to Koha for FTP and SFTP
file transport configurations.

We introduce a base class for interacting with the base configuration
storage and subclasses to impliment the protocol specific transport
handling.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 172 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:00 UTC
Created attachment 186411 [details] [review]
Bug 39190: Add key handling to SFTP Transports

We add triggers to store in the base class and then use them in the SFTP
transport class to write out the key file to the filesystem for later
use in connect.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 173 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:04 UTC
Created attachment 186412 [details] [review]
Bug 39190: Update API to use new Transport classes

As the title says, use the new polymorphic classes in the API
controllers

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 174 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:09 UTC
Created attachment 186413 [details] [review]
Bug 39190: Update sftp_servers page to use new objects

Similar to the previous commit, this time we're updating the page
controller to use the new polymorphic classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 175 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:13 UTC
Created attachment 186414 [details] [review]
Bug 39190: Update status to longtext

Update status field to store longtext so we can sore more details
information about connection statuses from test connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 176 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:18 UTC
Created attachment 186415 [details] [review]
Bug 39190: Re-implement the connection testing

We now use background jobs triggered by Transport->store to update the
connection status.

Status is now a json blob with more details, so we update the api
definition to reflect that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 177 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:22 UTC
Created attachment 186416 [details] [review]
Bug 39190: Update api tests for status format change

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 178 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:27 UTC
Created attachment 186417 [details] [review]
Bug 39190: Start of recording status updates from abort

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 179 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:31 UTC
Created attachment 186418 [details] [review]
Bug 39190: Remove old objects

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 180 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:35 UTC
Created attachment 186419 [details] [review]
Bug 39190: Remove test routine from API

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 181 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:40 UTC
Created attachment 186420 [details] [review]
Bug 39190: Remove replaced test_connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 182 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:44 UTC
Created attachment 186421 [details] [review]
Bug 39190: Redirect Schema to new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 183 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:49 UTC
Created attachment 186422 [details] [review]
Bug 39190: Update API's to reference new classes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 184 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:54 UTC
Created attachment 186423 [details] [review]
Bug 39190: Add transport to test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 185 Tomás Cohen Arazi (tcohen) 2025-09-15 14:39:58 UTC
Created attachment 186424 [details] [review]
Bug 39190: Rename 'sftp_servers' to 'file_transports'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 186 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:03 UTC
Created attachment 186425 [details] [review]
Bug 39190: Adjust schema to new structure

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 187 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:07 UTC
Created attachment 186426 [details] [review]
Bug 39190: Adjust permission across the board

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 188 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:12 UTC
Created attachment 186427 [details] [review]
Bug 39190: Fix circular dependency causing C3 MRO failures

Resolved circular dependency chain:
Transport.pm → TestTransport.pm → Transports.pm → SFTP.pm → Transport.pm

Changed 'use Koha::BackgroundJob::TestTransport' to runtime 'require'
in the _post_store_trigger method to break the dependency cycle.

This fixes the C3 method resolution order failures in
Koha::File::Transport::FTP and Koha::File::Transport::SFTP.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 189 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:16 UTC
Created attachment 186428 [details] [review]
Bug 39190: Regression tests for polymorphic object creation

This patch adds comprehensive tests to verify that Koha::File::Transports
correctly returns polymorphic objects based on the transport field value.

The tests cover:
- build_object() polymorphic creation
- search() with polymorphic resultset iteration
- find() with polymorphic object return

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/File/Transports.t
=> FAIL: Tests fail - objects return base Koha::File::Transport
   instead of polymorphic Koha::File::Transport::SFTP/FTP classes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 190 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:20 UTC
Created attachment 186429 [details] [review]
Bug 39190: Rename admin interface from sftp_servers to file_transports

Renamed admin interface files and URLs to reflect the evolution from
'SFTP servers' to 'File transports' functionality:

- admin/sftp_servers.pl -> admin/file_transports.pl
- sftp_servers.tt -> file_transports.tt
- Updated all URL references in templates and admin menu
- Updated body id from admin_sftp_servers to admin_file_transports

The functionality is now future-proof for the addition of new file
transports, so the naming should reflect his broader scope.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 191 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:25 UTC
Created attachment 186430 [details] [review]
Bug 39190: Rename API from sftp_servers to file_transports

This patch renames the entire API structure from SFTP-specific to generic
file transport terminology to reflect the polymorphic nature of the system.

API Changes:
- Endpoints: /config/sftp_servers -> /config/file_transports
- Parameters: sftp_server_id -> file_transport_id
- Definitions: sftp_server -> file_transport
- Controller: Config::SFTP::Servers -> Config::File::Transports

File Changes:
- api/v1/swagger/definitions/sftp_server.yaml -> file_transport.yaml
- api/v1/swagger/paths/config_sftp_servers.yaml -> config_file_transports.yaml
- Koha/REST/V1/Config/SFTP/Servers.pm -> Koha/REST/V1/Config/File/Transports.pm
- t/db_dependent/api/v1/sftp_servers.t -> file_transports.t

Updated References:
- swagger.yaml: paths, definitions, parameters, tags
- Template JavaScript: API URLs and variable names
- Controller: package name, variable names, error messages
- Tests: endpoints, parameters, descriptions
- API mapping: to_api_mapping field name correction

To test:
1. Apply this patch
2. Run: yarn api:bundle (to regenerate swagger bundle)
3. Run: prove t/db_dependent/api/v1/file_transports.t
4. All API tests should pass
5. Verify admin interface uses new API endpoints
6. Test CRUD operations work correctly

The API now consistently uses 'file_transports' terminology matching
the polymorphic file transport system that supports FTP, SFTP, and
future transport types.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 192 Tomás Cohen Arazi (tcohen) 2025-09-15 14:40:29 UTC
Created attachment 186431 [details] [review]
Bug 39190: Rename id => file_transport_id and remove mapping

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>