This is an automated email from the ASF dual-hosted git repository.

mattyb149 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 d54940c397 NIFI-11473 Flow version change in NiFi should not stop a 
component when only position is changed
d54940c397 is described below

commit d54940c3974de5397c167aaf4b7679ef111610ee
Author: Timea Barna <[email protected]>
AuthorDate: Thu Apr 20 13:40:25 2023 +0200

    NIFI-11473 Flow version change in NiFi should not stop a component when 
only position is changed
    
    Signed-off-by: Matthew Burgess <[email protected]>
    
    This closes #7185
---
 .../flow/synchronization/StandardVersionedComponentSynchronizer.java  | 4 ++++
 .../src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java  | 1 +
 2 files changed, 5 insertions(+)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
index 957485ace5..f634ef538d 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
@@ -217,6 +217,10 @@ public class StandardVersionedComponentSynchronizer 
implements VersionedComponen
                 }
             }
 
+            if (diff.getDifferenceType() == DifferenceType.POSITION_CHANGED) {
+                continue;
+            }
+
             final VersionedComponent component = diff.getComponentA() == null 
? diff.getComponentB() : diff.getComponentA();
             updatedVersionedComponentIds.add(component.getIdentifier());
 
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index 1ee96d9327..f8e0ca26ed 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -5505,6 +5505,7 @@ public class StandardNiFiServiceFacade implements 
NiFiServiceFacade {
             .filter(diff -> !FlowDifferenceFilters.isScheduledStateNew(diff))
             .filter(diff -> 
!FlowDifferenceFilters.isLocalScheduleStateChange(diff))
             .filter(diff -> 
!FlowDifferenceFilters.isPropertyMissingFromGhostComponent(diff, flowManager))
+            .filter(difference -> difference.getDifferenceType() != 
DifferenceType.POSITION_CHANGED)
             .map(difference -> {
                 final VersionedComponent localComponent = 
difference.getComponentA();
 

Reply via email to