lura
lura copied to clipboard
Validation of flexible configuration fails silently if template is missing
Describe the bug If you configure KrakenD to use flexible configuration and split the config into multiple templates there is no ouput in case the template file name is spelled incorrect.
To Reproduce Steps to reproduce the behavior:
-
Configuration used Create a flexible configuration with at least one template (e.g. test.tmpl). Include the template with
{{ template "test.tmpl" context }}works as expected. Including a non existent template{{ template "test2.tmpl" context }}fails silently. -
Steps to run the software
docker run --rm -e FC_ENABLE=1 -e FC_SETTINGS=/etc/krakend/settings -e FC_PARTIALS=/etc/krakend/partials -e FC_TEMPLATES=/etc/krakend/templates -v $(PWD)/krakend:/etc/krakend devopsfaith/krakend:1.1.1-alpine check -d -c /etc/krakend/krakend.json
Expected behavior At least some output like file not found should be printed to support debugging.
Logs
Only output is:
Parsing configuration file: /etc/krakend/krakend.json
Additional context Add any other context about the problem here.
That is my last hour. -.-"
Not even just the template. I use none of them, and I still have an error with absolutely no information, and if I look at the docs I'm supposed to be fine.
This issue was solved years ago, thanks for reporting. Including an unexisting template throws something like this:
Found error while executing template:template: krakend.tmpl:10:15: executing "krakend.tmpl"
at <{{template "aaaaaaaaaaaaaaaaaa.tmpl" "file.json"}}>: template "aaaaaaaaaaaaaaaaaa.tmpl" not defined
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.