Removal of ujson in f8097473df64678b1ba8b34100babe49f050450a breaks compile as json does not support escape_forward_slashes kwarg.
To Reproduce:
Steps to reproduce the behavior:
cd examples/terraformdocker run -u $(id -u) -t --rm -v $(pwd):/src:delegated deepmind/kapitan:latest compile
Example Output:
kapitan/examples/terraform$ docker run -u $(id -u) -t --rm -v $(pwd):/src:delegated deepmind/kapitan:latest compile
Unknown (Non-Kapitan) Error occured
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/kapitan/kapitan/targets.py", line 321, in compile_target
input_compiler.compile_obj(comp_obj, ext_vars, **kwargs)
File "/kapitan/kapitan/inputs/base.py", line 46, in compile_obj
self.compile_input_path(input_path, comp_obj, ext_vars, **kwargs)
File "/kapitan/kapitan/inputs/base.py", line 66, in compile_input_path
target_name=target_name, **kwargs)
File "/kapitan/kapitan/inputs/jsonnet.py", line 67, in compile_file
fp.write_json(item_value)
File "/kapitan/kapitan/inputs/base.py", line 126, in write_json
json.dump(obj, self.fp, indent=indent, escape_forward_slashes=False)
File "/usr/local/lib/python3.7/json/__init__.py", line 176, in dump
default=default, sort_keys=sort_keys, **kw).iterencode(obj)
TypeError: __init__() got an unexpected keyword argument 'escape_forward_slashes'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/kapitan/kapitan/targets.py", line 80, in compile_targets
[p.get() for p in pool.imap_unordered(worker, target_objs) if p]
File "/kapitan/kapitan/targets.py", line 80, in <listcomp>
[p.get() for p in pool.imap_unordered(worker, target_objs) if p]
File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 748, in next
raise value
TypeError: __init__() got an unexpected keyword argument 'escape_forward_slashes'
Sorry about this, we were missing tests for json output. I added a test for that as well now which should catch it in the future. :+1: Thanks for reporting.
Describe the bug/feature
Removal of ujson in f8097473df64678b1ba8b34100babe49f050450a breaks compile as json does not support escape_forward_slashes kwarg.
To Reproduce: Steps to reproduce the behavior:
cd examples/terraform
docker run -u $(id -u) -t --rm -v $(pwd):/src:delegated deepmind/kapitan:latest compile
Example Output:
Expected Output: