aperepel / nifi-api-deploy

Demonstrates NiFi template deployment and configuration via a REST API
Apache License 2.0
68 stars 37 forks source link

TemplateInspector outputs empty string instead in the deploy yml instead of 'no value' #21

Closed jranson closed 8 years ago

jranson commented 8 years ago

When we have attributes that need to be represented as 'no value', in the deployment yaml for example: Access Key: Secret Key: Credentials File:

Those are being inserted by the TemplateInspector as: Access Key: '' Secret Key: '' Credentials File: ''

This is causing the NiFiDeploy.groovy to fail to deploy the flow until we hand-edit the yml file to correct the issue.

aperepel commented 8 years ago

Hey @jranson , these are generally special properties, marked as 'sensitive' in the UI. Are you observing the issue with other 'normal' property values?

Basically, for sensitive property values, the template will never export the actual value, it is write-only, by design. The deployment spec file is treated as an overlay over a template to override properties. It is recommended to remove everything except for the values you want customized.

With above comments, does it address your issue? Let me know if not and we can dig in.

jranson commented 8 years ago

Hi Andrew, I'll check with my colleagues on what values they are seeing this in, and if they are marked as sensitive and get back to you. Thanks for the quick followup!

davetorok commented 8 years ago

Hi, this is happening on any attribute with an unset / empty value... for example in LogAttribute the properties "Attributes to Log", "Attributes to Ignore", "Log Prefix".

aperepel commented 8 years ago

Thank you guys. I finally managed to reproduce, fix committed. Let me know if that resolves your issue.