mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-27 02:46:47 +01:00
3616337812
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> |
||
---|---|---|
.. | ||
victoria-metrics | ||
vmagent | ||
vmalert | ||
vmauth | ||
vmbackup | ||
vmbackupmanager | ||
vmctl | ||
vmgateway | ||
vminsert | ||
vmrestore | ||
vmselect | ||
vmstorage | ||
vmui |