Chaffelson / nipyapi

A convenient Python wrapper for Apache NiFi
Other
243 stars 76 forks source link

Unable to Create Parameter Context (NiFi 1.16.0+) #305

Closed ChrisSamo632 closed 2 years ago

ChrisSamo632 commented 2 years ago

Description

NiPyApi cannot create new Parameter Contexts in NiFi 1.16.0+ due to missing inherited_parameter_contexts field (not defaulted in NiFi, although it probably should be - NIFI-9470.

Suspect updating the create_parameter_context method to accept an optional inherited_parameter_contexts parameters (defaulting to an empty list) then sending that to NiFi as part of the ParameterContextDTO would be a solution - at least until NIFI-9470 is fixed, but actually NiPyApi should probably be updated to handle inherited parameter contexts now that they've been introduced.

What I Did

Attempted to create a Parameter Context in a new instance of NiFi 1.16.1 by calling nipyapi.parameters.create_parameter_context("local")

Urgency

Cannot create Parameter Contexts with NiPyApi (or NiFi Toolkit as a workaround), which means automated deployments to NiFi 1.16.0+ (possibly 1.15.0+) where a Flow includes a Parameter Context is no longer possible.

That said, if the Parameter Context already exists in a Flow Definition within NiFi Registry, it can be imported then subsequently updated within NiFi (assuming that fits with one's deployment workflow).