Skip to content

Commit b57d393

Browse files
authored
Merge pull request #1015 from SomtochiAma/influxdb
Render inline promql query
2 parents db72fe3 + 3a2f688 commit b57d393

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/controller/scheduler_metrics.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ func (c *Controller) runBuiltinMetricChecks(canary *flaggerv1.Canary) bool {
198198

199199
// in-line PromQL
200200
if metric.Query != "" {
201-
val, err := observerFactory.Client.RunQuery(metric.Query)
201+
query, err := observers.RenderQuery(metric.Query, toMetricModel(canary, metric.Interval))
202+
val, err := observerFactory.Client.RunQuery(query)
202203
if err != nil {
203204
if errors.Is(err, providers.ErrNoValuesFound) {
204205
c.recordEventWarningf(canary, "Halt advancement no values found for metric: %s",

0 commit comments

Comments
 (0)