Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promtool: rule update doesn't preserve escaping as needed #4844

Closed
beorn7 opened this Issue Nov 8, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@beorn7
Copy link
Member

beorn7 commented Nov 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 expr field 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 update command 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.

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Mar 16, 2019

Closing this as the update command is gone, and while trying to verify the same problem with the rendering on the Rules tab in the web UI, I could not reproduce the problem.

@beorn7 beorn7 closed this Mar 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.