You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Bryan Bende (Jira)" <ji...@apache.org> on 2024/04/19 15:36:00 UTC

[jira] [Created] (NIFI-13073) Update FlowRegistryClient API to use a String for version instead of int

Bryan Bende created NIFI-13073:
----------------------------------

             Summary: 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


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)