Kenzy-Ragab opened a new pull request, #5501:
URL: https://github.com/apache/fineract/pull/5501
## Description
This PR implements the full decommissioning of the **Pentaho Reporting
Engine** from the Fineract infrastructure. The objective is to eliminate legacy
dependencies and streamline the reporting services by removing all
Pentaho-related Java logic, SQL configurations, and build dependencies.
---
## Key Changes
### Core Logic & Metadata Cleanup
#### **A. Java Source Code Cleanup**
The removal was executed across three critical files within the
infrastructure and dataqueries modules to eliminate Pentaho-specific logic:
* **`ExecuteEmailTaskLet.java` (Campaign Infrastructure):** * Removed the
`generateAttachment` method.
* Updated file variable assignments to `null` (3 instances) where the
method was previously invoked.
* Removed the `private final ReadReportingService` dependency.
* Cleaned up unused imports: `ReadReportingService`,
`ByteArrayOutputStream`, and `PlatformDataIntegrityException`.
* **`ReadReportingServiceImpl.java` (DataQueries Implementation):** *
Deleted the `generatePentahoReportAsOutputStream` method.
* Removed unused imports: `ByteArrayOutputStream`, `Locale`, and
`AppUser`.
* **`ReadReportingService.java` (DataQueries Interface):** * Deleted the
method signature for `generatePentahoReportAsOutputStream`.
* Removed unused imports: `ByteArrayOutputStream`, `Locale`, and
`AppUser`.
#### **B. Sample Data & SQL Scripts**
* **Sample Data Cleanup:** Eliminated all Pentaho-related entries, metadata,
and report definitions from the core sample data files: `barebones_db.sql` and
`load_sample_data.sql`.
* **Detailed Removal:** Within these files, specifically removed:
* All Pentaho report definitions.
* Associated report parameters.
* User permissions (Permissions/Roles) linked to accessing these legacy
reports.
* **Changelog:** Updated Liquibase changelogs to remove or nullify any
references to Pentaho reports in the database schema.
* **Note:** The core accounting reports (e.g., Trial Balance Table) were
**strictly preserved** as they are classified as "Table" type reports, not
Pentaho-dependent.
#### **C. Documentation**
* **`plugins.adoc`:** Removed the external link and the related Note
regarding Pentaho module licensing.
* **System Accuracy:** Cleaned up the documentation to ensure no legacy
references to the removed reporting engine remain.
#### **D. Database Migration (Liquibase)**
* **Incremental Changelog:** Created a new file
`0210_remove_pentaho_legacy_data.xml` inside `db/changelog/tenant/parts/` to
handle the cleanup of Pentaho-related metadata.
* **Case-Insensitive Deletion:** Implemented `LOWER()` function in SQL
predicates to ensure compatibility across different database engines (MariaDB &
PostgreSQL) and to safely target all Pentaho records regardless of character
casing.
* **Data Integrity:** Orchestrated the deletion order to remove child
records (report parameters) before parent records (reports) to avoid **foreign
key constraint violations**.
* **Master Changelog Registration:** Registered the new migration file in
`changelog-tenant.xml` using `relativeToChangelogFile="true"` to maintain the
project's standard migration sequence.
---
## Cleanup Summary
* **Affected Languages:** Java, SQL.
* **Logic Update:** Replaced dynamic Pentaho attachment generation with
null-safe assignments in the email campaign workflow.
## Notes for Reviewers
* **Build & Dependency Verification:** Performed a thorough search (using
`grep`) across root and module-specific `build.gradle` files (including
`fineract-provider` and `fineract-report`). **Confirmed that no active
Pentaho-related dependencies or configurations remain in the Gradle build
scripts, ensuring the cleanup is limited to the database and source code
layers.**
* **Verification:** Ran `./gradlew spotlessApply` and confirmed build is
**SUCCESSFUL**.
* **System Status:** With this PR, the system is now fully decoupled from
the Pentaho engine. All reporting functionality now relies exclusively on
standard SQL-based Table Reports.
**Addresses: FINERACT-2481**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]