You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2024/03/26 20:03:00 UTC

[jira] [Updated] (NIFI-12959) Support loading Python processors from NARs

     [ https://issues.apache.org/jira/browse/NIFI-12959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Payne updated NIFI-12959:
------------------------------
    Status: Patch Available  (was: Open)

> 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: 10m
>  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)