Fix: Local transformer names must exist and be unique doclib Read from ... when overriding

Description

When overriding a Local transform as described in Overriding A Transform the following error is reported in the log.

This issue was fixed as part of the investigation into MNT-21817, which is to do with overriding renditions rather than transforms. Rather than confuse the situation even more, this issue was split out. The SE working on had been attempting to disable the renditions through transform configuration.

Environment

None

Activity

Show:
Alan Davis
January 29, 2021, 11:54 PM
  • Problem was that there were two conflicting pieces of code in play in the LocalTransformRegistry.register method. One that checked for duplicate T-Engine names and the other that allowed transforms to be overridden if they had the same name.

  • The code checking for duplicate names needed an extra clause to only look at T-Engines (they have a T-Engine url associated with them).

  • The code that overrode transforms then worked, but still had issues as the supported source to target mimetypes, priorities and max sizes were not cleared.

  • It turned out to be simpler to split the original LocalTransformRegistry.register method into two. Extraction a new method into CombinedConfig.removeOverriddenOrInvalidTransformers that discarded invalid or overridden config before the list of supported source to target mimetypes was created rather than try to fix them up later. This is why there appear to be quite a few changes. The reality is that there are not.

  • More extensive unit tests were also added.

Done

Assignee

Unassigned

Reporter

Alan Davis

Labels

None

Regression

None

Bug Priority

Category 2

Delivery Team

Team 5

Release Train

Iver

Story Points

5

Components

Sprint

None

Fix versions

Affects versions