-
If I am writing a multiline filter condition in TOML, I can split the line for readability by appending an escaping backslash.
This validates and works fine. However, if I try to use that same multiline condition block in YAML format (namely so the Vector config can be placed in a customConfig block of a Vector Helm chart values file...), the condition fails to validate, with an unexpected syntax token "Escape"
I've tried various YAML multiline block formats (|, >, single-quoting strings with newlines, etc). If I remove the escape, then the && operator is unexpected by the VRL parser. Moving the && up to the previous line not just makes for bad readability IMO, but then kicks the unexpected token down to the newline, opening parenthesis, or elsewhere. Ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @sbalmos !
|
Beta Was this translation helpful? Give feedback.
-
Wrapping back on this... Ironically it looks like this is very dependent on exactly what YAML multiline string form you use. This works for me (note, actually, no use at all of any block-form string):
|
Beta Was this translation helpful? Give feedback.
Hi @sbalmos !
The VRL expressions over multiple lines is a bit arbitrary as to when it works currently- something we hope to improve going forward.
I was able to get this to pass
vector validate
with: