awelless commented on code in PR #11813:
URL: https://github.com/apache/nifi/pull/11813#discussion_r4295876169
##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java:
##########
@@ -418,12 +422,15 @@ public void synchronize(final ProcessGroup group, final
VersionedExternalFlow ve
}
});
+ final VersionedExternalFlowMetadata metadata =
versionedExternalFlow.getMetadata();
Review Comment:
Originally I tried to always rely on VersionControlInformation in the CS
factory for top-level versioned groups.
However, during the flow import and upgrades VersionControlInformation is
absent. That's why owningGroupIdentity is determined in synchronizer - that's
the only place where we have the necessary identifiers.
##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java:
##########
@@ -418,12 +422,15 @@ public void synchronize(final ProcessGroup group, final
VersionedExternalFlow ve
}
});
+ final VersionedExternalFlowMetadata metadata =
versionedExternalFlow.getMetadata();
+ final String flowIdentifier = metadata == null ? null :
metadata.getFlowIdentifier();
Review Comment:
`flowIdentifier` is supposed to be unique in each flow, and is saved in json
definition, thus portable across different flow instances.
Please let me know if I'm missing something here, and we _cannot_ rely on
this identifier to be unique and consistent.
##########
nifi-system-tests/nifi-system-test-suite/src/test/resources/versioned-flows/test-flows/0831859c-f4a1-4ff6-99b3-58aeb35cb17f/1/snapshot.json:
##########
@@ -0,0 +1,120 @@
+{
+ "snapshotMetadata" : {
+ "branch" : "main",
+ "bucketIdentifier" : "test-flows",
+ "flowIdentifier" : "0831859c-f4a1-4ff6-99b3-58aeb35cb17f",
+ "version" : "1",
Review Comment:
V1 flow was exported from an actual NiFi instance.
V2 flow is composed and saved in the system tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]