NIFI-16326 Corrected subsequent Parameter Context inheritance updates - #11660
NIFI-16326 Corrected subsequent Parameter Context inheritance updates#11660mattcasters wants to merge 1 commit into
Conversation
Stop persisting effective inherited Parameter values as local Parameters during inheritance changes, so later reorders and add/remove operations recalculate effective values instead of keeping a stale local override. Signed-off-by: mattcasters <mattcasters@gmail.com>
|
Hey @mattcasters I feel like the described issue may have been already fixed on the main branch with NIFI-16226. Are you able to reproduce your issue on a build from the main branch? If you cannot run a test, I'm happy to give it a try if you have specific steps reproducing the problem on your side. |
|
Thanks Pierre. The PR is based on current NIFI-16326 was filed against 2.11.0, which does not have NIFI-16226 (that landed for 2.12.0). I agree NIFI-16226 is in the same area: update analysis was reclassifying inherited Parameters as local. After that change, What this PR still covers on current I have not re-run the original UI steps against a vanilla |
|
This issue seems to be related to the one I filed some days ago: https://issues.apache.org/jira/browse/NIFI-16278 This is easily reproducible. From the issue:
However, I am not able to build from the branch, so I cannot test whether this change solves my issue Cheers |
|
I just executed the steps described above and everything works as expected on the main branch (release candidate for NiFi 2.12.0 that is being voted right now). I believe the issue was fixed with NIFI-16226. |
Summary
NIFI-16326 Subsequent Parameter Context inheritance changes do not update effective parameter values.
The first inheritance change on a Parameter Context (reorder, add, or remove) updates effective values as expected. Later inheritance changes update the configured inheritance list, but NiFi continues using the value that became effective after the first change. Process Groups and components bound to that context see the same stale value.
This happens because Parameter Context update analysis injects effective inherited Parameter DTOs into the request so referencing components can be identified. Those DTOs were persisted as local Parameters whenever
inheritedwas not explicitlytrue. A local Parameter then shadows inheritance, so later reorders and add/remove operations cannot change the effective value.StandardParameterContextDAO.getParameters()now omits inherited Parameters from local persistence when:inheritedistrue, orinheritedis unset and the Parameter's source context is not the context being updatedAn explicit local override (
inherited=false) is still accepted.Coverage includes unit tests for repeated reorder and add/remove on
StandardParameterContext, DAO tests for injected effective Parameters with and without theinheritedflag, and system tests that replay the Jira reproduction through the REST update API.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw -P contrib-check -DskipTests packagecompleted on the changed modules and their reactor dependencies (JDK 21)TestStandardParameterContext(inheritance reorder/add-remove),TestStandardParameterContextDAO(11 tests)Licensing
LICENSEandNOTICEfilesDocumentation