You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Ferenc Gerlits (Jira)" <ji...@apache.org> on 2020/07/14 08:09:00 UTC

[jira] [Updated] (MINIFICPP-1292) Properties with an allowed list of values should check their input

     [ https://issues.apache.org/jira/browse/MINIFICPP-1292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferenc Gerlits updated MINIFICPP-1292:
--------------------------------------
    Description: 
If you declare a Property of a processor with a list of allowed values (using {{withAllowableValues}}) and then give this property a non-allowed value when you configure the processor, it will not automatically throw an exception, only if the processor code checks the property in {{onSchedule()}}.

The heartbeat will contain the list of allowed values, so if you use a C2 client to set up the configuration, then this can be prevented by the client, so this is not a major issue.

Nevertheless, the Property itself should verify that it is valid, so each processor doesn't need to check them in {{onSchedule()}}, or risk not working correctly when configured manually. Since this change may break existing deployments, it should be rolled out with a major version change.

  was:
If you declare a Property of a processor with a list of allowed values (using {{withAllowableValues}}) and then give this property a non-allowed value when you configure the processor, it will not automatically throw an exception, only if the processor code checks the property in {{onSchedule()}}.

The heartbeat will contain the list of allowed values, so if you use a C2 client to set up the configuration, than this can be prevented by the client, so this is not a major issue.

Nevertheless, the Property itself should verify that it is valid, so each processor doesn't need to check them in {{onSchedule()}}, or risk not working correctly when configured manually. Since this change may break existing deployments, it should be rolled out with a major version change.


> Properties with an allowed list of values should check their input
> ------------------------------------------------------------------
>
>                 Key: MINIFICPP-1292
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1292
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Ferenc Gerlits
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> If you declare a Property of a processor with a list of allowed values (using {{withAllowableValues}}) and then give this property a non-allowed value when you configure the processor, it will not automatically throw an exception, only if the processor code checks the property in {{onSchedule()}}.
> The heartbeat will contain the list of allowed values, so if you use a C2 client to set up the configuration, then this can be prevented by the client, so this is not a major issue.
> Nevertheless, the Property itself should verify that it is valid, so each processor doesn't need to check them in {{onSchedule()}}, or risk not working correctly when configured manually. Since this change may break existing deployments, it should be rolled out with a major version change.



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