Skip to content

Commit

Permalink
Merge pull request #1015 from SomtochiAma/influxdb
Browse files Browse the repository at this point in the history
Render inline promql query
  • Loading branch information
stefanprodan authored Sep 17, 2021
2 parents db72fe3 + 3a2f688 commit b57d393
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/scheduler_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ func (c *Controller) runBuiltinMetricChecks(canary *flaggerv1.Canary) bool {

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

0 comments on commit b57d393

Please sign in to comment.