jsonnet $lookup
function breaks the config in 1.27
#13449
Labels
bug
unexpected problem or unintended behavior
$lookup
function breaks the config in 1.27
#13449
Relevant telegraf.conf
Logs from Telegraf
System info
Ubuntu 20.04
Docker
No response
Steps to reproduce
$lookup
in a JSON transformer that works in 1.26.3 and then upgrade to 1.27.0 you will see the following warning and the transformer stops working:WARN[0000] The "lookup" variable is not set. Defaulting to a blank string.
$lookup
with$$lookup
in the config and 1.27.0 will work, but it won't work with 1.26.3Expected behavior
Config from version 1.26.3 to work with 1.27.0 when containing jsonnet $ functions, like
$lookup
Actual behavior
It should be possible to continue to use jsonnet $ functions in JSON transformer configs.
Additional info
The latest release, throws the following warning if
$lookup
(a jsonnet function) is used as a JSON transformer:Looking at the changelog notes, it might be due to the replacement of the parser. Given that this error is a generic Golang parser error, replacing the
$lookup
with$$lookup
fixes the issue, but this means potentially many broken json transformers as this release is being used.The text was updated successfully, but these errors were encountered: