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

Pierre Villard resolved NIFI-16285.
-----------------------------------
    Fix Version/s: 2.12.0
       Resolution: Fixed

> Loading a flow with a legacy illegal Parameter name fails startup
> -----------------------------------------------------------------
>
>                 Key: NIFI-16285
>                 URL: https://issues.apache.org/jira/browse/NIFI-16285
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Sevag Keosseian
>            Assignee: Sevag Keosseian
>            Priority: Major
>             Fix For: 2.12.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> NIFI-16236 / #11579 added ParameterNameValidator so illegal Parameter names
> cannot be created. The same check was placed in
> VersionedFlowSynchronizer.createParameterMap, which runs on every flow
> inherit — including standalone load of flow.json.gz
> (StandardFlowService.load → StandardFlowConfigurationDAO.load).
> A node whose persisted flow already contains an illegal name (created
> before the REST check, or via an out-of-band edit) now throws
> FlowSynchronizationException during startup:
>   Request contains an illegal Parameter Name (PARAMETER_\{{ ENVIRONMENT }}).
>   Parameter names may only include letters, numbers, spaces, and the
>   special characters .-_
> NiFi never finishes starting, so the REST deletion path added in
> NIFI-16236 is unreachable.
> The REST create/update check is correct and should stay. Inherit should
> load names that are already in the proposed flow (and log a warning) so
> the operator can delete them.
> Steps to reproduce:
> 1. Use a NiFi build that contains NIFI-16236 (#11579).
> 2. Place a flow.json.gz whose parameterContexts include a Parameter named
>    PARAMETER_\{{ ENVIRONMENT }}.
> 3. Start NiFi.
> Expected: node starts; illegal Parameter is present and can be deleted
> via the Parameter Context UI/REST.
> Actual: nifi-api fails to start. Stack:
>   VersionedFlowSynchronizer.synchronizeFlow
>   VersionedFlowSynchronizer.sync
>   FlowController.synchronize
>   StandardFlowConfigurationDAO.load
>   StandardFlowService.loadFromBytes
>   StandardFlowService.load
> Caused by IllegalArgumentException from ParameterNameValidator.validate.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to