-
Notifications
You must be signed in to change notification settings - Fork 545
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
Mimir query engine: add HTTP header to force use of Prometheus' engine #8454
Conversation
c4e5134
to
2de35d1
Compare
2de35d1
to
d5d5fad
Compare
@@ -27,6 +27,8 @@ type EngineWithFallback struct { | |||
logger log.Logger | |||
} | |||
|
|||
var errFallbackForcedByHTTPHeader = NotSupportedError{"fallback forced by HTTP header"} |
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.
(nit)
I don't know if I like using NotSupportedError
here. It's not that the query is necessarily unsupported, but that we aren't going to use the query engine. Maybe we need an error class "MQEError" or something that NotSupportError and Fallback use?
Similarly renaming e.unsupportedQueries
to FallbackQueries or similar.
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.
Good point, I've dropped the awkward use of NotSupportedError
in 28c4bc2.
I've kept unsupportedQueries
as-is for now - if it annoys us in the future, we can change it.
What this PR does
This PR adds support for forcing the use of Prometheus' engine when the Mimir query engine is enabled by sending the
X-Mimir-Force-Prometheus-Engine: true
HTTP header with the query request.The header is only effective if fallback to Prometheus' engine is enabled and fallback is enabled (ie.
-querier.enable-promql-engine-fallback=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.