Art DeCarlo created NIFI-8012:
---------------------------------

             Summary: ControllerServiceDefintions getting lost on dynamic 
properties referencing services
                 Key: NIFI-8012
                 URL: https://issues.apache.org/jira/browse/NIFI-8012
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 1.12.1
            Reporter: Art DeCarlo


When changing processor versions, controllerServiceDefintions can be 
intermittently lost for dynamic control service properties because of the 
random order that properties are looped through and set in 
AbstractComponentNode.refreshProperties().

On a custom processor, where a static property value influences the 
PropertyDescriptor definitions of dynamic properties, the processor needs to 
set the values of the static properties before 
getSupportedDynamicPropertyDescriptor() is called.

In my specific case, I have a custom processor similar to JoltTransformJSON, 
where the user-provided specification can trigger creation of multiple 
RecordLookupService or StringLookupService dynamic properties.

This works well, except when doing an upgrade and changing the processor 
version. Because of the issue outlined above, the service definitions can be 
lost for the dynamic service properties. Once lost, when viewing the 
configuration of the processor, the values of the dynamic service definitions 
simply appear as the GUID identifiers of those services, and the Controller 
Services Settings tab no longer shows the processor as being a Referencing 
Component.

Similarly, the loop in AbstractComponentNode.setProperties() should be updated 
to loop through the non-dynamic properties first, followed by the dynamic 
properties.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to