You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2024/04/26 16:41:00 UTC
[jira] [Resolved] (NIFI-13073) Update FlowRegistryClient API to use a String for version instead of int
[ https://issues.apache.org/jira/browse/NIFI-13073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Handermann resolved NIFI-13073.
-------------------------------------
Fix Version/s: 2.0.0-M3
Resolution: Fixed
> 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
> Fix For: 2.0.0-M3
>
> 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)