[
https://issues.apache.org/jira/browse/NIFI-8874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17531195#comment-17531195
]
Bryan Bende commented on NIFI-8874:
-----------------------------------
I don't think we plan to change anything with how ids are working in NiFi and
NiFi Registry, as there is no actual problem that I am aware of. When a flow
snapshot is saved to registry, all of the components are given ids in the
snapshot that are generally referred to as the "versioned component ids". On
the NiFi side, each component has it's own local id, and if it is connected to
registry the component also tracks its versioned component id. This how changes
are linked up when changing between v1 and v2 of a flow, meaning it takes v2,
goes to each component, takes the versioned id, finds that component in the
local flow based on versioned id and applies changes. This has all been working
this way for quite some time.
As far as going to git outside of NiFi Registry... git is really just another
storage mechanism for flow snapshots, along with the other options of
file-based or database. There should be no direct modifications to anything in
git (i.e. no one should ever submit a pull request to change a snapshot in
git), all changes must go through registry API. However, I can see the desire
to look in git when using github and look at changes that were made.
This ticket was originally created in 2018, and it seems like the original
issue was that the ordering of elements in the json written to git was not
consistent. This was true at some point in the original couple of releases, but
at some point we configured the Jackson ObjectMapper to sort alphabetically:
[https://github.com/apache/nifi/blob/main/nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/serialization/jackson/ObjectMapperProvider.java#L41]
It is possible this Jira was created before that was improved, but I would
expect right now that the json is produced in a consistent order. If it is not,
can you please provide a very simple example that produces the problem.
> Retain groupId and Id identifiers when importing Flows from registry
> --------------------------------------------------------------------
>
> Key: NIFI-8874
> URL: https://issues.apache.org/jira/browse/NIFI-8874
> Project: Apache NiFi
> Issue Type: Improvement
> Components: NiFi Registry
> Reporter: eric twilegar
> Assignee: Nesa Simon David
> Priority: Major
>
> We started using Nifi registry with Git integration to have some insight into
> the changes being made and create a relatively standard SDLC for our Nifi
> process groups ( read jobs ).
> When we started only one user was making changes and so the git history was
> pretty good.
> When a second user imported a flow to their local machine, made changes,
> committed those changes and we deployed them we took a look in Git to see the
> changes the user had made.
> The git diff was riddled with id and groupId process identifier changes which
> made the history less useful than it could have been.
> I'm not sure what your future plans are for Git so this might come out in the
> wash, but we are looking forward to being able to see the diffs, approve them
> and so on. I realize PRs could be a real issue as this stuff doesn't merge
> well, but eventually we might want a PR from a registry to registry so this
> could all tie together.
> Thanks so much for the great work. Have a wonderful day.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)