You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/02/23 21:14:00 UTC

[jira] [Commented] (NIFI-12832) Cleanup nifi-mock dependencies

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

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

Commit ae423fc6ba564119456fbe2797d1371cbf3d71ab in nifi's branch refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=ae423fc6ba ]

NIFI-12832 Removed unnecessary dependencies from nifi-mock

- Moved StandardValidators to nifi-api
- Moved URL creation method from UriUtils to URLValidator
- Separated FormatUtils into FormatUtils and DurationFormat classes
- Added DurationFormat to nifi-api

This closes #8442

Signed-off-by: David Handermann <ex...@apache.org>


> Cleanup nifi-mock dependencies
> ------------------------------
>
>                 Key: NIFI-12832
>                 URL: https://issues.apache.org/jira/browse/NIFI-12832
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework, Extensions
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 2.0.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> We have allowed quite a few dependencies to creep into the nifi-mock module. It has dependencies now on nifi-utils, nifi-framework-api, nifi-parameter. These are not modules that the mock framework should depend on. We should ensure that we keep this module lean and clean.
> I suspect removing these dependencies from the mock framework will have a trickle-down effect, as most modules depend on this module, and removing these dependencies will likely require updates to modules who use these things as transitive dependencies.
> It appears that nifi-parameter is not even used, even though it's a dependency. There are two classes in nifi-utils that are in use: CoreAttributes and StandardValidators. But I argue these really should move to nifi-api, as they are APIs that are widely used and we will guarantee backward compatibility.
> Additionally, StandardValidators depends on FormatUtils. While we don't want to bring FormatUtils into nifi-api, we should introduce a new TimeFormat class in nifi-api that is responsible for parsing things like durations that our extensions use ("5 mins", etc.) This makes it simpler to build "framework-level extensions" and allows for a cleaner implementation of NiFiProperties in the future. FormatUtils should then make use of this class.



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