[ 
https://issues.apache.org/jira/browse/NIFI-16326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18141066#comment-18141066
 ] 

Matt Casters commented on NIFI-16326:
-------------------------------------

I rechecked this against current {{main}} ({{62e4d95a82}}, NIFI-16554).

The behavior in the description is already fixed on main by NIFI-16226, which 
shipped in NiFi 2.12.0.

* Update analysis in 
{{StandardNiFiServiceFacade.setEffectiveParameterUpdates()}} now sets 
{{inherited=true}} from the source Parameter Context before the update is 
stored.
* {{StandardParameterContextDAO.getParameters()}} already skips parameters with 
{{inherited=true}}, so those effective values are not written as local 
parameters.
* A later reorder, add, or remove therefore recalculates the effective value 
instead of keeping the value from the first inheritance change.

The UI sends an empty parameter list when only the inheritance list changes. 
That is the same request the system test on GitHub PR #11660 sends. With 
NIFI-16226, that path no longer persists a local override.

PR #11660 still adds a DAO guard for a request that omits the {{inherited}} 
flag but names a different Parameter Context as the source. The UI and the 
normal REST update do not send that payload.

Pierre Villard also ran the related NIFI-16278 steps on the 2.12.0 release 
candidate and saw the expected behavior.

Resolving this as a duplicate of NIFI-16226 and closing PR #11660.


> Subsequent Parameter Context inheritance changes do not update effective 
> parameter values
> -----------------------------------------------------------------------------------------
>
>                 Key: NIFI-16326
>                 URL: https://issues.apache.org/jira/browse/NIFI-16326
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.11.0
>            Reporter: Sven Van Kerrebroeck
>            Assignee: Matt Casters
>            Priority: Major
>         Attachments: image-2026-09-09-12-44-21-772.png, 
> image-2026-09-09-12-44-39-772.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> h2. Description
> When changing the inheritance configuration of an existing Parameter Context, 
> the first inheritance change is applied correctly and the effective parameter 
> values are updated as expected.
> However, subsequent inheritance changes on the same Parameter Context are not 
> reflected in the effective parameter values.
> The configured inheritance itself is updated correctly, but NiFi continues 
> using the parameter value that became effective after the first inheritance 
> change.
> This can occur with both:
>  * reordering inherited Parameter Contexts
>  * adding or removing inherited Parameter Contexts
> The issue therefore appears to be related to repeated updates of the 
> inheritance configuration, rather than to a specific inheritance operation.
> h2. Steps to reproduce
>  # Create a Parameter Context named {{{}Context A{}}}.
>  # Add the following parameter:
> Name: {{test.parameter}}
> Value: {{VALUE_A}}
>  # Create a Parameter Context named {{{}Context B{}}}.
>  # Add the same parameter:
> Name: {{test.parameter}}
> Value: {{VALUE_B}}
>  # Create a Parameter Context named {{{}Context C{}}}.
>  # Configure {{Context C}} to inherit from:
> Context A
> Context B
>  # Verify that the effective value of {{test.parameter is VALUE_A}}
>  # Edit {{Context C}} and reorder the inherited Parameter Contexts to:
> Context B
> Context A
>  # Save the Parameter Context.
>  # Verify the effective value again. {{test.parameter is VALUE_B}} now
> So far so good.
> Now a second edit: 
>  # Edit {{Context C}} again.
>  # Reorder the inherited Parameter Contexts back to:
> Context A
> Context B
>  # Save the Parameter Context.
>  # Check the effective value of {{test.parameter}} -> this time it still says 
> {{{}VALUE_B{}}}, while it should be A again...  
> !image-2026-09-09-12-44-21-772.png|width=479,height=165!
> !image-2026-09-09-12-44-39-772.png|width=397,height=135!
>  
> The value from the previous inheritance state is still used.
> The same stale value is also observed by Process Groups and components using 
> {{{}Context C{}}}.
> The effective value should change back to: {{VALUE_A}} because {{Context A}} 
> once again has the highest precedence in the inheritance order.
> Each change to the inheritance configuration should trigger a recalculation 
> of the effective parameter values.
> h2. Additional reproduction
> The same behavior can also be reproduced using add/remove operations instead 
> of reordering.
> Example:
>  # Create {{Context C}} again (from scratch), now inheriting only from 
> {{{}Context B{}}}.
>  # Verify that {{test.parameter}} resolves to {{{}VALUE_B{}}}. -> OK
>  # Edit {{Context C}} and add {{Context A}} before {{{}Context B{}}}.
>  # Save.
>  # Verify that the effective value correctly changes to {{{}VALUE_A{}}}. -> OK
>  # Edit {{Context C}} again and remove {{{}Context A{}}}.
>  # Save.
> Result? The inheritance correctly shows only {{{}Context B{}}}, but the 
> effective value remains {{{}VALUE_A now..{}}}. This is not possible, context 
> A is removed so the effective value should now be {{{}VALUE_B{}}}.
> h2. Impact
> After the first inheritance update, further changes to the same Parameter 
> Context can leave stale effective parameter values active.
> This causes the configured inheritance hierarchy and the effective parameter 
> values used by the flow to become inconsistent.
> As a result, Process Groups and components may continue using values from a 
> previous inheritance configuration, even though the current Parameter Context 
> configuration indicates a different effective value.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to