VictoriaMetrics/app
Roman Khavronenko d0d0be9031
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 15:37:54 +03:00
..
vmagent app/vmagent: substitute hard-to-read 500000000 with 500MB in -remoteWrite.maxDiskUsagePerURL description 2022-04-26 15:48:44 +03:00
vmalert vmalert: do not execute templates during validation (#2528) 2022-05-02 15:37:54 +03:00
vmauth lib/httpserver: clarify that -tls flag enables TLS for http requests to -httpListenAddr 2022-04-16 16:59:41 +03:00
vmbackup app: sync Markdown changes from a8de1ab000 2022-03-22 14:12:03 +02:00
vmbackupmanager app: sync Markdown changes from a8de1ab000 2022-03-22 14:12:03 +02:00
vmctl vmctl/vm: added datapoints collection bar (#2486) 2022-05-02 10:58:06 +03:00
vmgateway app: sync Markdown changes from a8de1ab000 2022-03-22 14:12:03 +02:00
vminsert vmctl verify-blocks command (#2390) 2022-04-05 17:46:36 +03:00
vmrestore app: sync Markdown changes from a8de1ab000 2022-03-22 14:12:03 +02:00
vmselect app/vmselect: adds API /api/v1/status/buildinfo (#2515) 2022-04-29 13:02:43 +03:00
vmstorage lib/{storage,flagutil} - Add option for snapshot autoremoval (#2487) 2022-05-02 11:24:12 +03:00
vmui vmui: fix default server path (#2511) 2022-04-29 13:02:43 +03:00