Closed jperville closed 4 years ago
Thanks for reporting! This means that we also need test coverage for init..
Initial fix merged. Leaving this ticket open to also add compiling to the init tests.
Test also added here https://github.com/deepmind/kapitan/pull/420 Closing issue :)
Describe the bug/feature
kapitan init
generates a project which does not compile.To Reproduce Steps to reproduce the behavior:
Expected behavior
The generated project should run
kapitan compile
without exception.If it's a bug (please complete the following information):
python --version
:Python 3.7.4
pip3 --version
:pip 19.3.1 from /opt/venv/lib/python3.7/site-packages/pip (python 3.7)
Are you using pyenv or virtualenv?
pyenv (running dockerized kapitan)Additional context
The error is due to
kapitan init
generating thecomponents/my_component/my_component.jsonnet
file with the following contents:In the generated inventory,
inventory.parameters.your_component.some_parameter
has a value oftrue
, which is not iterable indeed.To make the compilation work, the
components/my_component/my_component.jsonnet
file should have contents that looks like this instead:I prepare a PR to fix this.