[
https://issues.apache.org/jira/browse/NIFI-12959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17834435#comment-17834435
]
ASF subversion and git services commented on NIFI-12959:
--------------------------------------------------------
Commit 2ad9db18db3d0ef0a1c0e3a9241e418299de78c3 in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2ad9db18db ]
NIFI-12959: Support loading Python processors from NARs
This closes #8573
Signed-off-by: David Handermann <[email protected]>
> Support loading Python processors from NARs
> -------------------------------------------
>
> Key: NIFI-12959
> URL: https://issues.apache.org/jira/browse/NIFI-12959
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Fix For: 2.0.0-M3
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Currently, third-party dependencies for Python Processors can be handled in
> two ways. Either they can be declared as dependencies in a Processor itself;
> or the Processor can be in a module where a {{requirements.txt}} dictates the
> requirements. These can be very helpful for developing Python based
> Processors.
> However, in production environments, it is not uncommon to see environments
> where {{pip}} is not installed. There is an inherent risk in allowing remote
> code to be downloaded in an ad-hoc manner like this, without any sort of
> vulnerability scanning, etc.
> As such, we should allow users to also package python packages in NiFi's
> native archiving format (NARs).
> The package structure should be as follows:
> {code:java}
> my-nar.nar
> +-- META-INF/
> +-- MANIFEST.MF
> +-- NAR-INF/
> +-- bundled-dependencies/
> +-- dependency1
> +-- dependency2
> +-- etc.
> +-- MyProcessor.py{code}
> Where {{MyProcessor.py}} could also be a python module / directory.
> In this way, we allow a Python Processor to be packaged up with its third
> party dependencies and dropped in the lib/ directory (or extensions)
> directory of a NiFi installation in the same way that a Java processor would
> be.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)