MINIFI-433 - PG Variable Registry support in templates#115
MINIFI-433 - PG Variable Registry support in templates#115pvillard31 wants to merge 1 commit intoapache:masterfrom
Conversation
|
Do not merge as-is. I added unit tests, and it seems to behave as expected but when testing with a local build, variables are not included in the flow.xml.gz generated from the config.yml. I guess I missed something somewhere, but didn't find it so far. I still submitted the PR in case someone wants to have a look. |
|
Hey @pvillard31, took a look and I believe the problems you're seeing are due to variables at the root level not being accounted for in the template transformation. In ConfigSchemaFunction, for the root group level you're passing null for the variables[1]. So the check for "variables" in the recursive function below that will not have the variables for the root group. The transformation works for the actual config transformation (from config.yml to flow.xml) because there's no special passing of the variables[2]. The reason the unit tests don't catch it because the toolkit unit test doesn't include a variable at the root level[3] (the ConfigMainTest though). [1] https://github.com/apache/nifi-minifi/pull/115/files#diff-086bfd1ce3301edce34fd8af627c1470R88 |
Thank you for submitting a contribution to Apache NiFi - MiNiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with MINIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.