-
Notifications
You must be signed in to change notification settings - Fork 803
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
Replace validation error with error in query limiter #4240
Conversation
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
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.
Looking at code changes, LGTM! I've seen CI has failed. Going to restart it cause I think it's due to a couple of flaky tests and not related to this change.
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.
Thank you!
…ntained string Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
_, err = c.QueryRange("{__name__=~\"series_.+\"}", series1Timestamp, series4Timestamp.Add(1*time.Hour), blockRangePeriod) | ||
require.Error(t, err) | ||
assert.Contains(t, err.Error(), "max number of series limit") | ||
assert.Contains(t, err.Error(), "500") |
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.
For some reason after this change, err.Error() is returning encoded strings rather than plain strings, so the assert contains no longer works. Instead of checking the response string, I checked for 500 like we do in some other tests. Is there a better way to do this?
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.
This is not correct. We do not expect a 500 error if the limit is reached, but a 4xx error.
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.
Oh :( You're right. My bad for overlooking that.
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.
I'm investigating it.
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.
This PR fixes it:
#4251
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Tyler Reid tyler.reid@grafana.com
What this PR does:
This is an internal refactor to return an Error from the query limiter and wrap to be returned as a validation error in the ingester and blocks storage queryables.
Which issue(s) this PR fixes:
Fixes comments from PR #4216
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]