Comparing NiFi API versions between releases

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Comparing NiFi API versions between releases

Jagrut Sharma
Hi - Is there an efficient way to compare NiFi APIs between releases 1.6.0
and 1.7.1 to identify changes, additions, deletions etc.

Thanks!
--
Jagrut
Reply | Threaded
Open this post in threaded view
|

Re: Comparing NiFi API versions between releases

Andy LoPresto-2
Hi Jagrut,

You can perform a diff on the nifi-framework-api bundle using pkgdiff [1] or jardiff [2], which should give you the information you’re looking for. There shouldn’t be many changes to the API in minor releases. Those changes are generally held for major releases. 


Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Aug 30, 2018, at 12:17 PM, Jagrut Sharma <[hidden email]> wrote:

Hi - Is there an efficient way to compare NiFi APIs between releases 1.6.0
and 1.7.1 to identify changes, additions, deletions etc.

Thanks!
--
Jagrut


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Comparing NiFi API versions between releases

Kevin Doran-2
In reply to this post by Jagrut Sharma
Hi Jagrut,

Are you referring to the REST API or the public Java interfaces and classes?

As a general note, NiFi versions follow semantic versioning [1] guidelines,
so for external-facing APIs (both Java and REST), there may be additions or
non-breaking changes across minor versions, but there will never be
deletions or breaking-changes.

## For the REST API

For the last several versions of NiFi, a Swagger/OpenAPI [2][3]
specification (swagger.json file) is generated from the source code build,
here:


<repo_root>/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json

For previous releases, you can either build from source by checking out the
tag associated with the release version (rel/nifi-<version>).
I'm not sure if the ordering of this JSON file is deterministic, but
diff'ing it across versions might be one way to pinpoint changes.

## For the Java APIs

I don't know of a quick trick for this, but you can narrow the problem down
a lot if you are only concerned about external-facing NiFi APIs for
extension points, most (all?) of which are in modules that end in "-api":

    find /path/to/nifi-source -type d -name "*-api" -print

Hope this helps,
Kevin

[1] https://semver.org
[2] https://swagger.io
[3] https://github.com/OAI/OpenAPI-Specification



On Thu, Aug 30, 2018 at 3:17 PM Jagrut Sharma <[hidden email]>
wrote:

> Hi - Is there an efficient way to compare NiFi APIs between releases 1.6.0
> and 1.7.1 to identify changes, additions, deletions etc.
>
> Thanks!
> --
> Jagrut
>
Reply | Threaded
Open this post in threaded view
|

Re: Comparing NiFi API versions between releases

Jagrut Sharma
Thanks Andy and Kevin. I was referring to REST API differences. I followed
both of your approaches and am comparing the results now. Built v1.7.1 and
v1.6.0 from source and then:

1) Using jardiff, comparing
<repo>/nifi-framework-api/target/nifi-framework-api-1.6.0.jar
and nifi-framework-api/target/nifi-framework-api-1.7.1.jar. It has the
--git option, which makes it easier to see the differences in a tool like
SourceTree.
2) Using a text editor, comparing
<repo>/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json
for both versions.

Regards.
--
Jagrut


On Thu, Aug 30, 2018 at 1:09 PM Kevin Doran <[hidden email]> wrote:

> Hi Jagrut,
>
> Are you referring to the REST API or the public Java interfaces and
> classes?
>
> As a general note, NiFi versions follow semantic versioning [1] guidelines,
> so for external-facing APIs (both Java and REST), there may be additions or
> non-breaking changes across minor versions, but there will never be
> deletions or breaking-changes.
>
> ## For the REST API
>
> For the last several versions of NiFi, a Swagger/OpenAPI [2][3]
> specification (swagger.json file) is generated from the source code build,
> here:
>
>
>
> <repo_root>/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json
>
> For previous releases, you can either build from source by checking out the
> tag associated with the release version (rel/nifi-<version>).
> I'm not sure if the ordering of this JSON file is deterministic, but
> diff'ing it across versions might be one way to pinpoint changes.
>
> ## For the Java APIs
>
> I don't know of a quick trick for this, but you can narrow the problem down
> a lot if you are only concerned about external-facing NiFi APIs for
> extension points, most (all?) of which are in modules that end in "-api":
>
>     find /path/to/nifi-source -type d -name "*-api" -print
>
> Hope this helps,
> Kevin
>
> [1] https://semver.org
> [2] https://swagger.io
> [3] https://github.com/OAI/OpenAPI-Specification
>
>
>
> On Thu, Aug 30, 2018 at 3:17 PM Jagrut Sharma <[hidden email]>
> wrote:
>
> > Hi - Is there an efficient way to compare NiFi APIs between releases
> 1.6.0
> > and 1.7.1 to identify changes, additions, deletions etc.
> >
> > Thanks!
> > --
> > Jagrut
> >
>


--
Jagrut
Reply | Threaded
Open this post in threaded view
|

Re: Comparing NiFi API versions between releases

Jagrut Sharma
Hi - The swagger.json was quick to compare since it followed the same write
ordering across versions. There are only minor changes, nothing looks like
a breaking change. Thanks for your help.

Regards.
--
Jagrut

On Fri, Aug 31, 2018 at 3:57 PM Jagrut Sharma <[hidden email]>
wrote:

> Thanks Andy and Kevin. I was referring to REST API differences. I followed
> both of your approaches and am comparing the results now. Built v1.7.1 and
> v1.6.0 from source and then:
>
> 1) Using jardiff, comparing <repo>/nifi-framework-api/target/nifi-framework-api-1.6.0.jar
> and nifi-framework-api/target/nifi-framework-api-1.7.1.jar. It has the
> --git option, which makes it easier to see the differences in a tool like
> SourceTree.
> 2) Using a text editor, comparing <repo>/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json
> for both versions.
>
> Regards.
> --
> Jagrut
>
>
> On Thu, Aug 30, 2018 at 1:09 PM Kevin Doran <[hidden email]> wrote:
>
>> Hi Jagrut,
>>
>> Are you referring to the REST API or the public Java interfaces and
>> classes?
>>
>> As a general note, NiFi versions follow semantic versioning [1]
>> guidelines,
>> so for external-facing APIs (both Java and REST), there may be additions
>> or
>> non-breaking changes across minor versions, but there will never be
>> deletions or breaking-changes.
>>
>> ## For the REST API
>>
>> For the last several versions of NiFi, a Swagger/OpenAPI [2][3]
>> specification (swagger.json file) is generated from the source code build,
>> here:
>>
>>
>>
>> <repo_root>/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/target/swagger-ui/swagger.json
>>
>> For previous releases, you can either build from source by checking out
>> the
>> tag associated with the release version (rel/nifi-<version>).
>> I'm not sure if the ordering of this JSON file is deterministic, but
>> diff'ing it across versions might be one way to pinpoint changes.
>>
>> ## For the Java APIs
>>
>> I don't know of a quick trick for this, but you can narrow the problem
>> down
>> a lot if you are only concerned about external-facing NiFi APIs for
>> extension points, most (all?) of which are in modules that end in "-api":
>>
>>     find /path/to/nifi-source -type d -name "*-api" -print
>>
>> Hope this helps,
>> Kevin
>>
>> [1] https://semver.org
>> [2] https://swagger.io
>> [3] https://github.com/OAI/OpenAPI-Specification
>>
>>
>>
>> On Thu, Aug 30, 2018 at 3:17 PM Jagrut Sharma <[hidden email]>
>> wrote:
>>
>> > Hi - Is there an efficient way to compare NiFi APIs between releases
>> 1.6.0
>> > and 1.7.1 to identify changes, additions, deletions etc.
>> >
>> > Thanks!
>> > --
>> > Jagrut
>> >
>>
>
>
> --
> Jagrut
>
>

--
Jagrut