-
Notifications
You must be signed in to change notification settings - Fork 642
query-tee: optionally consider equivalent errors the same when comparing responses #9143
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
Conversation
// Prometheus' engine: | ||
regexp.MustCompile(`invalid parameter "query": invalid expression type "range vector" for range query, must be Scalar or instant Vector`), | ||
// MQE: | ||
regexp.MustCompile(`invalid parameter "query": query expression produces a range vector, but expression for range queries must produce an instant vector or scalar`), |
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.
Should MQE be changed to be the same for this one? (and later promql can be fixed to be more descriptive)
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.
We've intentionally decided to provide clearer error messages where we can in MQE, even if that means diverging from Prometheus' engine.
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.
Yep, but I'm wondering if we should be the same to ease testing, and open PRs upstream to fix up wording. Nonetheless, not a blocker here :-)
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.
lgtm, but the new flag should probably be added to docs/sources/mimir/manage/tools/query-tee.md
too.
Done in 56f9674. |
What this PR does
This PR extends query-tee's response comparison to accept equivalent but non-identical error messages as the same.
For example, Prometheus' engine and MQE return slightly different error messages in some circumstances, and Prometheus' engine is non-deterministic when selecting example series in some error messages. Both of these situations can cause query-tee to consider a response as different, but we usually don't care as long as the errors are equivalent.
This new behaviour is enabled by default but can be disabled with
-proxy.require-exact-error-match=true
.Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.