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

ASF subversion and git services commented on NIFI-13073:
--------------------------------------------------------

Commit a20c5d9dff3b2a46d4f57ffb0247b668ca1dc0a0 in nifi's branch 
refs/heads/main from Bryan Bende
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=a20c5d9dff ]

NIFI-13073 Changed Flow Version from int to String

- Updated user interfaces to support String version numbers
- Also updated new UI to clear out the buckets and flows when selections change 
'above' them in the form when importing from registry

This closes #8674

Co-authored-by: Rob Fellows <[email protected]>
Signed-off-by: David Handermann <[email protected]>


> Update FlowRegistryClient API to use a String for version instead of int
> ------------------------------------------------------------------------
>
>                 Key: NIFI-13073
>                 URL: https://issues.apache.org/jira/browse/NIFI-13073
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The current FlowRegistryClient API is heavily based on extracting an API from 
> what originally existed from the initial NiFi Registry integration. In NiFi 
> Registry, each version of a flow gets assigned a one up integer number and 
> that is the "version", so as a result the API on NiFi side uses an `int` for 
> all references to a version. This makes it difficult to implement a 
> FlowRegistryClient for another system that doesn't use a one up numbering 
> schema, for example in Git the version would be considered the commit hash 
> which would be a String.
> The proposal here is to switch from `int version` to `String version` in the 
> FlowRegistryClient interface and anything above that on NiFi side. The 
> implementation can then decide how to interpret the String, meaning the NiFi 
> Registry implementation can simply do `Integer.parseInt(version)` if it needs 
> to determine the next version by performing `currentVersion + `.
> There is also some code that expects to sort a list of version metadata 
> results by comparing the the version fields. This should be changed to sort 
> based on the timestamp of each version.
> This will technically be a breaking change to the FlowRegistryClient 
> interface, but should be very straight forward for anyone to update, and it 
> is targeted for a 2.0.0 release where API changes can happen.



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

Reply via email to