Mark Payne created NIFI-8537:
--------------------------------

             Summary: Components become invalid if referencing a disabled 
controller service, even if referencing property is not in scope due to 
dependencies
                 Key: NIFI-8537
                 URL: https://issues.apache.org/jira/browse/NIFI-8537
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Mark Payne
            Assignee: Mark Payne


If a processor/controller service property (A) has a dependency on another 
property (B), we do not perform validation of property A (i.e., the property 
descriptor's validator is ignored). However, if Property A references a 
Controller Service, and that Controller Service is either disabled or invalid, 
we currently consider the referencing component invalid. This should not be the 
case.

To replicate:
 * Create an AvroSchemaRegistry Controller Service. Leave the Controller 
Service disabled.
 * Create a JsonTreeReader controller service.
 * Configure the JsonTreeReader Controller Service.
 * Set "Schema Access Strategy" to "Use 'Schema Name' Property"
 * Set "Schema Registry" to the AvroSchemaRegistry created in the first step.
 * Change "Schema Access Strategy" to "Infer Schema"
 * Click Apply to apply the changes.

The JsonTreeReader service will be invalid due to the fact that 
AvroSchemaRegistry is disabled. Not only should the Schema Registry property 
not be considered in validation, it becomes very confusing now because the 
validation error states: "'Schema Registry' validated against XYZ is invalid 
because Controller Service with ID XYZ is invalid." But when configuring 
JsonTreeReader, we don't even see the "Schema Registry" property.

The reference should not be validated unless its property's dependencies have 
been satisfied.



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

Reply via email to