You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chronograf version: 1.7.15
Installation method: built from source
Related issues: #5090, #5137
Related PRs: #5228
This is a re-opening of #5137, which was reported fixed in 1.7.13 through #5228.
As of Chronograf 1.7.15 I still see the old behavior: the alert builder GUI rejects messages with valid Go templates such as:
CI ID = {{ with (index .Tags "ci_id") }}{{ . }}{{ else }}Unknown{{ end }}
CI ID = {{ if (index .Tags "ci_id") }}{{ index .Tags "ci_id" }}{{ else -}} Unknown {{ end }}
# of Tags = {{ len .Tags }}
The messages pass validation if one removes {{ . }}, -, and len, respectively. The validator's aversion to {{- and -}} is a bit harder to reproduce than the other two; - tends to be accepted in simple expressions but rejected in complex ones.
In none of the above examples do I see the parse error added in #5228; all triggering strings return "Please correct templates in alert message." I do see the parse error if I reproduce the demo from #5228 (i.e., closing with } instead of }}), confirming that I'm using the new code at least some of the time.
The text was updated successfully, but these errors were encountered:
@kfindeisen thanks for opening. we will take a look. this code seems to keep causing us issues, so many we should just remove the template validation altogether.
Chronograf version: 1.7.15
Installation method: built from source
Related issues: #5090, #5137
Related PRs: #5228
This is a re-opening of #5137, which was reported fixed in 1.7.13 through #5228.
As of Chronograf 1.7.15 I still see the old behavior: the alert builder GUI rejects messages with valid Go templates such as:
The messages pass validation if one removes
{{ . }}
,-
, andlen
, respectively. The validator's aversion to{{-
and-}}
is a bit harder to reproduce than the other two;-
tends to be accepted in simple expressions but rejected in complex ones.In none of the above examples do I see the parse error added in #5228; all triggering strings return "Please correct templates in alert message." I do see the parse error if I reproduce the demo from #5228 (i.e., closing with
}
instead of}}
), confirming that I'm using the new code at least some of the time.The text was updated successfully, but these errors were encountered: