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 upReturn error on duplicate label matchers in PromQL query #2517
Comments
stuartnelson3
added
area/usability
component/promql
kind/question
labels
Mar 23, 2017
This comment has been minimized.
This comment has been minimized.
|
This seems generally like expected behavior. Label matchers are connected by AND, irrespective of label name. For example, would this seem wrong?
|
This comment has been minimized.
This comment has been minimized.
|
That's a good point. While I would be surprised to see this instead of a regex, there's no reason it shouldn't be allowed. |
stuartnelson3
closed this
Mar 23, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 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 23, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
stuartnelson3 commentedMar 23, 2017
What did you do?
I executed the following query:
(Actual metric name was different)
What did you expect to see?
An error saying that I can't specify the same label matcher key twice.
What did you see instead? Under which circumstances?
No error, empty returned data set.
Environment
Not relevant
I'm assuming the code is working correctly -- PromQL filters the metrics according to the two label matchers supplied. Because they're logically excluding the other, the returned set is empty. Seems like a pretty obvious incorrect use-case and returning "Hey, label matchers must be unique, but
keywas specified more than once" would be a nice-to-have.