-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
check for stream selectors to have atleast one equality matcher #3216
check for stream selectors to have atleast one equality matcher #3216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, but I'm not sure about our goal here.
For instance, this seems a valid query, but we'd limit it: {job=~"loki-prod.*/querier"}
.
What if we instead limited queries which had no matchers, such as returned by the cortex function SplitFiltersAndMatchers
?
That would disallow queries such as {job=~".*"}
but allow ones like {job=~".+"}
Thats interesting. This would mean we would only allow matchers which would not make us fetch all the chunks for the whole query duration. I am not against this but I think it would be hard to explain it to the users because |
For an error message, what about: |
5c0339a
to
f35fe44
Compare
f35fe44
to
5a1f2f1
Compare
5a1f2f1
to
e849251
Compare
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Minor refactoring missing. Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
1- It currently 500. 2- Happens too late, at ingester level and querier. (better at the frontend) 3- Improve API surface level, we don't need to expose this validation for anything else than ParseLogSelector. see grafana#3216 Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
1- It currently 500. 2- Happens too late, at ingester level and querier. (better at the frontend) 3- Improve API surface level, we don't need to expose this validation for anything else than ParseLogSelector. see #3216 Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
What this PR does / why we need it:
To avoid users doing a query of death by selecting all the streams or very broad queries we want to make users have at least one equality matcher in the selectors.
Special notes for your reviewer:
We also consider
foo=~"bar|baz"
as an equality matcher since it is internally converted to equality matchers.Checklist