VictoriaMetrics/app
Roman Khavronenko 3616337812
vmalert: do not execute templates during validation (#2528)
Function `ValidateTemplates`, used on the vmalert startup,
is supposed to check whether used templates and functions
in loaded rules are correct. The function was parsing
and executing loaded templates.
However, rules may contain functions which can't be executed
without values (label values or query results), like `slice`.
Because of this, validation for completely valid expression
`{{ slice $labels.job 9 }}` will fail since `$labels.job`
is empty during validation.

This PR updates `ValidateTemplates` function to only parse
templates without executing them.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2514
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-05-02 10:16:16 +02:00
..
victoria-metrics issue-2323: Fixed Incorrect Content-Type header 'text/plain' for root path (#2343) 2022-03-21 08:13:28 +00:00
vmagent app/vmagent: substitute hard-to-read 500000000 with 500MB in -remoteWrite.maxDiskUsagePerURL description 2022-04-26 15:48:20 +03:00
vmalert vmalert: do not execute templates during validation (#2528) 2022-05-02 10:16:16 +02:00
vmauth lib/httpserver: clarify that -tls flag enables TLS for http requests to -httpListenAddr 2022-04-16 16:59:26 +03:00
vmbackup app: sync Markdown changes from a8de1ab000 2022-03-22 14:11:18 +02:00
vmbackupmanager app: sync Markdown changes from a8de1ab000 2022-03-22 14:11:18 +02:00
vmctl vmctl/vm: added datapoints collection bar (#2486) 2022-05-02 09:06:34 +02:00
vmgateway app: sync Markdown changes from a8de1ab000 2022-03-22 14:11:18 +02:00
vminsert vmctl verify-blocks command (#2390) 2022-04-05 16:01:32 +02:00
vmrestore app: sync Markdown changes from a8de1ab000 2022-03-22 14:11:18 +02:00
vmselect app/vmselect/main.go: move the code /api/v1/status/buildinfo handler to the same location as in the cluster branch 2022-04-29 13:02:14 +03:00
vmstorage lib/{storage,flagutil} - Add option for snapshot autoremoval (#2487) 2022-05-02 11:00:15 +03:00
vmui vmui: fix default server path (#2511) 2022-04-29 12:51:48 +03:00