Circular dependency mod-source-record-manager and mapping-rules.get

Description

mod-source-record-manager requires interfaces "authority-note-types" and "authority-source-files":
https://github.com/folio-org/mod-source-record-manager/blob/v3.6.4/descriptors/ModuleDescriptor-template.json#L74-L78

mod-entities-links provides these interfaces:
https://github.com/folio-org/mod-entities-links/blob/9a9a288bf80b1560deea2d4ea1a5479deafd9c5f/descriptors/ModuleDescriptor-template.json#L183
https://github.com/folio-org/mod-entities-links/blob/9a9a288bf80b1560deea2d4ea1a5479deafd9c5f/descriptors/ModuleDescriptor-template.json#L210

mod-entities-links optionally depends on interface "mapping-rules-provider":
https://github.com/folio-org/mod-entities-links/blob/9a9a288bf80b1560deea2d4ea1a5479deafd9c5f/descriptors/ModuleDescriptor-template.json#L28

mod-source-record-manager provides this interface:
https://github.com/folio-org/mod-source-record-manager/blob/v3.6.4/descriptors/ModuleDescriptor-template.json#L449

This is a circular dependency.

Okapi solves it by removing the optional dependency and enables mod-entities-links before mod-source-record-manager.

When mod-entities-links gets enabled it unconditionally adds the "mapping-metadata.get" and "mapping-rules.get" permissions to the system user:
https://github.com/folio-org/mod-entities-links/blob/9a9a288bf80b1560deea2d4ea1a5479deafd9c5f/src/main/resources/permissions/mod-entities-links-permissions.csv#L35-L36

These permissions belong to mod-source-record-manager:
https://github.com/folio-org/mod-source-record-manager/blob/v3.6.4/descriptors/ModuleDescriptor-template.json#L591-L606

However, mod-source-record-manager hasn't been enabled at that time and the permissions don't exist.

Therefore platform complete snapshot fails:
https://jenkins-aws.indexdata.com/job/Automation/job/build-platform-complete-snapshot/20870/execution/node/95/log/

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Julian Ladisch September 9, 2023 at 7:36 AM

Platform complete snapshot build succeeds now.

I hand over this issue to Spitfire for any further action to resolve the circular dependency.

Julian Ladisch September 8, 2023 at 9:41 PM

As a temporary hot fix I propose not to add these two permissions to the system user. This should make the platform complete snapshot build succeed.
https://github.com/folio-org/mod-entities-links/pull/143

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Poppy (R2 2023)

RCA Group

Implementation coding issue

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created September 8, 2023 at 9:28 PM
Updated September 13, 2023 at 8:52 AM
Resolved September 12, 2023 at 12:56 PM
TestRail: Cases
TestRail: Runs