Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uppromtool: rule update doesn't preserve escaping as needed #4844
Comments
beorn7
added
kind/bug
component/promtool
labels
Nov 8, 2018
This comment has been minimized.
This comment has been minimized.
|
Closing this as the |
beorn7
closed this
Mar 16, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
beorn7 commentedNov 8, 2018
Bug Report
What did you do?
Converted 1.x rules to 2.x YAML format with
promtool update rules.What did you expect to see?
Working 1.x rules resulting in working 2.x rules.
What did you see instead? Under which circumstances?
A double-backslash in an annotation got reduced to single-backslash, while a double-backslash in an
exprfield was preserved.This had the effect that the rule was invalid. The double-backslash in the annotation was from within a regexp in a template expression, which became invalid syntax.
Environment
System information:
Linux 4.4.0-138-generic x86_64
Prometheus version:
I used promtool 2.5.0, not Prometheus.
I am aware that we want to remove the
updatecommand anyway. However, I assume the code path to render rules as YAML is used elsewhere, too, and breaking escaping is problematic then, too.@grobie That's what I referred to @gouthamve perhaps @grobie mentioned that to you.