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 upNew `bool` modifier not working in recording rules #1065
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The status page also shows |
This comment has been minimized.
This comment has been minimized.
|
So for the printed text, I guess we just need new printing logic in https://github.com/prometheus/prometheus/blob/master/promql/printer.go. Still doesn't explain the different evaluation behavior between rules and interactive queries though. |
This comment has been minimized.
This comment has been minimized.
|
Argh. The printer is indeed the culprit, it seems. Look at this line in recording.go: https://github.com/prometheus/prometheus/blob/master/rules/recording.go#L47 IMO having to go through serializing and deserializing an expression again internally to evaluate it for a recording rule is quite a wart. Would it be possible to keep it in symbolic form instead and only use the printer-generated serializations for user-targeted output? |
juliusv
added a commit
that referenced
this issue
Sep 9, 2015
juliusv
referenced this issue
Sep 9, 2015
Merged
Fix bool modifier in recording rules and printing. #1066
This comment has been minimized.
This comment has been minimized.
|
This was a 'good for now' solution. We can certainly keep the AST node directly in rules. |
juliusv
closed this
in
#1066
Sep 10, 2015
fabxc
added a commit
that referenced
this issue
Jan 11, 2016
gouthamve
pushed a commit
to gouthamve/promql
that referenced
this issue
Mar 28, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
juliusv commentedSep 9, 2015
For example, try the expression
up > bool 0with some up and down targets. It works fine in the expression browser, but in a recorded rule it acts like theboolisn't there.