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

Mark Payne edited comment on NIFI-10973 at 1/26/23 6:02 PM:
------------------------------------------------------------

Thanks for the PR [~simonbence] . I think there's still something wrong though.

I performed the steps that are outlined above, and it did address the specific 
issue mentioned here.

However, after verifying that, I performed the following:
 * Rename GenerateFlowFile in parent to "GenerateFlowFile 2"
 * Rename UpdateCounter in child group
 * Move to parent and view local changes. Shows just the GenerateFlowFile 
rename, which is correct.
 * Revert changes to child group. This succeeds.
 * Now view the Local Modifications for parent. It now shows the name change 
for GenerateFlowFile, but it also shows every component within "Child" as a 
newly added component.

As best I can tell, this is an issue with the Revert Changes. It results in 
improperly setting the Child group's Versioned Flow Coordinates. When setting 
breakpoints, in the View Local Changes action, I see that in 
StandardFlowComparator line 596, the two VersionedProcessGroup's have different 
Storage Locations:
 * Local Flow has Storage Location "http://localhost:18080";
 * Remote Flow from Registry has Storage Location 
"http://localhost:18080/nifi-registry-api/buckets/f2af9ccd-e2c3-4bab-9d64-c35d1e0410b4/flows/d98b5574-d955-4609-ab74-bfaea988f41d/versions/2";

In this case, we're definitely seeing this as a difference in storage location. 
But not sure either why that's causing local modifications to show for each 
component...


was (Author: markap14):
Thanks for the PR [~simonbence] . I think there's still something wrong though.

I performed the steps that are outlined above, and it did address the specific 
issue mentioned here.

However, after verifying that, I performed the following:
 * Rename GenerateFlowFile in parent to "GenerateFlowFile 2"
 * Rename UpdateCounter in child group
 * Move to parent and view local changes. Shows just the GenerateFlowFile 
rename, which is correct.
 * Revert changes to child group. This succeeds.
 * Now view the Local Modifications for parent. It now shows the name change 
for GenerateFlowFile, but it also shows every component within "Child" as a 
newly added component.

As best I can tell, this is an issue with the Revert Changes. It results in 
improperly setting the Child group's Versioned Flow Coordinates. When setting 
breakpoints, in the View Local Changes action, I see that in 
StandardFlowComparator line 596, the two VersionedProcessGroup's have different 
Storage Locations:
 * Local Flow has Storage Location "http://localhost:18080";
 * Remote Flow from Registry has Storage Location 
"http://localhost:18080/nifi-registry-api/buckets/f2af9ccd-e2c3-4bab-9d64-c35d1e0410b4/flows/d98b5574-d955-4609-ab74-bfaea988f41d/versions/2";

> NiFi Registry Client with Nested PGs/Flows - sync issue (again)
> ---------------------------------------------------------------
>
>                 Key: NIFI-10973
>                 URL: https://issues.apache.org/jira/browse/NIFI-10973
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: NiFi Registry
>    Affects Versions: 1.19.1
>            Reporter: Josef Zahner
>            Assignee: Simon Bence
>            Priority: Critical
>             Fix For: 1.20.0
>
>         Attachments: Nested_PG_Test.xml, Sync_issue_State.png, 
> Sync_issue_local_changes.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We just upgraded to NiFi 1.19.1 and we have an issue with the NiFi Registry 
> Client in combination with nested PGs (parent PG and child PGs are both 
> commited as NiFi Registry flows).
> Steps to reproduce the issue (based on the attached template xml):
> Hint: {color:#57d9a3}Green Color {color}-> NiFi Registry flow Master; 
> {color:#4c9aff}Blue Color{color} -> Secondary NiFi/Canvas where you import 
> the flow from Registry
>  * {color:#57d9a3}Import the XML template{color}
>  * {color:#57d9a3}Start Version Control for "Child PG"{color}
>  * {color:#57d9a3}Start Version Control for "Parent PG"{color}
>  * {color:#4c9aff}On an independent canvas/nifi click "Add Process Group" and 
> "Import from Registry", select the "Parent PG" flow{color}
>  * {color:#57d9a3}On the original "Child PG" rename the only existing 
> processor, eg. to "UpdateCounter New"{color}
>  * {color:#57d9a3}Commit the change for the "Child PG" (Processor 
> Rename){color}
>  * {color:#57d9a3}Commit the change for the "Parent PG" (Version change of 
> "Child PG"){color}
>  * {color:#4c9aff}Now click "Change Version" on the other NiFi/Canvas and 
> switch to the newest version for the "Parent PG", which seems to be 
> successful. *However* *now we are hitting the issue, NiFi shows a successful 
> change, but NiFi shows as well "Local Changes" for the "Child PG" (not for 
> the "Parent PG"). To get a good state you have to click to "Revert Local 
> Changes" on the "Child PG" which makes no sense, it should directly sync the 
> "Child PG" according to the commited version. At least the version number of 
> the "Child PG" has been changed but not the real configuration as you see 
> below in the screenshots. It shows that there has been a component name 
> change, which is true for the version but to get to the new version we have 
> to revert the local changes*{color}
>  
> Screenshots with the Failure State below, "Parent PG" is in sync, but not the 
> "Child PG". The only thing I've done is to change the Version on the "Parent 
> PG":
> {color:#4c9aff}*!Sync_issue_State.png!*{color}
>  
> {color:#4c9aff}*!Sync_issue_local_changes.png!*{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to