Apparently the starlark converter breaks long strings (80 chars?) when using --format
, which leads to breaking the yaml output. For example having an unfortunate pipe (|
) or other yaml element in strings which gets split produces broken/invalid yaml:
Example:
def func1():
return [{
'name': 'alpine',
'image': 'docker.io/alpine:latest',
'commands': [
'''echo very very very really very awesome and long lonng looonng very long bogus | grep a'''
],
},]
produces:
- commands:
- echo very very very really very awesome and long lonng looonng very long bogus
| grep a
image: docker.io/alpine:latest
name: alpine
Which obviously isn’t the expected (the |
on the leading line).