[
https://issues.apache.org/jira/browse/NIFI-15748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18068494#comment-18068494
]
ASF subversion and git services commented on NIFI-15748:
--------------------------------------------------------
Commit 937601ffa8fd5c6149b5342eb4f99fc5cf5cf916 in nifi's branch
refs/heads/main from Bryan Bende
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=937601ffa8f ]
NIFI-15748 Skip inherited parameters when validating asset references (#11042)
> Parameter Context update fails when removing inherited context that has
> asset-referencing parameters
> ----------------------------------------------------------------------------------------------------
>
> Key: NIFI-15748
> URL: https://issues.apache.org/jira/browse/NIFI-15748
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When updating a Parameter Context to remove an inherited Parameter Context
> that contains a parameter referencing an Asset, the update request fails with:
> {code:java}
> Request contains a reference to an Asset (AssetReferenceDTO[id=...,
> name=...]) that does not exist in Parameter Context (...) {code}
>
> The root cause is in
> {{{}ParameterContextResource.validateAssetReferences(){}}}.
> When the UI submits a parameter context update, the request body includes the
> full merged parameter list (including inherited parameters marked with
> {{{}inherited=true{}}}). The validation iterates over all parameters and
> checks that each referenced asset belongs to the parameter context being
> updated. However, assets belonging to inherited parameters are owned by their
> originating child context, not the parent. The validation fails because it
> does not skip inherited parameters, even though downstream persistence logic
> ({{{}StandardParameterContextDAO.getParameters(){}}}) already correctly
> ignores them.
> Steps to Reproduce
> # Create two Parameter Contexts — "ChildA" and "ChildB"
> # Upload an Asset to ChildA (e.g., a text file)
> # Add a parameter to ChildA (e.g., "fileToIngest") and set it to reference
> the uploaded Asset
> # Create a third Parameter Context ("Parent") that inherits both ChildA and
> ChildB
> # Edit the Parent context and remove ChildA from the inherited contexts list
> # Click Apply
--
This message was sent by Atlassian Jira
(v8.20.10#820010)