This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new ff8c0181a2f NIFI-15907 Handle PROPERTY_PARAMETERIZATION_REMOVED as
Local Change (#11207)
ff8c0181a2f is described below
commit ff8c0181a2f8ddf67cb87e1fff13cab3d9b0d840
Author: Pierre Villard <[email protected]>
AuthorDate: Tue May 5 18:26:41 2026 +0200
NIFI-15907 Handle PROPERTY_PARAMETERIZATION_REMOVED as Local Change (#11207)
Signed-off-by: David Handermann <[email protected]>
---
.../apache/nifi/util/FlowDifferenceFilters.java | 6 ++--
.../nifi/util/TestFlowDifferenceFilters.java | 32 ++++++++++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/FlowDifferenceFilters.java
b/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/FlowDifferenceFilters.java
index 14f5898fe60..6b06157f598 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/FlowDifferenceFilters.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/util/FlowDifferenceFilters.java
@@ -588,7 +588,9 @@ public class FlowDifferenceFilters {
* Determines whether a property difference is caused by a statically
defined property being removed from the component definition.
* When a processor or controller service drops a property (for example,
as part of a version upgrade that invokes {@code removeProperty}
* during migration), the reconciled component in NiFi should not report a
"local change" so long as the component does not support
- * dynamic properties.
+ * dynamic properties. This applies whether the registry-side value was a
literal value (yielding {@link DifferenceType#PROPERTY_REMOVED})
+ * or a parameter reference (yielding {@link
DifferenceType#PROPERTY_PARAMETERIZATION_REMOVED}); both represent the same
underlying
+ * scenario of a property no longer exposed by the component definition.
*
* @param difference the flow difference under evaluation
* @param flowManager the flow manager used to resolve instantiated
components
@@ -597,7 +599,7 @@ public class FlowDifferenceFilters {
*/
public static boolean isStaticPropertyRemoved(final FlowDifference
difference, final FlowManager flowManager) {
final DifferenceType differenceType = difference.getDifferenceType();
- if (differenceType != DifferenceType.PROPERTY_REMOVED) {
+ if (differenceType != DifferenceType.PROPERTY_REMOVED &&
differenceType != DifferenceType.PROPERTY_PARAMETERIZATION_REMOVED) {
return false;
}
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/util/TestFlowDifferenceFilters.java
b/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/util/TestFlowDifferenceFilters.java
index 6c891d35ce2..dfb672b0c05 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/util/TestFlowDifferenceFilters.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/util/TestFlowDifferenceFilters.java
@@ -205,6 +205,17 @@ public class TestFlowDifferenceFilters {
"Property removed in component definition");
assertTrue(FlowDifferenceFilters.isStaticPropertyRemoved(difference,
flowManager));
+
+ final FlowDifference parameterizationRemovedDifference = new
StandardFlowDifference(
+ DifferenceType.PROPERTY_PARAMETERIZATION_REMOVED,
+ localProcessor,
+ localProcessor,
+ propertyName,
+ "#{SomeParam}",
+ null,
+ "Property parameterization removed in component definition");
+
+
assertTrue(FlowDifferenceFilters.isStaticPropertyRemoved(parameterizationRemovedDifference,
flowManager));
}
@Test
@@ -231,6 +242,17 @@ public class TestFlowDifferenceFilters {
"Property still defined");
assertFalse(FlowDifferenceFilters.isStaticPropertyRemoved(difference,
flowManager));
+
+ final FlowDifference parameterizationRemovedDifference = new
StandardFlowDifference(
+ DifferenceType.PROPERTY_PARAMETERIZATION_REMOVED,
+ localProcessor,
+ localProcessor,
+ propertyName,
+ "#{SomeParam}",
+ null,
+ "Parameterization removed but property still defined");
+
+
assertFalse(FlowDifferenceFilters.isStaticPropertyRemoved(parameterizationRemovedDifference,
flowManager));
}
@Test
@@ -255,6 +277,16 @@ public class TestFlowDifferenceFilters {
null,
"Dynamic property removed");
assertFalse(FlowDifferenceFilters.isStaticPropertyRemoved(difference,
flowManager));
+
+ final FlowDifference parameterizationRemovedDifference = new
StandardFlowDifference(
+ DifferenceType.PROPERTY_PARAMETERIZATION_REMOVED,
+ localProcessor,
+ localProcessor,
+ propertyName,
+ "#{SomeParam}",
+ null,
+ "Dynamic property parameterization removed");
+
assertFalse(FlowDifferenceFilters.isStaticPropertyRemoved(parameterizationRemovedDifference,
flowManager));
}
@Test