[
https://issues.apache.org/jira/browse/NIFI-16285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18111234#comment-18111234
]
ASF subversion and git services commented on NIFI-16285:
--------------------------------------------------------
Commit f5e20e3687f3eee9fecb3a6b59a5b542390616ef in nifi's branch
refs/heads/main from skeossei
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=f5e20e3687f ]
NIFI-16285 Allow existing illegal Parameter names to load (#11616)
Do not validate Parameter names during flow inherit so a persisted
flow.json.gz with a legacy illegal name can start and be deleted via REST.
Log a warning when inherit encounters an illegal Parameter name and add
coverage for loading that name into a new or existing Parameter Context.
> 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
> Time Spent: 20m
> 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)