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 up`promql.parseSeriesDesc` does not parse negative values #4356
Comments
kevinjqiu
referenced this issue
Jul 6, 2018
Open
No Tests Discovered When Specifying Negative Metrics Values #9
brian-brazil
added
kind/bug
component/promql
priority/P3
labels
Jul 6, 2018
This comment has been minimized.
This comment has been minimized.
|
Adding to above description, this happens not only for Basically for |
brian-brazil
closed this
in
#4564
Sep 13, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 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. |
lock
bot
locked and limited conversation to collaborators
Mar 22, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
kevinjqiu commentedJul 6, 2018
•
edited
Bug Report
What did you do?
I'm building a tool that piggy-backs on the promql's testing facility to allow custom test cases for alert rules to be generated from a user defined yaml file.
However, it appears that
promql.parseSeriesDescfunction does not parse negative values correctly, e.g.,parseSeriesDesc("my_metric{a=\"b\"} 1 -1")- I expect to see the parsed values to be[1, -1], however, it throws a parser error:If the negative value appears first in the list, the series can be correctly parsed:
parseSeriesDesc("my_metric{a=\"b\"} -1 1)<- this parses correctly.I have written a test case that demonstrated this parser error, and here's the test output:
EDIT: Add link to the test code that demonstrate this bug