Skip to content

Commit

Permalink
Fix compatibility discrepancy between metrics filter and new expressi…
Browse files Browse the repository at this point in the history
…ons (#3827)
  • Loading branch information
begelundmuller authored Jan 11, 2024
1 parent 1412be1 commit 03a78e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions runtime/queries/metricsview.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,12 @@ func convertFilterToExpression(filter *runtimev1.MetricsViewFilter) *runtimev1.E
var exprs []*runtimev1.Expression

if len(filter.Include) > 0 {
var includeExprs []*runtimev1.Expression
for _, cond := range filter.Include {
domExpr := convertDimensionFilterToExpression(cond, false)
if domExpr != nil {
includeExprs = append(includeExprs, domExpr)
exprs = append(exprs, domExpr)
}
}
exprs = append(exprs, expressionpb.Or(includeExprs))
}

if len(filter.Exclude) > 0 {
Expand Down

0 comments on commit 03a78e3

Please sign in to comment.