Done
Details
Assignee
Andrei MakarankaAndrei MakarankaReporter
Julian LadischJulian LadischPriority
P3Story Points
2Sprint
NoneDevelopment Team
ThunderjetRelease
R1 2021 Bug FixAffects versions
TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Andrei Makaranka
Andrei MakarankaReporter
Julian Ladisch
Julian LadischPriority
Story Points
2
Sprint
None
Development Team
Thunderjet
Release
R1 2021 Bug Fix
Affects versions
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created January 7, 2021 at 11:36 PM
Updated June 16, 2021 at 5:31 PM
Resolved April 15, 2021 at 11:36 AM
Overview:
data-migration/11.0.0/po_line_sync_fund_code.ftl contains this sub-select:
mod-orders-storage violates the module separation by directly accessing ..._mod_finance_storage schema.
The FOLIO architecture mandates that cross-module communication goes through HTTP APIs only.
Some deployments (for example GBV multi-tenant installation) use database ROLEs with access restricted to the current schema. They fail when running this migration script.
If one module requires that some other module exists it must list that other module's interface in its ModuleDescriptor "requires" section.
mod-orders' Module Descriptor has a "requires" section that lists
and
https://github.com/folio-org/mod-orders/blob/v11.2.0/descriptors/ModuleDescriptor-template.json#L731-L767
This makes mod-orders a suitable place to run the migration using API calls.
mod-orders-storage doesn't have a "requires" section in its ModuleDescriptor - this is correct to comply with the FOLIO architecture where each storage module stands on its own.
Steps to Reproduce:
Expected Results:
The last curl upgrade POST succeeds.
Actual Results:
The last curl upgrade POST fails with a 400 error. This is the error log entry in the first console:
', coalesce((SELECT jsonb -> 'code' FROM diku_mod_finance_storage.fund WHERE jsonb ->> 'id' = distrib ->> 'fundId'), distrib -> 'code', '""')))) FROM jsonb_array_elements(jsonb -> 'fundDistribution') distrib ) WHERE jsonb_array_length(jsonb -> 'fundDistribution') > 0
PostgresClient ERROR: relation "diku_mod_finance_storage.fund" does not exist
Position: 188