Skip to content

Commit 1bed3ff

Browse files
Saumya40-codesNaman-B-Parlecha
authored andcommitted
query, query-frontend, ruler: Add support for flags to use promQL experimental functions & bump promql-engine (thanos-io#8245)
* feat: add support for experimental functions, if enabled Signed-off-by: Saumya Shah <[email protected]> * fix tests Signed-off-by: Saumya Shah <[email protected]> * allow setting enable-feature flag in ruler Signed-off-by: Saumya Shah <[email protected]> * add flag info in docs Signed-off-by: Saumya Shah <[email protected]> * add CHANGELOG Signed-off-by: Saumya Shah <[email protected]> * add hidden flag to throw err on query fallback, red in tests ^_^ Signed-off-by: Saumya Shah <[email protected]> * bump promql-engine to latest version/commit Signed-off-by: Saumya Shah <[email protected]> * format docs Signed-off-by: Saumya Shah <[email protected]> --------- Signed-off-by: Saumya Shah <[email protected]>
1 parent 251bccc commit 1bed3ff

File tree

16 files changed

+145
-25
lines changed

16 files changed

+145
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
1717
### Added
1818

1919
- [#8238](https://github.com/thanos-io/thanos/pull/8238) Receive: add shuffle sharding support
20+
- [#8245](https://github.com/thanos-io/thanos/pull/8245) Querier/Query-Frontend/Ruler: Add `--enable-feature=promql-experimental-functions` flag option to enable using promQL experimental functions in respective Thanos components
2021

2122
### Changed
2223

cmd/thanos/query.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/prometheus/common/route"
2121
"github.com/prometheus/prometheus/model/labels"
2222
"github.com/prometheus/prometheus/promql"
23+
"github.com/prometheus/prometheus/promql/parser"
2324

2425
apiv1 "github.com/thanos-io/thanos/pkg/api/query"
2526
"github.com/thanos-io/thanos/pkg/api/query/querypb"
@@ -53,9 +54,10 @@ import (
5354
)
5455

5556
const (
56-
promqlNegativeOffset = "promql-negative-offset"
57-
promqlAtModifier = "promql-at-modifier"
58-
queryPushdown = "query-pushdown"
57+
promqlNegativeOffset = "promql-negative-offset"
58+
promqlAtModifier = "promql-at-modifier"
59+
queryPushdown = "query-pushdown"
60+
promqlExperimentalFunctions = "promql-experimental-functions"
5961
)
6062

6163
// registerQuery registers a query command.
@@ -81,6 +83,8 @@ func registerQuery(app *extkingpin.App) {
8183

8284
defaultEngine := cmd.Flag("query.promql-engine", "Default PromQL engine to use.").Default(string(apiv1.PromqlEnginePrometheus)).
8385
Enum(string(apiv1.PromqlEnginePrometheus), string(apiv1.PromqlEngineThanos))
86+
disableQueryFallback := cmd.Flag("query.disable-fallback", "If set then thanos engine will throw an error if query falls back to prometheus engine").Hidden().Default("false").Bool()
87+
8488
extendedFunctionsEnabled := cmd.Flag("query.enable-x-functions", "Whether to enable extended rate functions (xrate, xincrease and xdelta). Only has effect when used with Thanos engine.").Default("false").Bool()
8589
promqlQueryMode := cmd.Flag("query.mode", "PromQL query mode. One of: local, distributed.").
8690
Default(string(apiv1.PromqlQueryModeLocal)).
@@ -135,7 +139,7 @@ func registerQuery(app *extkingpin.App) {
135139

136140
activeQueryDir := cmd.Flag("query.active-query-path", "Directory to log currently active queries in the queries.active file.").Default("").String()
137141

138-
featureList := cmd.Flag("enable-feature", "Comma separated experimental feature names to enable.The current list of features is empty.").Hidden().Default("").Strings()
142+
featureList := cmd.Flag("enable-feature", "Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions in query)").Default("").Strings()
139143

140144
enableExemplarPartialResponse := cmd.Flag("exemplar.partial-response", "Enable partial response for exemplar endpoint. --no-exemplar.partial-response for disabling.").
141145
Hidden().Default("true").Bool()
@@ -208,6 +212,10 @@ func registerQuery(app *extkingpin.App) {
208212
}
209213

210214
for _, feature := range *featureList {
215+
if feature == promqlExperimentalFunctions {
216+
parser.EnableExperimentalFunctions = true
217+
level.Info(logger).Log("msg", "Experimental PromQL functions enabled.", "option", promqlExperimentalFunctions)
218+
}
211219
if feature == promqlAtModifier {
212220
level.Warn(logger).Log("msg", "This option for --enable-feature is now permanently enabled and therefore a no-op.", "option", promqlAtModifier)
213221
}
@@ -225,7 +233,6 @@ func registerQuery(app *extkingpin.App) {
225233
}
226234

227235
grpcLogOpts, logFilterMethods, err := logging.ParsegRPCOptions(reqLogConfig)
228-
229236
if err != nil {
230237
return errors.Wrap(err, "error while parsing config for request logging")
231238
}
@@ -331,6 +338,7 @@ func registerQuery(app *extkingpin.App) {
331338
store.NewTSDBSelector(tsdbSelector),
332339
apiv1.PromqlEngineType(*defaultEngine),
333340
apiv1.PromqlQueryMode(*promqlQueryMode),
341+
*disableQueryFallback,
334342
*tenantHeader,
335343
*defaultTenant,
336344
*tenantCertField,
@@ -393,6 +401,7 @@ func runQuery(
393401
tsdbSelector *store.TSDBSelector,
394402
defaultEngine apiv1.PromqlEngineType,
395403
queryMode apiv1.PromqlQueryMode,
404+
disableQueryFallback bool,
396405
tenantHeader string,
397406
defaultTenant string,
398407
tenantCertField string,
@@ -466,6 +475,7 @@ func runQuery(
466475
extendedFunctionsEnabled,
467476
activeQueryTracker,
468477
queryMode,
478+
disableQueryFallback,
469479
)
470480

471481
lookbackDeltaCreator := LookbackDeltaFactory(lookbackDelta, dynamicLookbackDelta)

cmd/thanos/query_frontend.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ func registerQueryFrontend(app *extkingpin.App) {
9797
cmd.Flag("query-frontend.enable-x-functions", "Enable experimental x- functions in query-frontend. --no-query-frontend.enable-x-functions for disabling.").
9898
Default("false").BoolVar(&cfg.EnableXFunctions)
9999

100+
cmd.Flag("enable-feature", "Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions in query-frontend)").Default("").StringsVar(&cfg.EnableFeatures)
101+
100102
cmd.Flag("query-range.max-query-length", "Limit the query time range (end - start time) in the query-frontend, 0 disables it.").
101103
Default("0").DurationVar((*time.Duration)(&cfg.QueryRangeConfig.Limits.MaxQueryLength))
102104

@@ -301,6 +303,15 @@ func runQueryFrontend(
301303
}
302304
}
303305

306+
if len(cfg.EnableFeatures) > 0 {
307+
for _, feature := range cfg.EnableFeatures {
308+
if feature == promqlExperimentalFunctions {
309+
parser.EnableExperimentalFunctions = true
310+
level.Info(logger).Log("msg", "Experimental PromQL functions enabled.", "option", promqlExperimentalFunctions)
311+
}
312+
}
313+
}
314+
304315
tripperWare, err := queryfrontend.NewTripperware(cfg.Config, reg, logger)
305316
if err != nil {
306317
return errors.Wrap(err, "setup tripperwares")

cmd/thanos/rule.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ type ruleConfig struct {
111111
ruleConcurrentEval int64
112112

113113
extendedFunctionsEnabled bool
114+
EnableFeatures []string
114115
}
115116

116117
type Expression struct {
@@ -165,6 +166,7 @@ func registerRule(app *extkingpin.App) {
165166
PlaceHolder("<endpoint>").StringsVar(&conf.grpcQueryEndpoints)
166167

167168
cmd.Flag("query.enable-x-functions", "Whether to enable extended rate functions (xrate, xincrease and xdelta). Only has effect when used with Thanos engine.").Default("false").BoolVar(&conf.extendedFunctionsEnabled)
169+
cmd.Flag("enable-feature", "Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions for ruler)").Default("").StringsVar(&conf.EnableFeatures)
168170

169171
conf.rwConfig = extflag.RegisterPathOrContent(cmd, "remote-write.config", "YAML config for the remote-write configurations, that specify servers where samples should be sent to (see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write). This automatically enables stateless mode for ruler and no series will be stored in the ruler's TSDB. If an empty config (or file) is provided, the flag is ignored and ruler is run with its own TSDB.", extflag.WithEnvSubstitution())
170172

@@ -581,6 +583,15 @@ func runRule(
581583
}
582584
}
583585

586+
if len(conf.EnableFeatures) > 0 {
587+
for _, feature := range conf.EnableFeatures {
588+
if feature == promqlExperimentalFunctions {
589+
parser.EnableExperimentalFunctions = true
590+
level.Info(logger).Log("msg", "Experimental PromQL functions enabled.", "option", promqlExperimentalFunctions)
591+
}
592+
}
593+
}
594+
584595
// Run rule evaluation and alert notifications.
585596
notifyFunc := func(ctx context.Context, expr string, alerts ...*rules.Alert) {
586597
res := make([]*notifier.Alert, 0, len(alerts))

docs/components/query-frontend.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ Flags:
270270
functions in query-frontend.
271271
--no-query-frontend.enable-x-functions for
272272
disabling.
273+
--enable-feature= ... Comma separated feature names to enable. Valid
274+
options for now: promql-experimental-functions
275+
(enables promql experimental functions in
276+
query-frontend)
273277
--query-range.max-query-length=0
274278
Limit the query time range (end - start time) in
275279
the query-frontend, 0 disables it.

docs/components/query.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,10 @@ Flags:
475475
--query.active-query-path=""
476476
Directory to log currently active queries in
477477
the queries.active file.
478+
--enable-feature= ... Comma separated feature names to enable. Valid
479+
options for now: promql-experimental-functions
480+
(enables promql experimental functions in
481+
query)
478482
--query.default-evaluation-interval=1m
479483
Set default evaluation interval for sub
480484
queries.

docs/components/rule.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,10 @@ Flags:
499499
Whether to enable extended rate functions
500500
(xrate, xincrease and xdelta). Only has effect
501501
when used with Thanos engine.
502+
--enable-feature= ... Comma separated feature names to enable. Valid
503+
options for now: promql-experimental-functions
504+
(enables promql experimental functions for
505+
ruler)
502506
--remote-write.config-file=<file-path>
503507
Path to YAML config for the remote-write
504508
configurations, that specify servers

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/cespare/xxhash/v2 v2.3.0
1616
github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89
1717
github.com/chromedp/chromedp v0.9.2
18-
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e
18+
github.com/cortexproject/promqlsmith v0.0.0-20250407233056-90db95b1a4e4
1919
github.com/cristalhq/hedgedhttp v0.9.1
2020
github.com/dustin/go-humanize v1.0.1
2121
github.com/efficientgo/core v1.0.0-rc.3
@@ -58,9 +58,9 @@ require (
5858
github.com/pkg/errors v0.9.1
5959
github.com/prometheus-community/prom-label-proxy v0.11.0
6060
github.com/prometheus/alertmanager v0.28.1
61-
github.com/prometheus/client_golang v1.20.5
61+
github.com/prometheus/client_golang v1.21.1
6262
github.com/prometheus/client_model v0.6.2
63-
github.com/prometheus/common v0.61.0
63+
github.com/prometheus/common v0.62.0
6464
github.com/prometheus/exporter-toolkit v0.13.2
6565
// Prometheus maps version 3.x.y to tags v0.30x.y.
6666
github.com/prometheus/prometheus v0.301.0
@@ -69,7 +69,7 @@ require (
6969
github.com/sony/gobreaker v1.0.0
7070
github.com/stretchr/testify v1.10.0
7171
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97
72-
github.com/thanos-io/promql-engine v0.0.0-20250329215917-4055a112d1ea
72+
github.com/thanos-io/promql-engine v0.0.0-20250522103302-dd83bd8fdb50
7373
github.com/uber/jaeger-client-go v2.30.0+incompatible
7474
github.com/vimeo/galaxycache v1.3.1
7575
github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,8 +1505,8 @@ github.com/colega/zeropool v0.0.0-20230505084239-6fb4a4f75381/go.mod h1:OU76gHeR
15051505
github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
15061506
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
15071507
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
1508-
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e h1:nOWmgQD3L/Z0bmm29iDxB7nlqjMnh7yD/PNOx9rnZmA=
1509-
github.com/cortexproject/promqlsmith v0.0.0-20240506042652-6cfdd9739a5e/go.mod h1:+bSqRETXJ1uk2S93m//htzTVqu8DJPvlGEb3bSE9PzI=
1508+
github.com/cortexproject/promqlsmith v0.0.0-20250407233056-90db95b1a4e4 h1:dpo7kQ24uFSV6Zgm9/kB34TIUWjGmadlbKrM6fNfQko=
1509+
github.com/cortexproject/promqlsmith v0.0.0-20250407233056-90db95b1a4e4/go.mod h1:jh6POgN18lXU133HBMfwr/1TjvBp8e5kL4ZtRsAPvGY=
15101510
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
15111511
github.com/cristalhq/hedgedhttp v0.9.1 h1:g68L9cf8uUyQKQJwciD0A1Vgbsz+QgCjuB1I8FAsCDs=
15121512
github.com/cristalhq/hedgedhttp v0.9.1/go.mod h1:XkqWU6qVMutbhW68NnzjWrGtH8NUx1UfYqGYtHVKIsI=
@@ -2139,8 +2139,8 @@ github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrb
21392139
github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
21402140
github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
21412141
github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
2142-
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
2143-
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
2142+
github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
2143+
github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
21442144
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
21452145
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
21462146
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -2157,8 +2157,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9
21572157
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
21582158
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
21592159
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
2160-
github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ=
2161-
github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s=
2160+
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
2161+
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
21622162
github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0=
21632163
github.com/prometheus/exporter-toolkit v0.13.2 h1:Z02fYtbqTMy2i/f+xZ+UK5jy/bl1Ex3ndzh06T/Q9DQ=
21642164
github.com/prometheus/exporter-toolkit v0.13.2/go.mod h1:tCqnfx21q6qN1KA4U3Bfb8uWzXfijIrJz3/kTIqMV7g=
@@ -2250,8 +2250,8 @@ github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1
22502250
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM=
22512251
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97 h1:VjG0mwhN1DkncwDHFvrpd12/2TLfgYNRmEQA48ikp+0=
22522252
github.com/thanos-io/objstore v0.0.0-20241111205755-d1dd89d41f97/go.mod h1:vyzFrBXgP+fGNG2FopEGWOO/zrIuoy7zt3LpLeezRsw=
2253-
github.com/thanos-io/promql-engine v0.0.0-20250329215917-4055a112d1ea h1:5dtnkBPOaW5seKSOzefJH4pJCSTUTI9BaWOHpQby48Y=
2254-
github.com/thanos-io/promql-engine v0.0.0-20250329215917-4055a112d1ea/go.mod h1:mRXbmLU+mCzHH16qDGFYYEviXbxxsHFQuAe66rp6sNM=
2253+
github.com/thanos-io/promql-engine v0.0.0-20250522103302-dd83bd8fdb50 h1:RGdaDAyFOjrFJSjaPT2z8robLvQ3KxNiNEN3DojpLOs=
2254+
github.com/thanos-io/promql-engine v0.0.0-20250522103302-dd83bd8fdb50/go.mod h1:agUazAk1yHLYSL87MdEcRbjN12DJ9OZfSUcfFLqy+F8=
22552255
github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU=
22562256
github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab/go.mod h1:eheTFp954zcWZXCU8d0AT76ftsQOTo4DTqkN/h3k1MY=
22572257
github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU=

pkg/api/query/engine.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ type queryCreator interface {
7474
}
7575

7676
type QueryFactory struct {
77-
mode PromqlQueryMode
77+
mode PromqlQueryMode
78+
disableFallback bool
7879

7980
prometheus *promql.Engine
8081
thanosLocal *engine.Engine
@@ -90,6 +91,7 @@ func NewQueryFactory(
9091
enableXFunctions bool,
9192
activeQueryTracker *promql.ActiveQueryTracker,
9293
mode PromqlQueryMode,
94+
disableFallback bool,
9395
) *QueryFactory {
9496
makeOpts := func(registry prometheus.Registerer) engine.Opts {
9597
opts := engine.Opts{
@@ -134,6 +136,7 @@ func NewQueryFactory(
134136
prometheus: promEngine,
135137
thanosLocal: thanosLocal,
136138
thanosDistributed: thanosDistributed,
139+
disableFallback: disableFallback,
137140
}
138141
}
139142

@@ -159,7 +162,7 @@ func (f *QueryFactory) makeInstantQuery(
159162
res, err = f.thanosLocal.MakeInstantQuery(ctx, q, opts, qry.query, ts)
160163
}
161164
if err != nil {
162-
if engine.IsUnimplemented(err) {
165+
if engine.IsUnimplemented(err) && !f.disableFallback {
163166
// fallback to prometheus
164167
return f.prometheus.NewInstantQuery(ctx, q, opts, qry.query, ts)
165168
}

0 commit comments

Comments
 (0)