-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Query: Enable promql-experimental-functions #8191
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
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.
Please fix build
Signed-off-by: Sujal Gupta <[email protected]>
Signed-off-by: Sujal Gupta <[email protected]>
Signed-off-by: Sujal Gupta <[email protected]>
Adjust the default get-config timeout to match the default get-config interval. Signed-off-by: Michael Hoffmann <[email protected]> Signed-off-by: Sujal Gupta <[email protected]>
Signed-off-by: Sujal Gupta <[email protected]>
Signed-off-by: Sujal Gupta <[email protected]>
@@ -135,7 +136,7 @@ func registerQuery(app *extkingpin.App) { | |||
|
|||
activeQueryDir := cmd.Flag("query.active-query-path", "Directory to log currently active queries in the queries.active file.").Default("").String() | |||
|
|||
featureList := cmd.Flag("enable-feature", "Comma separated experimental feature names to enable.The current list of features is empty.").Hidden().Default("").Strings() | |||
featureList := cmd.Flag("enable-feature", "Comma separated experimental feature names to enable. The current list of features is: promql-experimental-functions (enables experimental PromQL functions).").Hidden().Default("").Strings() |
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.
Does this flag still need to be hidden, I wonder
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 idea was just to support it, so I am not sure either.
@@ -317,6 +318,7 @@ func registerQuery(app *extkingpin.App) { | |||
*enableTargetPartialResponse, | |||
*enableMetricMetadataPartialResponse, | |||
*enableExemplarPartialResponse, | |||
false, |
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.
if --enable-feature=promql-experimental-functions
is set, this will still take it as false.
maybe we can intercept by checking from here if the set value is promql-experimental-functions
and pass true/false based on 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.
@Saumya40-codes , so like writing an expression here?
DefaultTenant string | ||
TenantCertField string | ||
EnableXFunctions bool | ||
EnableQueryExperimentalFunctions bool |
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 can use this field at cmd/thanos/query_frontend.go
now
e.g. https://github.com/thanos-io/thanos/blob/main/cmd/thanos/query_frontend.go#L161
Signed-off-by: Sujal Gupta <[email protected]>
Fixed in another PR. Thank you for your contribution! |
Changes
Fixes #7640
In
thanos/query.go
Added entry for the same in
pkg/api/query/engine.go
,pkg/queryfrontend/config.go
, andtest/e2e/e2ethanos/services.go
Verification