Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8537

Components become invalid if referencing a disabled controller service, even if referencing property is not in scope due to dependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.14.0
    • Core Framework
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m